GeezerVison is showing github.com — Fix swapped topic and group tags on Kafka Streams Data Streams metrics by johannbotha · Pull Request #13671 · DataDog/dd-trace-java
Conversation
johannbotha
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
What Does This Do
Puts the record's topic in topic and the application id in group on Kafka Streams DSM consume checkpoints. Both advices (kafka-streams before 2.7 and 2.7+) passed them to DataStreamsTags.createWithGroup(type, direction, topic, group) in the wrong order.
The production change is that argument swap on one line, applied at both call sites (KafkaStreamTaskInstrumentation.java:301 and :368). The rest of the diff is tests.
Motivation
Since v1.52.0 (#9151), Kafka Streams apps report data_streams.* metrics with topic:<application.id> and group:<topic>. Dashboards and monitors filtering on topic miss these series and the DSM map shows the wrong nodes. Latency values are correct. Pathway hashes for Kafka Streams consumers change again with this fix.
Additional Notes
The existing DSM assertions for Kafka Streams never ran in blocking CI: the 0.11 test is @Ignored and the latest-deps class was @Flaky as a whole (#3865). This adds a focused consume-checkpoint test to both suites and narrows @Flaky to the old feature, so the new test runs. With the fix reverted, all six new test runs fail with topic:test-application, group:test.pending; with it, they pass.
Contributor Checklist
Linear ticket: DSM2-897
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] and datadog-datadog-prod-us1[bot] reacted with thumbs up emoji
createWithGroup takes (type, direction, topic, group) but both Kafka Streams
advices passed the application id as the topic and the record topic as the
group, so data_streams.* metrics from Kafka Streams consumers had the two
tags swapped since v1.52.0.
The existing DSM assertions for Kafka Streams sit in an @ignore'd test
(kafka-streams 0.11) and a class-level @flaky test (latest deps), so neither
runs in blocking CI. Add a focused consume-checkpoint test to both suites and
narrow @flaky to the feature it was meant for.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
🟡 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:insecure-bank:iast:Agent |
13.99 s |
14.02 s |
[-0.8%; +0.4%] (no difference) |
| startup:insecure-bank:tracing:Agent |
12.87 s |
13.01 s |
[-1.6%; -0.5%] (maybe better) |
| startup:petclinic:appsec:Agent |
17.84 s |
17.82 s |
[-0.8%; +1.0%] (no difference) |
| startup:petclinic:iast:Agent |
17.72 s |
17.74 s |
[-1.0%; +0.7%] (no difference) |
| startup:petclinic:profiling:Agent |
17.52 s |
17.21 s |
[+0.5%; +3.2%] (maybe worse) |
| startup:petclinic:sca:Agent |
17.78 s |
17.82 s |
[-1.0%; +0.5%] (no difference) |
| startup:petclinic:tracing:Agent |
16.44 s |
16.96 s |
[-7.4%; +1.3%] (no difference) |
Commit: 94a9b8ca · 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🎯 Code Coverage (details) • Patch Coverage: 100.00% • Overall Coverage: 68.82% (+7.61%)
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 94a9b8c | Docs | Give us feedback!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-24T21:43:29.822824Z |
94a9b8c |
Draft marked ready |
| 🔒 Security Review |
✅ Completed 2026-11-24T21:44:12.654832Z |
94a9b8c |
Draft marked ready |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Hi! 👋 Thanks for your pull request! 🎉
To help us review it, please make sure to:
- Add at least one type, and one component or instrumentation label to the pull request
If you need help, please check our contributing guidelines.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

More details
Both Kafka Streams advice paths now match the tag factory’s topic/group argument order, and the added regression assertions check those values separately. The static reviewer returned no actionable findings.
Was this helpful? React 👍 or 👎
Open Bits AI session
🤖 Bits Code Review · Commit 94a9b8c
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Kafka / producer-benchmark
Parameters
|
Baseline |
Candidate |
| baseline_or_candidate |
baseline |
candidate |
| git_branch |
master |
jj.botha/fix-kafka-streams-dsm-topic-group-swap |
| git_commit_date |
1795544459 |
1795554792 |
| git_commit_sha |
8437585 |
94a9b8c |
See matching parameters
|
Baseline |
Candidate |
| ci_job_date |
1795556073 |
1795556073 |
| ci_job_id |
2298440088 |
2298440088 |
| ci_pipeline_id |
156351727 |
156351727 |
| cpu_model |
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz |
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz |
| jdkVersion |
11.0.31 |
11.0.31 |
| jmhVersion |
1.36 |
1.36 |
| jvm |
/usr/lib/jvm/java-11-openjdk-amd64/bin/java |
/usr/lib/jvm/java-11-openjdk-amd64/bin/java |
| jvmArgs |
-Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=15002 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=15002 -Dhttp.nonProxyHosts=localhost |
*.localhost |
| kernel_version |
Linux runner-zfyrx7zua-project-304-concurrent-1-t5s7nk20 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-t5s7nk20 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 |
| vmName |
OpenJDK 64-Bit Server VM |
OpenJDK 64-Bit Server VM |
| vmVersion |
11.0.31+11-post-1ubuntu1-22.04.2-Ubuntu |
11.0.31+11-post-1ubuntu1-22.04.2-Ubuntu |
Summary
Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.
See unchanged results
| scenario |
Δ mean throughput |
| scenario:not-instrumented/KafkaProduceBenchmark.benchProduce |
same |
| scenario:only-tracing-dsm-disabled-benchmarks/KafkaProduceBenchmark.benchProduce |
same |
| scenario:only-tracing-dsm-enabled-benchmarks/KafkaProduceBenchmark.benchProduce |
same |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Kafka / consumer-benchmark
Parameters
|
Baseline |
Candidate |
| baseline_or_candidate |
baseline |
candidate |
| git_branch |
master |
jj.botha/fix-kafka-streams-dsm-topic-group-swap |
| git_commit_date |
1795544459 |
1795554792 |
| git_commit_sha |
8437585 |
94a9b8c |
See matching parameters
|
Baseline |
Candidate |
| ci_job_date |
1795556016 |
1795556016 |
| ci_job_id |
2298440089 |
2298440089 |
| ci_pipeline_id |
156351727 |
156351727 |
| cpu_model |
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz |
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz |
| jdkVersion |
11.0.31 |
11.0.31 |
| jmhVersion |
1.36 |
1.36 |
| jvm |
/usr/lib/jvm/java-11-openjdk-amd64/bin/java |
/usr/lib/jvm/java-11-openjdk-amd64/bin/java |
| jvmArgs |
-Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=15002 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=15002 -Dhttp.nonProxyHosts=localhost |
*.localhost |
| kernel_version |
Linux runner-zfyrx7zua-project-304-concurrent-1-dhdwqeks 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-dhdwqeks 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 |
| vmName |
OpenJDK 64-Bit Server VM |
OpenJDK 64-Bit Server VM |
| vmVersion |
11.0.31+11-post-1ubuntu1-22.04.2-Ubuntu |
11.0.31+11-post-1ubuntu1-22.04.2-Ubuntu |
Summary
Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.
See unchanged results
| scenario |
Δ mean throughput |
| scenario:not-instrumented/KafkaConsumerBenchmark.benchConsume |
same |
| scenario:only-tracing-dsm-disabled-benchmarks/KafkaConsumerBenchmark.benchConsume |
same |
| scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume |
same |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
View all feedbacks in Devflow UI.
2026-11-24 22:07:41 UTC ℹ️ Start processing command /merge
2026-11-24 22:07:52 UTC ℹ️ MergeQueue: Pull request is not mergeable yet
It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.
- Run
/code blockers to see what is blocking it.
- Run
/remove to cancel it.
2026-11-24 22:10:17 UTC ℹ️ MergeQueue: merge request added to the queue
The expected merge time in master is approximately 1h (p90).
2026-11-24 22:54:55 UTC ℹ️ MergeQueue: This merge request was merged
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|