Commit 9aedff2
authored
Efficient Trace Payload Protocol (v1 protocol) (#10801)
# What Does This Do
- Implements support for the Datadog Agent Efficient Trace Payload Protocol `v1.0` (`v1.0/traces` endpoint) in the Java tracer.
- Introduces `TraceMapperV1`, a new serializer that encodes traces in the `v1 msgpack` format with a flat attribute model, string table deduplication, and typed attribute values.
- Adds a `ProtocolVersion` enum to cleanly represent `v0.4`, `v0.5`, and `v1.0` protocols including their fallback endpoint chains.
- Updates `DDAgentFeaturesDiscovery` to probe endpoints based on the configured protocol version.
# Motivation
Protocol v1 is a more efficient wire format: it deduplicates repeated strings via a string table, uses typed attribute values (string/bool/float/int/bytes/array). This reduces payload size and provides a cleaner foundation for future span model evolution. The implementation falls back gracefully to `v0.4` when the agent does not advertise `v1` support.
# Additional Notes
Protocol v1 [spec](https://docs.google.com/document/d/1hNS6anKYutOYW-nmR759UlKXUdT6H0mRwVt7_L70ESc/edit?pli=1&tab=t.0#heading=h.sf675dts2e4d)
System test passed both on GitHub and GitLab.
Co-authored-by: alexey.kuznetsov <alexey.kuznetsov@datadoghq.com>1 parent d4d2069 commit 9aedff2
51 files changed
Lines changed: 4068 additions & 292 deletions
File tree
- communication/src
- main/java/datadog/communication
- ddagent
- serialization
- msgpack
- test
- groovy/datadog/communication/ddagent
- java/datadog/communication/serialization/msgpack
- resources/agent-features
- dd-java-agent
- appsec/src/jmh/java/datadog/appsec/benchmark
- instrumentation-testing/src/main/groovy/datadog/trace/agent/test
- datastreams
- instrumentation/graal/graal-native-image-20.0/src/main/java/datadog/trace/instrumentation/graal/nativeimage
- src/test/java/datadog/test
- dd-smoke-tests
- apm-tracing-disabled/src/test/groovy/datadog/smoketest/apmtracingdisabled
- src/main/groovy/datadog/smoketest
- dd-trace-api/src
- main/java/datadog/trace/api
- config
- test/java/datadog/trace/api
- dd-trace-core/src
- jmh/java/datadog/trace
- common/metrics
- core
- main/java/datadog/trace
- common/writer
- ddagent
- core
- test/groovy/datadog/trace
- common
- metrics
- writer
- ddagent
- traceAgentTest/groovy
- internal-api/src/main/java/datadog/trace/api
- metadata
- utils/test-agent-utils/decoder/src
- main/java/datadog/trace/test/agent/decoder
- v1/raw
- test
- java/datadog/trace/test/agent/decoder
- resources
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | | - | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| |||
Lines changed: 47 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | | - | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
83 | 105 | | |
84 | 106 | | |
85 | 107 | | |
86 | 108 | | |
87 | 109 | | |
88 | | - | |
| 110 | + | |
89 | 111 | | |
90 | 112 | | |
91 | 113 | | |
| |||
111 | 133 | | |
112 | 134 | | |
113 | 135 | | |
114 | | - | |
| 136 | + | |
115 | 137 | | |
116 | 138 | | |
117 | 139 | | |
| |||
139 | 161 | | |
140 | 162 | | |
141 | 163 | | |
142 | | - | |
| 164 | + | |
143 | 165 | | |
144 | 166 | | |
145 | 167 | | |
| |||
157 | 179 | | |
158 | 180 | | |
159 | 181 | | |
160 | | - | |
| 182 | + | |
161 | 183 | | |
162 | 184 | | |
163 | 185 | | |
| |||
176 | 198 | | |
177 | 199 | | |
178 | 200 | | |
179 | | - | |
| 201 | + | |
180 | 202 | | |
181 | 203 | | |
182 | 204 | | |
| |||
190 | 212 | | |
191 | 213 | | |
192 | 214 | | |
193 | | - | |
| 215 | + | |
194 | 216 | | |
195 | 217 | | |
196 | 218 | | |
| |||
212 | 234 | | |
213 | 235 | | |
214 | 236 | | |
215 | | - | |
| 237 | + | |
216 | 238 | | |
217 | 239 | | |
218 | 240 | | |
| |||
234 | 256 | | |
235 | 257 | | |
236 | 258 | | |
237 | | - | |
| 259 | + | |
238 | 260 | | |
239 | 261 | | |
240 | 262 | | |
| |||
254 | 276 | | |
255 | 277 | | |
256 | 278 | | |
257 | | - | |
| 279 | + | |
258 | 280 | | |
259 | 281 | | |
260 | 282 | | |
| |||
275 | 297 | | |
276 | 298 | | |
277 | 299 | | |
278 | | - | |
| 300 | + | |
279 | 301 | | |
280 | 302 | | |
281 | 303 | | |
| |||
296 | 318 | | |
297 | 319 | | |
298 | 320 | | |
299 | | - | |
| 321 | + | |
300 | 322 | | |
301 | 323 | | |
302 | 324 | | |
| |||
318 | 340 | | |
319 | 341 | | |
320 | 342 | | |
321 | | - | |
| 343 | + | |
322 | 344 | | |
323 | 345 | | |
324 | 346 | | |
| |||
354 | 376 | | |
355 | 377 | | |
356 | 378 | | |
357 | | - | |
| 379 | + | |
358 | 380 | | |
359 | 381 | | |
360 | 382 | | |
| |||
382 | 404 | | |
383 | 405 | | |
384 | 406 | | |
385 | | - | |
| 407 | + | |
386 | 408 | | |
387 | 409 | | |
388 | 410 | | |
| |||
411 | 433 | | |
412 | 434 | | |
413 | 435 | | |
414 | | - | |
| 436 | + | |
415 | 437 | | |
416 | 438 | | |
417 | 439 | | |
| |||
441 | 463 | | |
442 | 464 | | |
443 | 465 | | |
444 | | - | |
| 466 | + | |
445 | 467 | | |
446 | 468 | | |
447 | 469 | | |
| |||
458 | 480 | | |
459 | 481 | | |
460 | 482 | | |
461 | | - | |
| 483 | + | |
462 | 484 | | |
463 | 485 | | |
464 | 486 | | |
| |||
477 | 499 | | |
478 | 500 | | |
479 | 501 | | |
480 | | - | |
| 502 | + | |
481 | 503 | | |
482 | 504 | | |
483 | 505 | | |
| |||
510 | 532 | | |
511 | 533 | | |
512 | 534 | | |
513 | | - | |
| 535 | + | |
514 | 536 | | |
515 | 537 | | |
516 | 538 | | |
| |||
544 | 566 | | |
545 | 567 | | |
546 | 568 | | |
547 | | - | |
| 569 | + | |
548 | 570 | | |
549 | 571 | | |
550 | 572 | | |
| |||
570 | 592 | | |
571 | 593 | | |
572 | 594 | | |
573 | | - | |
| 595 | + | |
574 | 596 | | |
575 | 597 | | |
576 | 598 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
10 | | - | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments