Skip to content

Use routing key as DSM topic for RabbitMQ default-exchange publishes#11805

Open
ericfirth wants to merge 1 commit into
masterfrom
eric.firth/dsm-rabbitmq-default-exchange-topic
Open

Use routing key as DSM topic for RabbitMQ default-exchange publishes#11805
ericfirth wants to merge 1 commit into
masterfrom
eric.firth/dsm-rabbitmq-default-exchange-topic

Conversation

@ericfirth

Copy link
Copy Markdown
Contributor

What

When a RabbitMQ producer publishes to the default exchange (exchange == ""), record the routing key as the DSM topic instead of an empty exchange tag. Named-exchange publishes are unchanged.

Why

On the default exchange the routing key is the destination queue name. The producer's Data Streams Monitoring checkpoint previously recorded an empty exchange and no topic (createWithExchange("rabbitmq", OUTBOUND, "", hasRoutingKey)), so the producer had no destination. In the DSM map this leaves the producer with neither a topic nor an exchange to attach to — it gets pruned as a disconnected node, and the map shows queues feeding consumers with the producer missing entirely.

This matches what the JS (datadog-plugin-amqplib) and .NET (RabbitMQIntegration) tracers already do: fall back to the routing key as the topic when the exchange is empty. The produced topic now lines up with the consumer checkpoint (which already uses create("rabbitmq", INBOUND, queue)), so producer → queue → consumer connects end to end.

Change

