Commit fa36eb1
fix(kafkajs): include kafka_cluster_id in DSM backlog offset tracking (#7569)
* fix(kafkajs): include kafka_cluster_id in DSM backlog offset tracking
DSM checkpoints correctly included kafka_cluster_id in edge tags, but
the backlog/offset tracking (which feeds lag metrics like
data_streams.kafka.lag_messages and data_streams.kafka.lag_seconds) did
not. This caused cross-cluster offset mixing when the same topic exists
on multiple Kafka clusters, producing wildly incorrect lag values.
Thread clusterId through to setOffset calls for both producer and
consumer commit paths so that backlog entries are scoped per cluster.
DSMON-1226
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(kafkajs): add comments explaining clusterIdAvailable version guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test(kafkajs): remove irrelevant comment from getDsmPathwayHash
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(kafkajs): add comment explaining resolvedClusterId safety
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent ef2b498 commit fa36eb1
File tree
4 files changed
+47
-26
lines changed- packages
- datadog-instrumentations/src
- datadog-plugin-kafkajs
- src
- test
4 files changed
+47
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 27 | | |
44 | 28 | | |
45 | 29 | | |
| |||
132 | 116 | | |
133 | 117 | | |
134 | 118 | | |
| 119 | + | |
135 | 120 | | |
136 | 121 | | |
137 | 122 | | |
| |||
146 | 131 | | |
147 | 132 | | |
148 | 133 | | |
149 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
68 | | - | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
323 | | - | |
324 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
325 | 334 | | |
326 | 335 | | |
327 | 336 | | |
| |||
0 commit comments