Repository navigation
Skip DSM tag/context building in RabbitMQ when Data Streams is off (dsm - perf quick fix) - #13081
Conversation
basicPublish built DataStreamsTags and a DataStreamsContext for every publish, and the delivery decorator built them for every consumed message, even with DSM disabled, where DSM injection and the checkpoint 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 DSM-disabled publish path still injects the tracing span, while DSM-enabled publish and consume paths preserve their existing behavior. The completed static review found no actionable regression.
🤖 Bits Code Review · Commit ef4718e
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
e8c8320
into
master
What Does This Do
Skips building Data Streams Monitoring (DSM) tags and context in
rabbitmq-amqp-2.7when DSM is disabled:RabbitDecorator):DataStreamsTags.create("rabbitmq", INBOUND, queue)and aDataStreamsContextwere built for every delivery with headers, only for a checkpoint that does nothing with DSM off.basicPublishadvice): the tags and context were built for every publish, 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. RabbitMQ does the samecreateper delivery and per publish.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: not run locally. The
rabbitmq-amqp-2.7tests need Docker (testcontainers), which wasn't available, so CI will be their first run. The module compiles.Jira ticket: APMLP-2116
🤖 Generated with Claude Code