Add Kafka cluster ID and offset tags to producer/consumer spans#11107
Add Kafka cluster ID and offset tags to producer/consumer spans#11107gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomasterfrom
Conversation
Tag producer spans with messaging.kafka.cluster.id, topic, and broker-assigned partition/offset (via callback). Tag consumer spans with messaging.kafka.cluster.id, topic, consumer group, and offset. These tags enable linking from a span directly to a specific Kafka message. Previously the cluster ID was only extracted when Data Streams was enabled; MetadataState is now always initialized on the producer so cluster ID flows through regardless of DSM configuration. tag: ai generated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 63 metrics, 8 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~2e8c45924b, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.061 s) : 0, 1061323
Total [baseline] (8.846 s) : 0, 8846366
Agent [candidate] (1.057 s) : 0, 1056540
Total [candidate] (8.889 s) : 0, 8889361
section iast
Agent [baseline] (1.23 s) : 0, 1229806
Total [baseline] (9.562 s) : 0, 9562335
Agent [candidate] (1.22 s) : 0, 1219960
Total [candidate] (9.544 s) : 0, 9544269
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~2e8c45924b, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (635.486 ms) : 0, 635486
BytebuddyAgent [candidate] (632.381 ms) : 0, 632381
AgentMeter [baseline] (29.644 ms) : 0, 29644
AgentMeter [candidate] (29.522 ms) : 0, 29522
GlobalTracer [baseline] (249.5 ms) : 0, 249500
GlobalTracer [candidate] (250.247 ms) : 0, 250247
AppSec [baseline] (32.135 ms) : 0, 32135
AppSec [candidate] (32.213 ms) : 0, 32213
Debugger [baseline] (59.417 ms) : 0, 59417
Debugger [candidate] (59.499 ms) : 0, 59499
Remote Config [baseline] (596.816 µs) : 0, 597
Remote Config [candidate] (599.968 µs) : 0, 600
Telemetry [baseline] (8.072 ms) : 0, 8072
Telemetry [candidate] (8.087 ms) : 0, 8087
Flare Poller [baseline] (8.877 ms) : 0, 8877
Flare Poller [candidate] (6.591 ms) : 0, 6591
section iast
crashtracking [baseline] (1.254 ms) : 0, 1254
crashtracking [candidate] (1.232 ms) : 0, 1232
BytebuddyAgent [baseline] (805.879 ms) : 0, 805879
BytebuddyAgent [candidate] (798.612 ms) : 0, 798612
AgentMeter [baseline] (11.594 ms) : 0, 11594
AgentMeter [candidate] (11.342 ms) : 0, 11342
GlobalTracer [baseline] (239.926 ms) : 0, 239926
GlobalTracer [candidate] (238.267 ms) : 0, 238267
IAST [baseline] (26.018 ms) : 0, 26018
IAST [candidate] (26.633 ms) : 0, 26633
AppSec [baseline] (32.525 ms) : 0, 32525
AppSec [candidate] (31.145 ms) : 0, 31145
Debugger [baseline] (58.801 ms) : 0, 58801
Debugger [candidate] (58.525 ms) : 0, 58525
Remote Config [baseline] (543.211 µs) : 0, 543
Remote Config [candidate] (1.145 ms) : 0, 1145
Telemetry [baseline] (13.074 ms) : 0, 13074
Telemetry [candidate] (13.345 ms) : 0, 13345
Flare Poller [baseline] (3.472 ms) : 0, 3472
Flare Poller [candidate] (3.443 ms) : 0, 3443
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~2e8c45924b, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1053785
Total [baseline] (11.048 s) : 0, 11048395
Agent [candidate] (1.056 s) : 0, 1056047
Total [candidate] (11.008 s) : 0, 11008450
section appsec
Agent [baseline] (1.246 s) : 0, 1245795
Total [baseline] (11.081 s) : 0, 11080665
Agent [candidate] (1.264 s) : 0, 1264014
Total [candidate] (11.15 s) : 0, 11149725
section iast
Agent [baseline] (1.23 s) : 0, 1230097
Total [baseline] (11.232 s) : 0, 11231710
Agent [candidate] (1.221 s) : 0, 1220636
Total [candidate] (4.518 s) : 0, 4517665
section profiling
Agent [baseline] (1.196 s) : 0, 1195912
Total [baseline] (11.161 s) : 0, 11161186
Agent [candidate] (1.183 s) : 0, 1182578
Total [candidate] (11.049 s) : 0, 11048816
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~2e8c45924b, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.231 ms) : 0, 1231
crashtracking [candidate] (1.218 ms) : 0, 1218
BytebuddyAgent [baseline] (632.642 ms) : 0, 632642
BytebuddyAgent [candidate] (631.398 ms) : 0, 631398
AgentMeter [baseline] (29.322 ms) : 0, 29322
AgentMeter [candidate] (29.408 ms) : 0, 29408
GlobalTracer [baseline] (248.447 ms) : 0, 248447
GlobalTracer [candidate] (249.012 ms) : 0, 249012
AppSec [baseline] (32.064 ms) : 0, 32064
AppSec [candidate] (32.386 ms) : 0, 32386
Debugger [baseline] (60.107 ms) : 0, 60107
Debugger [candidate] (60.326 ms) : 0, 60326
Remote Config [baseline] (599.044 µs) : 0, 599
Remote Config [candidate] (595.267 µs) : 0, 595
Telemetry [baseline] (8.1 ms) : 0, 8100
Telemetry [candidate] (8.101 ms) : 0, 8101
Flare Poller [baseline] (5.133 ms) : 0, 5133
Flare Poller [candidate] (7.478 ms) : 0, 7478
section appsec
crashtracking [baseline] (1.234 ms) : 0, 1234
crashtracking [candidate] (1.255 ms) : 0, 1255
BytebuddyAgent [baseline] (659.575 ms) : 0, 659575
BytebuddyAgent [candidate] (674.207 ms) : 0, 674207
AgentMeter [baseline] (11.994 ms) : 0, 11994
AgentMeter [candidate] (12.247 ms) : 0, 12247
GlobalTracer [baseline] (247.954 ms) : 0, 247954
GlobalTracer [candidate] (250.271 ms) : 0, 250271
IAST [baseline] (24.639 ms) : 0, 24639
IAST [candidate] (24.665 ms) : 0, 24665
AppSec [baseline] (185.14 ms) : 0, 185140
AppSec [candidate] (185.34 ms) : 0, 185340
Debugger [baseline] (66.131 ms) : 0, 66131
Debugger [candidate] (66.26 ms) : 0, 66260
Remote Config [baseline] (608.232 µs) : 0, 608
Remote Config [candidate] (613.49 µs) : 0, 613
Telemetry [baseline] (8.589 ms) : 0, 8589
Telemetry [candidate] (8.749 ms) : 0, 8749
Flare Poller [baseline] (3.591 ms) : 0, 3591
Flare Poller [candidate] (3.636 ms) : 0, 3636
section iast
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.208 ms) : 0, 1208
BytebuddyAgent [baseline] (805.092 ms) : 0, 805092
BytebuddyAgent [candidate] (800.29 ms) : 0, 800290
AgentMeter [baseline] (11.61 ms) : 0, 11610
AgentMeter [candidate] (11.353 ms) : 0, 11353
GlobalTracer [baseline] (240.097 ms) : 0, 240097
GlobalTracer [candidate] (238.458 ms) : 0, 238458
IAST [baseline] (25.986 ms) : 0, 25986
IAST [candidate] (25.626 ms) : 0, 25626
AppSec [baseline] (31.074 ms) : 0, 31074
AppSec [candidate] (33.654 ms) : 0, 33654
Debugger [baseline] (61.748 ms) : 0, 61748
Debugger [candidate] (54.923 ms) : 0, 54923
Remote Config [baseline] (538.721 µs) : 0, 539
Remote Config [candidate] (504.535 µs) : 0, 505
Telemetry [baseline] (12.665 ms) : 0, 12665
Telemetry [candidate] (13.607 ms) : 0, 13607
Flare Poller [baseline] (3.447 ms) : 0, 3447
Flare Poller [candidate] (3.409 ms) : 0, 3409
section profiling
crashtracking [baseline] (1.197 ms) : 0, 1197
crashtracking [candidate] (1.182 ms) : 0, 1182
BytebuddyAgent [baseline] (697.067 ms) : 0, 697067
BytebuddyAgent [candidate] (690.711 ms) : 0, 690711
AgentMeter [baseline] (9.19 ms) : 0, 9190
AgentMeter [candidate] (9.108 ms) : 0, 9108
GlobalTracer [baseline] (209.208 ms) : 0, 209208
GlobalTracer [candidate] (207.063 ms) : 0, 207063
AppSec [baseline] (32.954 ms) : 0, 32954
AppSec [candidate] (32.445 ms) : 0, 32445
Debugger [baseline] (66.518 ms) : 0, 66518
Debugger [candidate] (65.241 ms) : 0, 65241
Remote Config [baseline] (584.774 µs) : 0, 585
Remote Config [candidate] (566.908 µs) : 0, 567
Telemetry [baseline] (7.907 ms) : 0, 7907
Telemetry [candidate] (7.839 ms) : 0, 7839
Flare Poller [baseline] (3.604 ms) : 0, 3604
Flare Poller [candidate] (3.629 ms) : 0, 3629
ProfilingAgent [baseline] (95.926 ms) : 0, 95926
ProfilingAgent [candidate] (93.627 ms) : 0, 93627
Profiling [baseline] (96.53 ms) : 0, 96530
Profiling [candidate] (94.183 ms) : 0, 94183
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 20 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~2e8c45924b, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section baseline
no_agent (19.341 ms) : 19148, 19533
. : milestone, 19341,
appsec (18.752 ms) : 18561, 18944
. : milestone, 18752,
code_origins (17.742 ms) : 17565, 17920
. : milestone, 17742,
iast (17.839 ms) : 17667, 18012
. : milestone, 17839,
profiling (18.341 ms) : 18160, 18522
. : milestone, 18341,
tracing (17.951 ms) : 17772, 18130
. : milestone, 17951,
section candidate
no_agent (18.255 ms) : 18067, 18442
. : milestone, 18255,
appsec (18.742 ms) : 18550, 18934
. : milestone, 18742,
code_origins (18.014 ms) : 17832, 18197
. : milestone, 18014,
iast (17.938 ms) : 17758, 18118
. : milestone, 17938,
profiling (18.429 ms) : 18248, 18611
. : milestone, 18429,
tracing (17.747 ms) : 17572, 17921
. : milestone, 17747,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~2e8c45924b, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section baseline
no_agent (1.245 ms) : 1233, 1257
. : milestone, 1245,
iast (3.314 ms) : 3271, 3358
. : milestone, 3314,
iast_FULL (6.067 ms) : 6005, 6129
. : milestone, 6067,
iast_GLOBAL (3.599 ms) : 3547, 3652
. : milestone, 3599,
profiling (2.407 ms) : 2383, 2431
. : milestone, 2407,
tracing (1.911 ms) : 1895, 1927
. : milestone, 1911,
section candidate
no_agent (1.247 ms) : 1235, 1259
. : milestone, 1247,
iast (3.365 ms) : 3314, 3416
. : milestone, 3365,
iast_FULL (5.994 ms) : 5934, 6055
. : milestone, 5994,
iast_GLOBAL (3.721 ms) : 3656, 3786
. : milestone, 3721,
profiling (2.301 ms) : 2276, 2325
. : milestone, 2301,
tracing (1.905 ms) : 1888, 1922
. : milestone, 1905,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 1 unstable metrics.
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~2e8c45924b, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section baseline
no_agent (1.485 ms) : 1473, 1496
. : milestone, 1485,
appsec (3.841 ms) : 3618, 4063
. : milestone, 3841,
iast (2.287 ms) : 2216, 2358
. : milestone, 2287,
iast_GLOBAL (2.323 ms) : 2253, 2394
. : milestone, 2323,
profiling (2.516 ms) : 2357, 2675
. : milestone, 2516,
tracing (2.079 ms) : 2025, 2133
. : milestone, 2079,
section candidate
no_agent (1.488 ms) : 1476, 1500
. : milestone, 1488,
appsec (2.527 ms) : 2472, 2582
. : milestone, 2527,
iast (2.274 ms) : 2204, 2345
. : milestone, 2274,
iast_GLOBAL (2.316 ms) : 2246, 2386
. : milestone, 2316,
profiling (2.106 ms) : 2051, 2162
. : milestone, 2106,
tracing (2.082 ms) : 2028, 2136
. : milestone, 2082,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~2e8c45924b, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section baseline
no_agent (14.872 s) : 14872000, 14872000
. : milestone, 14872000,
appsec (14.609 s) : 14609000, 14609000
. : milestone, 14609000,
iast (18.334 s) : 18334000, 18334000
. : milestone, 18334000,
iast_GLOBAL (18.11 s) : 18110000, 18110000
. : milestone, 18110000,
profiling (14.979 s) : 14979000, 14979000
. : milestone, 14979000,
tracing (14.868 s) : 14868000, 14868000
. : milestone, 14868000,
section candidate
no_agent (15.45 s) : 15450000, 15450000
. : milestone, 15450000,
appsec (14.866 s) : 14866000, 14866000
. : milestone, 14866000,
iast (18.435 s) : 18435000, 18435000
. : milestone, 18435000,
iast_GLOBAL (18.146 s) : 18146000, 18146000
. : milestone, 18146000,
profiling (15.146 s) : 15146000, 15146000
. : milestone, 15146000,
tracing (15.049 s) : 15049000, 15049000
. : milestone, 15049000,
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Add assertions for messaging.kafka.cluster.id, partition, and offset tags that are now set on producer and consumer spans. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
d36f7e7
into
master
Summary
messaging.kafka.cluster.idtag to both producer and consumer Kafka spans, always (not gated on Data Streams)partitionandoffsettags to producer spans via the async callback (usingRecordMetadata)partitionandoffset; no change thereisDataStreamsEnabled()guard fromextractClusterId()inKafkaConsumerInstrumentationHelper(both 0.11 and 3.8 modules)MetadataStateinProducerConstructorAdviceso cluster ID is available at produce time regardless of DSM configThese tags enable linking a trace span directly to a specific Kafka message (cluster + topic + partition + offset).
Notes
Futurewill not have the offset tagkafka-clients-0.11andkafka-clients-3.8modules updated in parallelTest plan
Used a test application to verify the tags were present on the spans.
tag: no release note
tag: ai generated
🤖 Generated with Claude Code