Repository navigation
Skip DSM tag/context building in SQS 1.0 when Data Streams is off (dsm - perf quick fix) - #13079
Conversation
The receive iterator built DataStreamsTags and a DataStreamsContext for every message, and the send interceptor built them for every send, even with DSM disabled, where the checkpoint and DSM injection are no-ops. Guard both with the dynamic isDataStreamsEnabled() check so remote-config enablement still takes effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The guards preserve span creation and tracing propagation when DSM is disabled, while retaining DSM context and checkpoint construction when enabled.
🤖 Bits Code Review · Commit 2cd8ad5
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
0e7c5e8
into
master
What Does This Do
Skips building Data Streams Monitoring (DSM) tags and context in
aws-java-sqs-1.0when DSM is disabled:TracingIterator):DataStreamsTags.create("sqs", INBOUND, queue)and aDataStreamsContextwere built for every received message, only for a checkpoint that does nothing with DSM off.SqsInterceptor.newContext): the tags and context were built for every send, only to be ignored by the DSM propagator. With DSM off, the span alone is injected.Both use the dynamic
traceConfig().isDataStreamsEnabled()check, so turning DSM on through remote config still works.Motivation
In the Kafka consumer, the same guard saved 548 B per record (−13.7% allocation) with DSM off (
KafkaConsumeScenariosBenchmark, #13075), and +6.6% throughput inkafka-consumer-perf-test. Most of that isDataStreamsTags.create: prefixed tag strings, hashing, and abyte[]per hashed tag. SQS does the samecreateper message received and per send.Additional Notes
Part of a sweep of the same pattern across messaging integrations, one PR per integration:
KafkaConsumeScenariosBenchmark)With DSM off at startup, the DSM propagator isn't registered, and
DataStreamsPropagator.injectalso returns early whenisDataStreamsEnabled()is false. New spans getNoopPathwayContext, sosetCheckpointdoes nothing. The skipped work had no observable effect.Follow-ups: APMLP-2116 (audit), APMLP-2117 (gated contributions, so a disabled product costs one branch by construction), APMLP-2147 (making
DataStreamsTagscheap when DSM is on).Tests:
aws-java-sqs-1.0test+forkedTest: 54 tests, 0 failures, including the DSM-enabled suites (SqsClientV0DataStreamsTest, receive-iteration).Jira ticket: APMLP-2116
🤖 Generated with Claude Code