Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
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
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
Startup time reports for petclinicgantt
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
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
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 3 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
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,
Request duration reports for insecure-bankgantt
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,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
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,
Execution time for biojavagantt
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,
|
# Conflicts: # dd-trace-core/src/main/java/datadog/trace/core/DDSpan.java # dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
|
The following files add Groovy tests to modules that are candidates for migration to Java / JUnit 5:
Consider writing these tests in Java / JUnit 5 instead to help with the ongoing migration effort. |
|
Besides just reviewing the code, I wanted to see how this change impacts our overhead.
I suspect throughput will improve once this branch is synchronized with master. 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. |
dougqh
left a comment
There was a problem hiding this comment.
One other performance suggestion from Claude...
- 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.
dougqh
left a comment
There was a problem hiding this comment.
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
What Does This Do
Implements support for the Datadog Agent Trace Protocol
v1.0(v1.0/tracesendpoint) in the Java tracer.Introduces
TraceMapperV1, a new serializer that encodes traces in thev1 msgpackformat with a flat attribute model, string table deduplication, and typed attribute values.Adds a
ProtocolVersionenum to cleanly representv0.4,v0.5, andv1.0protocols including their fallback endpoint chains.Updates
DDAgentFeaturesDiscoveryto 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.4when the agent does not advertisev1support.Additional Notes
Protocol v1 spec
System test passed both on GitHub and GitLab.