RabbitChannelInstrumentation.ChannelPublishAdvice: when exchange is null/empty and a routing key is present, build the checkpoint with create("rabbitmq", OUTBOUND, routingKey) (sets topic); otherwise keep createWithExchange(...). The has_routing_key tag is dropped on this branch (it is non-hashable metadata and not consumed by the map; the consumer side doesn't set it either) — consistent with .NET.

Tests

Updated the two default-exchange DSM assertions in RabbitMQTest.groovy (plain client + Spring AMQP) to expect topic:<queue> on the producer instead of exchange: + has_routing_key:true. Module tests pass:

./gradlew :dd-java-agent:instrumentation:rabbitmq-amqp-2.7:test
# RabbitMQNamingV0Test: 27 tests, 0 failures (DSM enabled, rabbitmq:3.9.20-alpine container)

Context

This is the tracer-side root-cause fix. A backend stop-gap that reconnects already-emitted data from the trace chain shipped separately in dd-source. A matching fix is planned for dd-trace-py (kombu), which has the same gap (and omits topic even for named exchanges).

@ericfirth ericfirth added type: bug Bug report and fix inst: rabbitmq RabbitMQ instrumentation labels Jun 30, 2026
@pr-commenter

pr-commenter Bot commented Jun 30, 2026

Copy link
Copy Markdown

Benchmarks

⚠️ Warning: Baseline build not found for merge-base commit. Comparing against the latest commit on master instead.

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master eric.firth/dsm-rabbitmq-default-exchange-topic
git_commit_date 1782823849 1782824948
git_commit_sha b0cb50f afe8664
release_version 1.64.0-SNAPSHOT~b0cb50ff6e 1.60.0-SNAPSHOT~afe8664b0a
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1782827224 1782827224
ci_job_id 1816896451 1816896451
ci_pipeline_id 121848161 121848161
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-ykkbqaqc 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-ykkbqaqc 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 6 performance improvements and 18 performance regressions! Performance is the same for 35 metrics, 12 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:GlobalTracer worse
[+6.239ms; +12.349ms] or [+2.639%; +5.222%]
245.761ms 236.467ms
scenario:startup:insecure-bank:iast:Debugger worse
[+4.505ms; +9.780ms] or [+7.097%; +15.405%]
70.626ms 63.483ms
scenario:startup:insecure-bank:iast:Remote Config worse
[+16.372µs; +51.854µs] or [+3.079%; +9.752%]
565.843µs 531.730µs
scenario:startup:insecure-bank:iast:Telemetry worse
[+563.483µs; +918.904µs] or [+7.129%; +11.625%]
8.646ms 7.904ms
scenario:startup:insecure-bank:iast:Flare Poller worse
[+145.195µs; +416.927µs] or [+4.428%; +12.715%]
3.560ms 3.279ms
scenario:startup:insecure-bank:tracing:AgentMeter better
[-1091.089µs; -639.460µs] or [-3.632%; -2.128%]
29.178ms 30.043ms
scenario:startup:insecure-bank:tracing:AppSec worse
[+0.823ms; +1.237ms] or [+2.547%; +3.826%]
33.359ms 32.329ms
scenario:startup:insecure-bank:tracing:Debugger worse
[+1.498ms; +6.336ms] or [+2.521%; +10.668%]
63.312ms 59.395ms
scenario:startup:petclinic:appsec:Agent.start better
[-47.174ms; -27.352ms] or [-3.690%; -2.140%]
1.241s 1.278s
scenario:startup:petclinic:appsec:IAST worse
[+0.885ms; +1.286ms] or [+3.624%; +5.271%]
25.492ms 24.406ms
scenario:startup:petclinic:appsec:AppSec better
[-21.116ms; -19.034ms] or [-11.178%; -10.076%]
168.828ms 188.903ms
scenario:startup:petclinic:appsec:Telemetry worse
[+1.025ms; +1.575ms] or [+12.548%; +19.281%]
9.470ms 8.169ms
scenario:startup:petclinic:appsec:Flare Poller better
[-5.781ms; -5.408ms] or [-61.554%; -57.582%]
3.797ms 9.392ms
scenario:startup:petclinic:iast:BytebuddyAgent better
[-36.907ms; -29.087ms] or [-4.438%; -3.497%]
798.655ms 831.652ms
scenario:startup:petclinic:iast:Telemetry worse
[+670.414µs; +1017.341µs] or [+8.491%; +12.885%]
8.739ms 7.896ms
scenario:startup:petclinic:iast:Flare Poller worse
[+147.494µs; +341.142µs] or [+4.430%; +10.246%]
3.574ms 3.330ms
scenario:startup:petclinic:profiling:Agent.start better
[-137.973ms; -110.415ms] or [-10.441%; -8.356%]
1.197s 1.321s
scenario:startup:petclinic:profiling:ProfilingAgent worse
[+3.079ms; +5.308ms] or [+3.219%; +5.550%]
99.850ms 95.656ms
scenario:startup:petclinic:profiling:crashtracking worse
[+639.730µs; +679.693µs] or [+119.592%; +127.063%]
1194.636µs 534.925µs
scenario:startup:petclinic:profiling:Telemetry worse
[+801.955µs; +1132.486µs] or [+10.014%; +14.141%]
8.976ms 8.008ms
scenario:startup:petclinic:profiling:Flare Poller worse
[+247.638µs; +402.268µs] or [+7.116%; +11.559%]
3.805ms 3.480ms
scenario:startup:petclinic:profiling:Profiling worse
[+3.080ms; +5.316ms] or [+3.201%; +5.525%]
100.414ms 96.216ms
scenario:startup:petclinic:tracing:Debugger worse
[+2.352ms; +7.235ms] or [+3.902%; +12.006%]
65.060ms 60.267ms
scenario:startup:petclinic:tracing:Remote Config worse
[+12.870µs; +57.547µs] or [+2.147%; +9.603%]
634.499µs 599.291µs
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.60.0-SNAPSHOT~afe8664b0a, baseline=1.64.0-SNAPSHOT~b0cb50ff6e

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.068 s) : 0, 1067512
Total [baseline] (8.899 s) : 0, 8899018
Agent [candidate] (1.061 s) : 0, 1061115
Total [candidate] (8.76 s) : 0, 8759767
section iast
Agent [baseline] (1.251 s) : 0, 1250593
Total [baseline] (9.6 s) : 0, 9600325
Agent [candidate] (1.247 s) : 0, 1246545
Total [candidate] (9.452 s) : 0, 9451846
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.068 s -
Agent iast 1.251 s 183.082 ms (17.2%)
Total tracing 8.899 s -
Total iast 9.6 s 701.307 ms (7.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.061 s -
Agent iast 1.247 s 185.43 ms (17.5%)
Total tracing 8.76 s -
Total iast 9.452 s 692.079 ms (7.9%)
gantt
    title insecure-bank - break down per module: candidate=1.60.0-SNAPSHOT~afe8664b0a, baseline=1.64.0-SNAPSHOT~b0cb50ff6e

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.21 ms) : 0, 1210
crashtracking [candidate] (1.196 ms) : 0, 1196
BytebuddyAgent [baseline] (639.053 ms) : 0, 639053
BytebuddyAgent [candidate] (628.404 ms) : 0, 628404
AgentMeter [baseline] (30.043 ms) : 0, 30043
AgentMeter [candidate] (29.178 ms) : 0, 29178
GlobalTracer [baseline] (248.22 ms) : 0, 248220
GlobalTracer [candidate] (252.698 ms) : 0, 252698
AppSec [baseline] (32.329 ms) : 0, 32329
AppSec [candidate] (33.359 ms) : 0, 33359
Debugger [baseline] (59.395 ms) : 0, 59395
Debugger [candidate] (63.312 ms) : 0, 63312
Remote Config [baseline] (602.601 µs) : 0, 603
Remote Config [candidate] (627.572 µs) : 0, 628
Telemetry [baseline] (8.41 ms) : 0, 8410
Telemetry [candidate] (9.943 ms) : 0, 9943
Flare Poller [baseline] (11.532 ms) : 0, 11532
Flare Poller [candidate] (6.273 ms) : 0, 6273
section iast
crashtracking [baseline] (1.212 ms) : 0, 1212
crashtracking [candidate] (1.221 ms) : 0, 1221
BytebuddyAgent [baseline] (830.348 ms) : 0, 830348
BytebuddyAgent [candidate] (809.776 ms) : 0, 809776
AgentMeter [baseline] (11.479 ms) : 0, 11479
AgentMeter [candidate] (11.817 ms) : 0, 11817
GlobalTracer [baseline] (236.467 ms) : 0, 236467
GlobalTracer [candidate] (245.761 ms) : 0, 245761
AppSec [baseline] (28.781 ms) : 0, 28781
AppSec [candidate] (30.382 ms) : 0, 30382
Debugger [baseline] (63.483 ms) : 0, 63483
Debugger [candidate] (70.626 ms) : 0, 70626
Remote Config [baseline] (531.73 µs) : 0, 532
Remote Config [candidate] (565.843 µs) : 0, 566
Telemetry [baseline] (7.904 ms) : 0, 7904
Telemetry [candidate] (8.646 ms) : 0, 8646
Flare Poller [baseline] (3.279 ms) : 0, 3279
Flare Poller [candidate] (3.56 ms) : 0, 3560
IAST [baseline] (30.296 ms) : 0, 30296
IAST [candidate] (27.753 ms) : 0, 27753
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.60.0-SNAPSHOT~afe8664b0a, baseline=1.64.0-SNAPSHOT~b0cb50ff6e

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1069988
Total [baseline] (10.971 s) : 0, 10970517
Agent [candidate] (1.068 s) : 0, 1068317
Total [candidate] (10.965 s) : 0, 10965492
section appsec
Agent [baseline] (1.278 s) : 0, 1278354
Total [baseline] (11.06 s) : 0, 11059810
Agent [candidate] (1.241 s) : 0, 1241091
Total [candidate] (11.002 s) : 0, 11002402
section iast
Agent [baseline] (1.255 s) : 0, 1254773
Total [baseline] (11.129 s) : 0, 11129139
Agent [candidate] (1.231 s) : 0, 1231114
Total [candidate] (11.183 s) : 0, 11183209
section profiling
Agent [baseline] (1.321 s) : 0, 1321464
Total [baseline] (11.144 s) : 0, 11144075
Agent [candidate] (1.197 s) : 0, 1197270
Total [candidate] (11.121 s) : 0, 11120665
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.07 s -
Agent appsec 1.278 s 208.367 ms (19.5%)
Agent iast 1.255 s 184.786 ms (17.3%)
Agent profiling 1.321 s 251.477 ms (23.5%)
Total tracing 10.971 s -
Total appsec 11.06 s 89.292 ms (0.8%)
Total iast 11.129 s 158.622 ms (1.4%)
Total profiling 11.144 s 173.557 ms (1.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.068 s -
Agent appsec 1.241 s 172.774 ms (16.2%)
Agent iast 1.231 s 162.797 ms (15.2%)
Agent profiling 1.197 s 128.953 ms (12.1%)
Total tracing 10.965 s -
Total appsec 11.002 s 36.91 ms (0.3%)
Total iast 11.183 s 217.717 ms (2.0%)
Total profiling 11.121 s 155.173 ms (1.4%)
gantt
    title petclinic - break down per module: candidate=1.60.0-SNAPSHOT~afe8664b0a, baseline=1.64.0-SNAPSHOT~b0cb50ff6e

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.202 ms) : 0, 1202
crashtracking [candidate] (1.207 ms) : 0, 1207
BytebuddyAgent [baseline] (640.094 ms) : 0, 640094
BytebuddyAgent [candidate] (631.102 ms) : 0, 631102
AgentMeter [baseline] (30.05 ms) : 0, 30050
AgentMeter [candidate] (29.435 ms) : 0, 29435
GlobalTracer [baseline] (248.819 ms) : 0, 248819
GlobalTracer [candidate] (254.854 ms) : 0, 254854
AppSec [baseline] (32.382 ms) : 0, 32382
AppSec [candidate] (33.501 ms) : 0, 33501
Debugger [baseline] (60.267 ms) : 0, 60267
Debugger [candidate] (65.06 ms) : 0, 65060
Remote Config [baseline] (599.291 µs) : 0, 599
Remote Config [candidate] (634.499 µs) : 0, 634
Telemetry [baseline] (8.398 ms) : 0, 8398
Telemetry [candidate] (11.681 ms) : 0, 11681
Flare Poller [baseline] (11.439 ms) : 0, 11439
Flare Poller [candidate] (4.644 ms) : 0, 4644
section appsec
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.208 ms) : 0, 1208
BytebuddyAgent [baseline] (681.629 ms) : 0, 681629
BytebuddyAgent [candidate] (663.109 ms) : 0, 663109
AgentMeter [baseline] (12.267 ms) : 0, 12267
AgentMeter [candidate] (12.077 ms) : 0, 12077
GlobalTracer [baseline] (248.445 ms) : 0, 248445
GlobalTracer [candidate] (253.435 ms) : 0, 253435
AppSec [baseline] (188.903 ms) : 0, 188903
AppSec [candidate] (168.828 ms) : 0, 168828
Debugger [baseline] (66.386 ms) : 0, 66386
Debugger [candidate] (66.843 ms) : 0, 66843
Remote Config [baseline] (598.278 µs) : 0, 598
Remote Config [candidate] (648.263 µs) : 0, 648
Telemetry [baseline] (8.169 ms) : 0, 8169
Telemetry [candidate] (9.47 ms) : 0, 9470
Flare Poller [baseline] (9.392 ms) : 0, 9392
Flare Poller [candidate] (3.797 ms) : 0, 3797
IAST [baseline] (24.406 ms) : 0, 24406
IAST [candidate] (25.492 ms) : 0, 25492
section iast
crashtracking [baseline] (1.208 ms) : 0, 1208
crashtracking [candidate] (1.21 ms) : 0, 1210
BytebuddyAgent [baseline] (831.652 ms) : 0, 831652
BytebuddyAgent [candidate] (798.655 ms) : 0, 798655
AgentMeter [baseline] (11.584 ms) : 0, 11584
AgentMeter [candidate] (11.317 ms) : 0, 11317
GlobalTracer [baseline] (240.517 ms) : 0, 240517
GlobalTracer [candidate] (243.464 ms) : 0, 243464
AppSec [baseline] (29.135 ms) : 0, 29135
AppSec [candidate] (33.215 ms) : 0, 33215
Debugger [baseline] (64.27 ms) : 0, 64270
Debugger [candidate] (67.179 ms) : 0, 67179
Remote Config [baseline] (534.417 µs) : 0, 534
Remote Config [candidate] (537.88 µs) : 0, 538
Telemetry [baseline] (7.896 ms) : 0, 7896
Telemetry [candidate] (8.739 ms) : 0, 8739
Flare Poller [baseline] (3.33 ms) : 0, 3330
Flare Poller [candidate] (3.574 ms) : 0, 3574
IAST [baseline] (27.938 ms) : 0, 27938
IAST [candidate] (27.174 ms) : 0, 27174
section profiling
crashtracking [baseline] (534.925 µs) : 0, 535
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (692.35 ms) : 0, 692350
BytebuddyAgent [candidate] (689.44 ms) : 0, 689440
AgentMeter [baseline] (9.82 ms) : 0, 9820
AgentMeter [candidate] (8.591 ms) : 0, 8591
GlobalTracer [baseline] (211.169 ms) : 0, 211169
GlobalTracer [candidate] (212.659 ms) : 0, 212659
AppSec [baseline] (32.368 ms) : 0, 32368
AppSec [candidate] (33.096 ms) : 0, 33096
Debugger [baseline] (66.345 ms) : 0, 66345
Debugger [candidate] (68.033 ms) : 0, 68033
Remote Config [baseline] (630.694 µs) : 0, 631
Remote Config [candidate] (646.803 µs) : 0, 647
Telemetry [baseline] (8.008 ms) : 0, 8008
Telemetry [candidate] (8.976 ms) : 0, 8976
Flare Poller [baseline] (3.48 ms) : 0, 3480
Flare Poller [candidate] (3.805 ms) : 0, 3805
ProfilingAgent [baseline] (95.656 ms) : 0, 95656
ProfilingAgent [candidate] (99.85 ms) : 0, 99850
Profiling [baseline] (96.216 ms) : 0, 96216
Profiling [candidate] (100.414 ms) : 0, 100414
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master eric.firth/dsm-rabbitmq-default-exchange-topic
git_commit_date 1782823849 1782824948
git_commit_sha b0cb50f afe8664
release_version 1.64.0-SNAPSHOT~b0cb50ff6e 1.60.0-SNAPSHOT~afe8664b0a
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1782827712 1782827712
ci_job_id 1816896456 1816896456
ci_pipeline_id 121848161 121848161
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-gw3w8sz9 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-gw3w8sz9 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 2 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:iast_GLOBAL:high_load worse
[+76.603µs; +178.656µs] or [+2.680%; +6.250%]
worse
[+278.253µs; +703.932µs] or [+3.481%; +8.805%]
unstable
[-203.255op/s; +80.630op/s] or [-16.041%; +6.363%]
2.986ms 8.486ms 1205.812op/s 2.858ms 7.995ms 1267.125op/s
scenario:load:petclinic:appsec:high_load better
[-1.588ms; -0.584ms] or [-8.087%; -2.974%]
unsure
[-1.803ms; -0.247ms] or [-5.771%; -0.791%]
unstable
[-13.198op/s; +33.073op/s] or [-5.585%; +13.995%]
18.554ms 30.216ms 246.250op/s 19.640ms 31.241ms 236.312op/s
scenario:load:petclinic:tracing:high_load better
[-1.566ms; -0.822ms] or [-8.465%; -4.442%]
unsure
[-1638.002µs; -338.150µs] or [-5.528%; -1.141%]
unstable
[-11.073op/s; +36.823op/s] or [-4.436%; +14.751%]
17.311ms 28.642ms 262.500op/s 18.505ms 29.630ms 249.625op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~afe8664b0a, baseline=1.64.0-SNAPSHOT~b0cb50ff6e
    dateFormat X
    axisFormat %s
section baseline
no_agent (18.214 ms) : 18027, 18402
.   : milestone, 18214,
appsec (19.751 ms) : 19549, 19953
.   : milestone, 19751,
code_origins (17.976 ms) : 17800, 18151
.   : milestone, 17976,
iast (17.813 ms) : 17636, 17989
.   : milestone, 17813,
profiling (19.529 ms) : 19331, 19727
.   : milestone, 19529,
tracing (18.697 ms) : 18509, 18885
.   : milestone, 18697,
section candidate
no_agent (19.09 ms) : 18895, 19286
.   : milestone, 19090,
appsec (18.948 ms) : 18755, 19141
.   : milestone, 18948,
code_origins (18.117 ms) : 17938, 18295
.   : milestone, 18117,
iast (17.796 ms) : 17620, 17973
.   : milestone, 17796,
profiling (18.956 ms) : 18767, 19145
.   : milestone, 18956,
tracing (17.771 ms) : 17595, 17947
.   : milestone, 17771,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.214 ms [18.027 ms, 18.402 ms] -
appsec 19.751 ms [19.549 ms, 19.953 ms] 1.537 ms (8.4%)
code_origins 17.976 ms [17.8 ms, 18.151 ms] -238.523 µs (-1.3%)
iast 17.813 ms [17.636 ms, 17.989 ms] -401.644 µs (-2.2%)
profiling 19.529 ms [19.331 ms, 19.727 ms] 1.315 ms (7.2%)
tracing 18.697 ms [18.509 ms, 18.885 ms] 482.841 µs (2.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.09 ms [18.895 ms, 19.286 ms] -
appsec 18.948 ms [18.755 ms, 19.141 ms] -142.443 µs (-0.7%)
code_origins 18.117 ms [17.938 ms, 18.295 ms] -973.608 µs (-5.1%)
iast 17.796 ms [17.62 ms, 17.973 ms] -1.294 ms (-6.8%)
profiling 18.956 ms [18.767 ms, 19.145 ms] -134.477 µs (-0.7%)
tracing 17.771 ms [17.595 ms, 17.947 ms] -1.319 ms (-6.9%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~afe8664b0a, baseline=1.64.0-SNAPSHOT~b0cb50ff6e
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.275 ms) : 1263, 1286
.   : milestone, 1275,
iast (3.355 ms) : 3311, 3399
.   : milestone, 3355,
iast_FULL (6.276 ms) : 6211, 6340
.   : milestone, 6276,
iast_GLOBAL (3.629 ms) : 3568, 3690
.   : milestone, 3629,
profiling (2.299 ms) : 2276, 2322
.   : milestone, 2299,
tracing (2.022 ms) : 2004, 2039
.   : milestone, 2022,
section candidate
no_agent (1.274 ms) : 1262, 1286
.   : milestone, 1274,
iast (3.275 ms) : 3230, 3320
.   : milestone, 3275,
iast_FULL (6.145 ms) : 6081, 6208
.   : milestone, 6145,
iast_GLOBAL (3.806 ms) : 3737, 3874
.   : milestone, 3806,
profiling (2.403 ms) : 2380, 2426
.   : milestone, 2403,
tracing (1.938 ms) : 1921, 1955
.   : milestone, 1938,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.275 ms [1.263 ms, 1.286 ms] -
iast 3.355 ms [3.311 ms, 3.399 ms] 2.08 ms (163.1%)
iast_FULL 6.276 ms [6.211 ms, 6.34 ms] 5.001 ms (392.2%)
iast_GLOBAL 3.629 ms [3.568 ms, 3.69 ms] 2.354 ms (184.7%)
profiling 2.299 ms [2.276 ms, 2.322 ms] 1.024 ms (80.3%)
tracing 2.022 ms [2.004 ms, 2.039 ms] 746.94 µs (58.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.274 ms [1.262 ms, 1.286 ms] -
iast 3.275 ms [3.23 ms, 3.32 ms] 2.001 ms (157.0%)
iast_FULL 6.145 ms [6.081 ms, 6.208 ms] 4.871 ms (382.3%)
iast_GLOBAL 3.806 ms [3.737 ms, 3.874 ms] 2.532 ms (198.7%)
profiling 2.403 ms [2.38 ms, 2.426 ms] 1.129 ms (88.6%)
tracing 1.938 ms [1.921 ms, 1.955 ms] 663.528 µs (52.1%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master eric.firth/dsm-rabbitmq-default-exchange-topic
git_commit_date 1782823849 1782824948
git_commit_sha b0cb50f afe8664
release_version 1.64.0-SNAPSHOT~b0cb50ff6e 1.60.0-SNAPSHOT~afe8664b0a
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1782827467 1782827467
ci_job_id 1816896460 1816896460
ci_pipeline_id 121848161 121848161
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-z63scq8j 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-z63scq8j 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~afe8664b0a, baseline=1.64.0-SNAPSHOT~b0cb50ff6e
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.366 s) : 15366000, 15366000
.   : milestone, 15366000,
appsec (14.811 s) : 14811000, 14811000
.   : milestone, 14811000,
iast (19.051 s) : 19051000, 19051000
.   : milestone, 19051000,
iast_GLOBAL (17.94 s) : 17940000, 17940000
.   : milestone, 17940000,
profiling (14.943 s) : 14943000, 14943000
.   : milestone, 14943000,
tracing (14.878 s) : 14878000, 14878000
.   : milestone, 14878000,
section candidate
no_agent (14.97 s) : 14970000, 14970000
.   : milestone, 14970000,
appsec (14.91 s) : 14910000, 14910000
.   : milestone, 14910000,
iast (18.456 s) : 18456000, 18456000
.   : milestone, 18456000,
iast_GLOBAL (17.822 s) : 17822000, 17822000
.   : milestone, 17822000,
profiling (14.826 s) : 14826000, 14826000
.   : milestone, 14826000,
tracing (14.793 s) : 14793000, 14793000
.   : milestone, 14793000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.366 s [15.366 s, 15.366 s] -
appsec 14.811 s [14.811 s, 14.811 s] -555.0 ms (-3.6%)
iast 19.051 s [19.051 s, 19.051 s] 3.685 s (24.0%)
iast_GLOBAL 17.94 s [17.94 s, 17.94 s] 2.574 s (16.8%)
profiling 14.943 s [14.943 s, 14.943 s] -423.0 ms (-2.8%)
tracing 14.878 s [14.878 s, 14.878 s] -488.0 ms (-3.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.97 s [14.97 s, 14.97 s] -
appsec 14.91 s [14.91 s, 14.91 s] -60.0 ms (-0.4%)
iast 18.456 s [18.456 s, 18.456 s] 3.486 s (23.3%)
iast_GLOBAL 17.822 s [17.822 s, 17.822 s] 2.852 s (19.1%)
profiling 14.826 s [14.826 s, 14.826 s] -144.0 ms (-1.0%)
tracing 14.793 s [14.793 s, 14.793 s] -177.0 ms (-1.2%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~afe8664b0a, baseline=1.64.0-SNAPSHOT~b0cb50ff6e
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.492 ms) : 1481, 1504
.   : milestone, 1492,
appsec (3.794 ms) : 3574, 4014
.   : milestone, 3794,
iast (2.307 ms) : 2236, 2378
.   : milestone, 2307,
iast_GLOBAL (2.346 ms) : 2275, 2418
.   : milestone, 2346,
profiling (2.144 ms) : 2087, 2201
.   : milestone, 2144,
tracing (2.122 ms) : 2067, 2178
.   : milestone, 2122,
section candidate
no_agent (1.489 ms) : 1477, 1500
.   : milestone, 1489,
appsec (3.798 ms) : 3577, 4020
.   : milestone, 3798,
iast (2.272 ms) : 2203, 2341
.   : milestone, 2272,
iast_GLOBAL (2.319 ms) : 2250, 2389
.   : milestone, 2319,
profiling (2.097 ms) : 2042, 2152
.   : milestone, 2097,
tracing (2.089 ms) : 2035, 2143
.   : milestone, 2089,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.492 ms [1.481 ms, 1.504 ms] -
appsec 3.794 ms [3.574 ms, 4.014 ms] 2.302 ms (154.3%)
iast 2.307 ms [2.236 ms, 2.378 ms] 814.817 µs (54.6%)
iast_GLOBAL 2.346 ms [2.275 ms, 2.418 ms] 854.249 µs (57.3%)
profiling 2.144 ms [2.087 ms, 2.201 ms] 651.582 µs (43.7%)
tracing 2.122 ms [2.067 ms, 2.178 ms] 630.345 µs (42.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.489 ms [1.477 ms, 1.5 ms] -
appsec 3.798 ms [3.577 ms, 4.02 ms] 2.31 ms (155.2%)
iast 2.272 ms [2.203 ms, 2.341 ms] 783.258 µs (52.6%)
iast_GLOBAL 2.319 ms [2.25 ms, 2.389 ms] 830.617 µs (55.8%)
profiling 2.097 ms [2.042 ms, 2.152 ms] 608.836 µs (40.9%)
tracing 2.089 ms [2.035 ms, 2.143 ms] 600.396 µs (40.3%)

When a producer publishes to the default exchange (exchange == ""), the
routing key is the destination queue name. The DSM checkpoint previously
recorded an empty exchange and no topic, so the producer had no destination
and showed up disconnected in the Data Streams Monitoring map. Record the
routing key as the topic in that case (matching the consumer checkpoint and
the JS/.NET tracers). Named-exchange publishes are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ericfirth ericfirth force-pushed the eric.firth/dsm-rabbitmq-default-exchange-topic branch from afe8664 to 336b1b0 Compare June 30, 2026 15:35
@ericfirth ericfirth requested a review from Copilot June 30, 2026 15:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates RabbitMQ AMQP 2.7 instrumentation so that Data Streams Monitoring (DSM) producer checkpoints for default-exchange publishes (exchange == "") use the routing key as the DSM topic (since it represents the destination queue), enabling producer → queue → consumer connectivity in DSM maps.

Changes:

  • In RabbitChannelInstrumentation.ChannelPublishContextPropagationAdvice, when publishing to the default exchange and a routing key is present, build DSM tags with create("rabbitmq", OUTBOUND, routingKey) (topic-based) instead of createWithExchange(...) (exchange-based).
  • Update DSM assertions in RabbitMQTest.groovy to expect topic:<queue> on producer checkpoints for default-exchange publishes (instead of exchange: + has_routing_key:true).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
dd-java-agent/instrumentation/rabbitmq-amqp-2.7/src/main/java/datadog/trace/instrumentation/rabbitmq/amqp/RabbitChannelInstrumentation.java Records routing key as DSM topic for default-exchange publishes; keeps named-exchange behavior unchanged.
dd-java-agent/instrumentation/rabbitmq-amqp-2.7/src/test/groovy/RabbitMQTest.groovy Updates DSM expectations for producer checkpoints on default-exchange publishes to validate the new topic behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ericfirth ericfirth marked this pull request as ready for review June 30, 2026 15:53
@ericfirth ericfirth requested review from a team as code owners June 30, 2026 15:53
@ericfirth ericfirth requested review from ValentinZakharov and removed request for a team June 30, 2026 15:53
@dd-octo-sts dd-octo-sts Bot added the tag: ai generated Largely based on code generated by an AI or LLM label Jun 30, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:petclinic:appsec:Agent 17.45 s 17.24 s [+0.3%; +2.1%] (maybe worse)
startup:petclinic:iast:Agent 17.31 s 17.58 s [-2.3%; -0.8%] (maybe better)
startup:petclinic:profiling:Agent 17.56 s 16.75 s [+0.3%; +9.4%] (maybe worse)
startup:petclinic:sca:Agent 17.61 s 17.48 s [-0.4%; +1.8%] (no difference)
startup:petclinic:tracing:Agent 16.75 s 16.68 s [-0.5%; +1.3%] (no difference)

Commit: 336b1b05 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

if ((exchange == null || exchange.isEmpty()) && hasRoutingKey) {
// Publishing to the default exchange: the routing key is the destination queue
// name, so record it as the topic (matching the consumer checkpoint). Without
// this the producer has neither a topic nor an exchange and shows up disconnected

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove the comment, it doesn't add much imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: rabbitmq RabbitMQ instrumentation tag: ai generated Largely based on code generated by an AI or LLM type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants