Skip to content

Protocol v1#10801

Open
AlexeyKuznetsov-DD wants to merge 80 commits intomasterfrom
alexeyk/protocol-v1-1
Open

Protocol v1#10801
AlexeyKuznetsov-DD wants to merge 80 commits intomasterfrom
alexeyk/protocol-v1-1

Conversation

@AlexeyKuznetsov-DD
Copy link
Copy Markdown
Contributor

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Mar 10, 2026

What Does This Do

  • Implements support for the Datadog Agent Trace 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
    System test passed both on GitHub and GitLab.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Mar 10, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added tag: do not merge Do not merge changes comp: core Tracer core labels Mar 10, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 11, 2026

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/protocol-v1-1
git_commit_date 1776707964 1776710480
git_commit_sha 6e28457 a57ea33
release_version 1.62.0-SNAPSHOT~6e28457d70 1.61.0-SNAPSHOT~a57ea33954
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1776712359 1776712359
ci_job_id 1612382329 1612382329
ci_pipeline_id 108632507 108632507
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-gn5n1cly 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-gn5n1cly 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 0 performance improvements and 0 performance regressions! Performance is the same for 62 metrics, 9 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~a57ea33954, baseline=1.62.0-SNAPSHOT~6e28457d70

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.059 s) : 0, 1058709
Total [baseline] (8.851 s) : 0, 8850731
Agent [candidate] (1.056 s) : 0, 1055678
Total [candidate] (8.844 s) : 0, 8844418
section iast
Agent [baseline] (1.229 s) : 0, 1229415
Total [baseline] (9.539 s) : 0, 9539224
Agent [candidate] (1.233 s) : 0, 1233262
Total [candidate] (9.541 s) : 0, 9540691
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent iast 1.229 s 170.705 ms (16.1%)
Total tracing 8.851 s -
Total iast 9.539 s 688.493 ms (7.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent iast 1.233 s 177.584 ms (16.8%)
Total tracing 8.844 s -
Total iast 9.541 s 696.273 ms (7.9%)
gantt
    title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~a57ea33954, baseline=1.62.0-SNAPSHOT~6e28457d70

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.235 ms) : 0, 1235
crashtracking [candidate] (1.238 ms) : 0, 1238
BytebuddyAgent [baseline] (632.932 ms) : 0, 632932
BytebuddyAgent [candidate] (632.211 ms) : 0, 632211
AgentMeter [baseline] (29.497 ms) : 0, 29497
AgentMeter [candidate] (29.296 ms) : 0, 29296
GlobalTracer [baseline] (249.001 ms) : 0, 249001
GlobalTracer [candidate] (248.638 ms) : 0, 248638
AppSec [baseline] (32.429 ms) : 0, 32429
AppSec [candidate] (32.291 ms) : 0, 32291
Debugger [baseline] (58.974 ms) : 0, 58974
Debugger [candidate] (59.785 ms) : 0, 59785
Remote Config [baseline] (586.419 µs) : 0, 586
Remote Config [candidate] (606.701 µs) : 0, 607
Telemetry [baseline] (7.982 ms) : 0, 7982
Telemetry [candidate] (8.041 ms) : 0, 8041
Flare Poller [baseline] (9.829 ms) : 0, 9829
Flare Poller [candidate] (7.422 ms) : 0, 7422
section iast
crashtracking [baseline] (1.228 ms) : 0, 1228
crashtracking [candidate] (1.236 ms) : 0, 1236
BytebuddyAgent [baseline] (808.754 ms) : 0, 808754
BytebuddyAgent [candidate] (810.446 ms) : 0, 810446
AgentMeter [baseline] (11.402 ms) : 0, 11402
AgentMeter [candidate] (11.487 ms) : 0, 11487
GlobalTracer [baseline] (238.675 ms) : 0, 238675
GlobalTracer [candidate] (240.22 ms) : 0, 240220
AppSec [baseline] (27.382 ms) : 0, 27382
AppSec [candidate] (26.778 ms) : 0, 26778
Debugger [baseline] (63.692 ms) : 0, 63692
Debugger [candidate] (65.342 ms) : 0, 65342
Remote Config [baseline] (538.459 µs) : 0, 538
Remote Config [candidate] (528.661 µs) : 0, 529
Telemetry [baseline] (7.732 ms) : 0, 7732
Telemetry [candidate] (7.754 ms) : 0, 7754
Flare Poller [baseline] (3.451 ms) : 0, 3451
Flare Poller [candidate] (3.411 ms) : 0, 3411
IAST [baseline] (29.7 ms) : 0, 29700
IAST [candidate] (28.371 ms) : 0, 28371
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~a57ea33954, baseline=1.62.0-SNAPSHOT~6e28457d70

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.069 s) : 0, 1068690
Total [baseline] (11.162 s) : 0, 11161580
Agent [candidate] (1.059 s) : 0, 1059018
Total [candidate] (11.017 s) : 0, 11017181
section appsec
Agent [baseline] (1.269 s) : 0, 1268623
Total [baseline] (11.034 s) : 0, 11034231
Agent [candidate] (1.262 s) : 0, 1261636
Total [candidate] (11.036 s) : 0, 11036066
section iast
Agent [baseline] (1.231 s) : 0, 1230550
Total [baseline] (11.283 s) : 0, 11283224
Agent [candidate] (1.23 s) : 0, 1230483
Total [candidate] (11.314 s) : 0, 11314090
section profiling
Agent [baseline] (1.183 s) : 0, 1182584
Total [baseline] (10.964 s) : 0, 10963734
Agent [candidate] (1.186 s) : 0, 1186405
Total [candidate] (10.961 s) : 0, 10960775
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.069 s -
Agent appsec 1.269 s 199.933 ms (18.7%)
Agent iast 1.231 s 161.86 ms (15.1%)
Agent profiling 1.183 s 113.894 ms (10.7%)
Total tracing 11.162 s -
Total appsec 11.034 s -127.348 ms (-1.1%)
Total iast 11.283 s 121.644 ms (1.1%)
Total profiling 10.964 s -197.846 ms (-1.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent appsec 1.262 s 202.618 ms (19.1%)
Agent iast 1.23 s 171.465 ms (16.2%)
Agent profiling 1.186 s 127.388 ms (12.0%)
Total tracing 11.017 s -
Total appsec 11.036 s 18.884 ms (0.2%)
Total iast 11.314 s 296.909 ms (2.7%)
Total profiling 10.961 s -56.406 ms (-0.5%)
gantt
    title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~a57ea33954, baseline=1.62.0-SNAPSHOT~6e28457d70

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.239 ms) : 0, 1239
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (638.462 ms) : 0, 638462
BytebuddyAgent [candidate] (632.467 ms) : 0, 632467
AgentMeter [baseline] (29.788 ms) : 0, 29788
AgentMeter [candidate] (29.37 ms) : 0, 29370
GlobalTracer [baseline] (250.903 ms) : 0, 250903
GlobalTracer [candidate] (248.428 ms) : 0, 248428
AppSec [baseline] (32.68 ms) : 0, 32680
AppSec [candidate] (32.351 ms) : 0, 32351
Debugger [baseline] (60.568 ms) : 0, 60568
Debugger [candidate] (60.593 ms) : 0, 60593
Remote Config [baseline] (594.997 µs) : 0, 595
Remote Config [candidate] (592.648 µs) : 0, 593
Telemetry [baseline] (8.134 ms) : 0, 8134
Telemetry [candidate] (8.774 ms) : 0, 8774
Flare Poller [baseline] (10.051 ms) : 0, 10051
Flare Poller [candidate] (8.978 ms) : 0, 8978
section appsec
crashtracking [baseline] (1.245 ms) : 0, 1245
crashtracking [candidate] (1.241 ms) : 0, 1241
BytebuddyAgent [baseline] (678.554 ms) : 0, 678554
BytebuddyAgent [candidate] (674.186 ms) : 0, 674186
AgentMeter [baseline] (12.206 ms) : 0, 12206
AgentMeter [candidate] (12.181 ms) : 0, 12181
GlobalTracer [baseline] (250.409 ms) : 0, 250409
GlobalTracer [candidate] (248.967 ms) : 0, 248967
AppSec [baseline] (185.975 ms) : 0, 185975
AppSec [candidate] (185.615 ms) : 0, 185615
Debugger [baseline] (67.296 ms) : 0, 67296
Debugger [candidate] (66.757 ms) : 0, 66757
Remote Config [baseline] (565.61 µs) : 0, 566
Remote Config [candidate] (573.245 µs) : 0, 573
Telemetry [baseline] (7.902 ms) : 0, 7902
Telemetry [candidate] (7.857 ms) : 0, 7857
Flare Poller [baseline] (3.475 ms) : 0, 3475
Flare Poller [candidate] (3.427 ms) : 0, 3427
IAST [baseline] (24.438 ms) : 0, 24438
IAST [candidate] (24.335 ms) : 0, 24335
section iast
crashtracking [baseline] (1.241 ms) : 0, 1241
crashtracking [candidate] (1.232 ms) : 0, 1232
BytebuddyAgent [baseline] (807.828 ms) : 0, 807828
BytebuddyAgent [candidate] (807.219 ms) : 0, 807219
AgentMeter [baseline] (11.412 ms) : 0, 11412
AgentMeter [candidate] (11.412 ms) : 0, 11412
GlobalTracer [baseline] (238.756 ms) : 0, 238756
GlobalTracer [candidate] (239.082 ms) : 0, 239082
AppSec [baseline] (27.595 ms) : 0, 27595
AppSec [candidate] (28.553 ms) : 0, 28553
Debugger [baseline] (65.03 ms) : 0, 65030
Debugger [candidate] (63.482 ms) : 0, 63482
Remote Config [baseline] (536.8 µs) : 0, 537
Remote Config [candidate] (545.63 µs) : 0, 546
Telemetry [baseline] (7.767 ms) : 0, 7767
Telemetry [candidate] (7.797 ms) : 0, 7797
Flare Poller [baseline] (3.445 ms) : 0, 3445
Flare Poller [candidate] (3.393 ms) : 0, 3393
IAST [baseline] (30.742 ms) : 0, 30742
IAST [candidate] (30.16 ms) : 0, 30160
section profiling
ProfilingAgent [baseline] (94.255 ms) : 0, 94255
ProfilingAgent [candidate] (93.675 ms) : 0, 93675
crashtracking [baseline] (1.185 ms) : 0, 1185
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (689.652 ms) : 0, 689652
BytebuddyAgent [candidate] (692.988 ms) : 0, 692988
AgentMeter [baseline] (9.154 ms) : 0, 9154
AgentMeter [candidate] (9.247 ms) : 0, 9247
GlobalTracer [baseline] (206.537 ms) : 0, 206537
GlobalTracer [candidate] (207.149 ms) : 0, 207149
AppSec [baseline] (32.724 ms) : 0, 32724
AppSec [candidate] (32.738 ms) : 0, 32738
Debugger [baseline] (66.01 ms) : 0, 66010
Debugger [candidate] (65.803 ms) : 0, 65803
Remote Config [baseline] (581.308 µs) : 0, 581
Remote Config [candidate] (590.521 µs) : 0, 591
Telemetry [baseline] (7.777 ms) : 0, 7777
Telemetry [candidate] (7.753 ms) : 0, 7753
Flare Poller [baseline] (3.5 ms) : 0, 3500
Flare Poller [candidate] (3.508 ms) : 0, 3508
Profiling [baseline] (94.814 ms) : 0, 94814
Profiling [candidate] (94.238 ms) : 0, 94238
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/protocol-v1-1
git_commit_date 1776707964 1776710480
git_commit_sha 6e28457 a57ea33
release_version 1.62.0-SNAPSHOT~6e28457d70 1.61.0-SNAPSHOT~a57ea33954
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1776712749 1776712749
ci_job_id 1612382330 1612382330
ci_pipeline_id 108632507 108632507
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-2udg0eco 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-2udg0eco 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 1 performance improvements and 3 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_FULL:high_load worse
[+240.719µs; +445.790µs] or [+4.516%; +8.363%]
worse
[+491.654µs; +1145.992µs] or [+3.851%; +8.977%]
unstable
[-114.189op/s; +35.252op/s] or [-14.879%; +4.593%]
5.674ms 13.584ms 727.969op/s 5.331ms 12.766ms 767.438op/s
scenario:load:petclinic:appsec:high_load better
[-1.508ms; -0.703ms] or [-7.716%; -3.599%]
unsure
[-2.080ms; -0.448ms] or [-6.703%; -1.442%]
unstable
[-15.158op/s; +37.595op/s] or [-6.410%; +15.899%]
18.439ms 29.775ms 247.688op/s 19.544ms 31.039ms 236.469op/s
scenario:load:petclinic:no_agent:high_load worse
[+0.448ms; +2.011ms] or [+2.535%; +11.374%]
unstable
[-0.028ms; +3.001ms] or [-0.094%; +10.107%]
unstable
[-43.594op/s; +13.032op/s] or [-17.000%; +5.082%]
18.908ms 31.175ms 241.156op/s 17.679ms 29.688ms 256.438op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~a57ea33954, baseline=1.62.0-SNAPSHOT~6e28457d70
    dateFormat X
    axisFormat %s
section baseline
no_agent (18.201 ms) : 18013, 18390
.   : milestone, 18201,
appsec (19.736 ms) : 19536, 19936
.   : milestone, 19736,
code_origins (18.078 ms) : 17903, 18254
.   : milestone, 18078,
iast (18.163 ms) : 17982, 18344
.   : milestone, 18163,
profiling (18.454 ms) : 18270, 18638
.   : milestone, 18454,
tracing (17.981 ms) : 17801, 18161
.   : milestone, 17981,
section candidate
no_agent (19.354 ms) : 19156, 19553
.   : milestone, 19354,
appsec (18.848 ms) : 18661, 19036
.   : milestone, 18848,
code_origins (18.442 ms) : 18261, 18623
.   : milestone, 18442,
iast (17.972 ms) : 17790, 18154
.   : milestone, 17972,
profiling (18.353 ms) : 18174, 18532
.   : milestone, 18353,
tracing (17.99 ms) : 17813, 18168
.   : milestone, 17990,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.201 ms [18.013 ms, 18.39 ms] -
appsec 19.736 ms [19.536 ms, 19.936 ms] 1.535 ms (8.4%)
code_origins 18.078 ms [17.903 ms, 18.254 ms] -123.049 µs (-0.7%)
iast 18.163 ms [17.982 ms, 18.344 ms] -38.588 µs (-0.2%)
profiling 18.454 ms [18.27 ms, 18.638 ms] 252.342 µs (1.4%)
tracing 17.981 ms [17.801 ms, 18.161 ms] -220.217 µs (-1.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.354 ms [19.156 ms, 19.553 ms] -
appsec 18.848 ms [18.661 ms, 19.036 ms] -506.023 µs (-2.6%)
code_origins 18.442 ms [18.261 ms, 18.623 ms] -912.434 µs (-4.7%)
iast 17.972 ms [17.79 ms, 18.154 ms] -1.383 ms (-7.1%)
profiling 18.353 ms [18.174 ms, 18.532 ms] -1.001 ms (-5.2%)
tracing 17.99 ms [17.813 ms, 18.168 ms] -1.364 ms (-7.0%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~a57ea33954, baseline=1.62.0-SNAPSHOT~6e28457d70
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.317 ms) : 1304, 1331
.   : milestone, 1317,
iast (3.318 ms) : 3275, 3361
.   : milestone, 3318,
iast_FULL (6.026 ms) : 5966, 6087
.   : milestone, 6026,
iast_GLOBAL (3.81 ms) : 3747, 3873
.   : milestone, 3810,
profiling (2.077 ms) : 2058, 2096
.   : milestone, 2077,
tracing (1.95 ms) : 1933, 1967
.   : milestone, 1950,
section candidate
no_agent (1.253 ms) : 1241, 1265
.   : milestone, 1253,
iast (3.459 ms) : 3414, 3504
.   : milestone, 3459,
iast_FULL (6.358 ms) : 6292, 6424
.   : milestone, 6358,
iast_GLOBAL (3.75 ms) : 3688, 3812
.   : milestone, 3750,
profiling (2.049 ms) : 2031, 2068
.   : milestone, 2049,
tracing (1.917 ms) : 1899, 1934
.   : milestone, 1917,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.317 ms [1.304 ms, 1.331 ms] -
iast 3.318 ms [3.275 ms, 3.361 ms] 2.0 ms (151.9%)
iast_FULL 6.026 ms [5.966 ms, 6.087 ms] 4.709 ms (357.5%)
iast_GLOBAL 3.81 ms [3.747 ms, 3.873 ms] 2.493 ms (189.3%)
profiling 2.077 ms [2.058 ms, 2.096 ms] 759.382 µs (57.6%)
tracing 1.95 ms [1.933 ms, 1.967 ms] 632.657 µs (48.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.253 ms [1.241 ms, 1.265 ms] -
iast 3.459 ms [3.414 ms, 3.504 ms] 2.207 ms (176.1%)
iast_FULL 6.358 ms [6.292 ms, 6.424 ms] 5.106 ms (407.5%)
iast_GLOBAL 3.75 ms [3.688 ms, 3.812 ms] 2.497 ms (199.3%)
profiling 2.049 ms [2.031 ms, 2.068 ms] 796.497 µs (63.6%)
tracing 1.917 ms [1.899 ms, 1.934 ms] 663.668 µs (53.0%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/protocol-v1-1
git_commit_date 1776707964 1776710480
git_commit_sha 6e28457 a57ea33
release_version 1.62.0-SNAPSHOT~6e28457d70 1.61.0-SNAPSHOT~a57ea33954
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1776712568 1776712568
ci_job_id 1612382331 1612382331
ci_pipeline_id 108632507 108632507
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-qcm02fgc 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-qcm02fgc 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 tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~a57ea33954, baseline=1.62.0-SNAPSHOT~6e28457d70
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.482 ms) : 1471, 1494
.   : milestone, 1482,
appsec (2.528 ms) : 2473, 2583
.   : milestone, 2528,
iast (2.279 ms) : 2209, 2349
.   : milestone, 2279,
iast_GLOBAL (2.307 ms) : 2237, 2376
.   : milestone, 2307,
profiling (2.097 ms) : 2042, 2152
.   : milestone, 2097,
tracing (2.076 ms) : 2023, 2130
.   : milestone, 2076,
section candidate
no_agent (1.484 ms) : 1472, 1495
.   : milestone, 1484,
appsec (3.795 ms) : 3573, 4016
.   : milestone, 3795,
iast (2.276 ms) : 2206, 2346
.   : milestone, 2276,
iast_GLOBAL (2.314 ms) : 2244, 2384
.   : milestone, 2314,
profiling (2.097 ms) : 2042, 2152
.   : milestone, 2097,
tracing (2.077 ms) : 2024, 2131
.   : milestone, 2077,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.482 ms [1.471 ms, 1.494 ms] -
appsec 2.528 ms [2.473 ms, 2.583 ms] 1.046 ms (70.6%)
iast 2.279 ms [2.209 ms, 2.349 ms] 796.881 µs (53.8%)
iast_GLOBAL 2.307 ms [2.237 ms, 2.376 ms] 824.329 µs (55.6%)
profiling 2.097 ms [2.042 ms, 2.152 ms] 614.632 µs (41.5%)
tracing 2.076 ms [2.023 ms, 2.13 ms] 594.084 µs (40.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.484 ms [1.472 ms, 1.495 ms] -
appsec 3.795 ms [3.573 ms, 4.016 ms] 2.311 ms (155.7%)
iast 2.276 ms [2.206 ms, 2.346 ms] 792.096 µs (53.4%)
iast_GLOBAL 2.314 ms [2.244 ms, 2.384 ms] 830.348 µs (56.0%)
profiling 2.097 ms [2.042 ms, 2.152 ms] 613.059 µs (41.3%)
tracing 2.077 ms [2.024 ms, 2.131 ms] 593.329 µs (40.0%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~a57ea33954, baseline=1.62.0-SNAPSHOT~6e28457d70
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.726 s) : 15726000, 15726000
.   : milestone, 15726000,
appsec (14.707 s) : 14707000, 14707000
.   : milestone, 14707000,
iast (19.113 s) : 19113000, 19113000
.   : milestone, 19113000,
iast_GLOBAL (17.951 s) : 17951000, 17951000
.   : milestone, 17951000,
profiling (14.599 s) : 14599000, 14599000
.   : milestone, 14599000,
tracing (15.063 s) : 15063000, 15063000
.   : milestone, 15063000,
section candidate
no_agent (15.368 s) : 15368000, 15368000
.   : milestone, 15368000,
appsec (14.844 s) : 14844000, 14844000
.   : milestone, 14844000,
iast (18.686 s) : 18686000, 18686000
.   : milestone, 18686000,
iast_GLOBAL (17.98 s) : 17980000, 17980000
.   : milestone, 17980000,
profiling (14.921 s) : 14921000, 14921000
.   : milestone, 14921000,
tracing (14.709 s) : 14709000, 14709000
.   : milestone, 14709000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.726 s [15.726 s, 15.726 s] -
appsec 14.707 s [14.707 s, 14.707 s] -1.019 s (-6.5%)
iast 19.113 s [19.113 s, 19.113 s] 3.387 s (21.5%)
iast_GLOBAL 17.951 s [17.951 s, 17.951 s] 2.225 s (14.1%)
profiling 14.599 s [14.599 s, 14.599 s] -1.127 s (-7.2%)
tracing 15.063 s [15.063 s, 15.063 s] -663.0 ms (-4.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.368 s [15.368 s, 15.368 s] -
appsec 14.844 s [14.844 s, 14.844 s] -524.0 ms (-3.4%)
iast 18.686 s [18.686 s, 18.686 s] 3.318 s (21.6%)
iast_GLOBAL 17.98 s [17.98 s, 17.98 s] 2.612 s (17.0%)
profiling 14.921 s [14.921 s, 14.921 s] -447.0 ms (-2.9%)
tracing 14.709 s [14.709 s, 14.709 s] -659.0 ms (-4.3%)

# Conflicts:
#	dd-trace-core/src/main/java/datadog/trace/core/DDSpan.java
#	dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java
@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

⚠️ New Groovy Test Files Added

The following files add Groovy tests to modules that are candidates for migration to Java / JUnit 5:

  • dd-trace-core/src/test/groovy/datadog/trace/common/writer/ddagent/TraceMapperV1PayloadTest.groovy (module: dd-trace-core)

Consider writing these tests in Java / JUnit 5 instead to help with the ongoing migration effort.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added the type: enhancement Enhancements and improvements label Mar 31, 2026
@dougqh
Copy link
Copy Markdown
Contributor

dougqh commented Apr 13, 2026

Besides just reviewing the code, I wanted to see how this change impacts our overhead.
Overall, the results are quite good...

  • throughput is mostly unchanged -- maybe slightly better in intermediate heap sizes
  • allocation is up, but only slightly -- this looks be from UTF-8 byte[] which can be solved with a bit of caching

I suspect throughput will improve once this branch is synchronized with master.
And we can easily add the caching later, since this protocol uses a de-duplicated string table, the increase is only 1%.

The cache will just help a little more by de-duplicating across payloads.

@AlexeyKuznetsov-DD
Copy link
Copy Markdown
Contributor Author

Besides just reviewing the code, I wanted to see how this change impacts our overhead. Overall, the results are quite good...

  • throughput is mostly unchanged -- maybe slightly better in intermediate heap sizes
  • allocation is up, but only slightly -- this looks be from UTF-8 byte[] which can be solved with a bit of caching

I suspect throughput will improve once this branch is synchronized with master. And we can easily add the caching later, since this protocol uses a de-duplicated string table, the increase is only 1%.

The cache will just help a little more by de-duplicating across payloads.

Yep, totally agree on caching, we can improve in follow up PRs.
PR is already too big, so I would prefer to merge it if there no obvious issues and continue to work in smaller PRs.
Thanks for feedback!

Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

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

I have mostly left small comments that I've put throughout. Nothing critical in my view.
I do think getting one more review from someone familiar with the core would be good.

Comment thread dd-trace-api/src/main/java/datadog/trace/api/ProtocolVersion.java
Comment thread dd-trace-core/src/main/java/datadog/trace/core/DDSpan.java Outdated
Comment thread dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java
Comment thread dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java
Comment thread dd-trace-core/src/main/java/datadog/trace/core/Metadata.java Outdated
Comment thread dd-trace-core/src/main/java/datadog/trace/core/CoreSpan.java
Comment thread dd-trace-api/src/main/java/datadog/trace/api/DDTraceId.java Outdated
Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

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

One other performance suggestion from Claude...

  1. StringTable lookups force String materialization and Integer boxing — TraceMapperV1.java:1695-1706, :1832-1866
    Every tag name, tag value, service name, operation name, resource, component, etc. goes through:
    String str = value == null ? "" : value.toString();
    Integer index = stringTable.get(str);
    Two issues:
  • value.toString() allocates a new String for every UTF8BytesString / non-String CharSequence. Given V1 is a streaming string table design intended to amortize
    string cost, this re-materializes on every lookup and defeats part of the win.
  • HashMap<String,Integer>.get() autoboxes the returned index.

Consider a CharSequence-keyed open-addressed primitive int map (dd-trace already has UTF8ByteStringMap-like structures; verify). Even dropping to Eclipse
Collections' ObjectIntHashMap gets rid of boxing.

I'm guess StringTable is pre-existing. I agree with Claude that it would be nice to reduce the allocation especially the boxing.

But again, I'm fine with leaving this to a later PR.

Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I added a couple comments based on asking Claude to do a perf review.
I do think optimizing might the ID to byte conversion would be good.
I suspect that is where some (most?) of the extra 2GiB of byte[] were coming from.

But I'm fine with doing that in a separate pull request

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

Labels

comp: core Tracer core tag: do not merge Do not merge changes type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants