Add primitive versions of setMetric to DDSpanContext#10516
Open
Add primitive versions of setMetric to DDSpanContext#10516
Conversation
Adding primitive versions of setMetric to take advantage of TagMap, primitive versions already exist on AgentSpan/DDSpan
Contributor
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 61 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.60.0-SNAPSHOT~2adef7a07e, baseline=1.60.0-SNAPSHOT~6fdb8c86a8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.061 s) : 0, 1060601
Total [baseline] (8.756 s) : 0, 8756232
Agent [candidate] (1.063 s) : 0, 1062557
Total [candidate] (8.716 s) : 0, 8715736
section iast
Agent [baseline] (1.235 s) : 0, 1234957
Total [baseline] (9.357 s) : 0, 9356671
Agent [candidate] (1.237 s) : 0, 1236640
Total [candidate] (9.393 s) : 0, 9393274
gantt
title insecure-bank - break down per module: candidate=1.60.0-SNAPSHOT~2adef7a07e, baseline=1.60.0-SNAPSHOT~6fdb8c86a8
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.187 ms) : 0, 1187
crashtracking [candidate] (1.181 ms) : 0, 1181
BytebuddyAgent [baseline] (626.203 ms) : 0, 626203
BytebuddyAgent [candidate] (626.676 ms) : 0, 626676
AgentMeter [baseline] (28.789 ms) : 0, 28789
AgentMeter [candidate] (28.761 ms) : 0, 28761
GlobalTracer [baseline] (257.225 ms) : 0, 257225
GlobalTracer [candidate] (257.21 ms) : 0, 257210
AppSec [baseline] (32.644 ms) : 0, 32644
AppSec [candidate] (32.694 ms) : 0, 32694
Debugger [baseline] (59.345 ms) : 0, 59345
Debugger [candidate] (60.995 ms) : 0, 60995
Remote Config [baseline] (611.818 µs) : 0, 612
Remote Config [candidate] (605.317 µs) : 0, 605
Telemetry [baseline] (13.804 ms) : 0, 13804
Telemetry [candidate] (12.153 ms) : 0, 12153
Flare Poller [baseline] (5.39 ms) : 0, 5390
Flare Poller [candidate] (7.015 ms) : 0, 7015
section iast
crashtracking [baseline] (1.193 ms) : 0, 1193
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (799.773 ms) : 0, 799773
BytebuddyAgent [candidate] (800.069 ms) : 0, 800069
AgentMeter [baseline] (11.487 ms) : 0, 11487
AgentMeter [candidate] (11.463 ms) : 0, 11463
GlobalTracer [baseline] (248.03 ms) : 0, 248030
GlobalTracer [candidate] (248.358 ms) : 0, 248358
AppSec [baseline] (33.798 ms) : 0, 33798
AppSec [candidate] (32.372 ms) : 0, 32372
Debugger [baseline] (65.66 ms) : 0, 65660
Debugger [candidate] (67.807 ms) : 0, 67807
Remote Config [baseline] (536.877 µs) : 0, 537
Remote Config [candidate] (547.128 µs) : 0, 547
Telemetry [baseline] (8.519 ms) : 0, 8519
Telemetry [candidate] (8.652 ms) : 0, 8652
Flare Poller [baseline] (3.481 ms) : 0, 3481
Flare Poller [candidate] (3.459 ms) : 0, 3459
IAST [baseline] (27.121 ms) : 0, 27121
IAST [candidate] (27.284 ms) : 0, 27284
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.60.0-SNAPSHOT~2adef7a07e, baseline=1.60.0-SNAPSHOT~6fdb8c86a8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1066325
Total [baseline] (10.815 s) : 0, 10814761
Agent [candidate] (1.064 s) : 0, 1063631
Total [candidate] (10.844 s) : 0, 10843710
section appsec
Agent [baseline] (1.248 s) : 0, 1247836
Total [baseline] (10.941 s) : 0, 10940766
Agent [candidate] (1.239 s) : 0, 1239007
Total [candidate] (10.952 s) : 0, 10952323
section iast
Agent [baseline] (1.236 s) : 0, 1236245
Total [baseline] (11.119 s) : 0, 11119329
Agent [candidate] (1.239 s) : 0, 1239335
Total [candidate] (11.206 s) : 0, 11205849
section profiling
Agent [baseline] (1.19 s) : 0, 1189591
Total [baseline] (10.965 s) : 0, 10964669
Agent [candidate] (1.19 s) : 0, 1190452
Total [candidate] (10.979 s) : 0, 10979274
gantt
title petclinic - break down per module: candidate=1.60.0-SNAPSHOT~2adef7a07e, baseline=1.60.0-SNAPSHOT~6fdb8c86a8
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.185 ms) : 0, 1185
crashtracking [candidate] (1.178 ms) : 0, 1178
BytebuddyAgent [baseline] (628.372 ms) : 0, 628372
BytebuddyAgent [candidate] (627.814 ms) : 0, 627814
AgentMeter [baseline] (28.861 ms) : 0, 28861
AgentMeter [candidate] (28.812 ms) : 0, 28812
GlobalTracer [baseline] (257.655 ms) : 0, 257655
GlobalTracer [candidate] (257.344 ms) : 0, 257344
AppSec [baseline] (32.787 ms) : 0, 32787
AppSec [candidate] (32.77 ms) : 0, 32770
Debugger [baseline] (61.325 ms) : 0, 61325
Debugger [candidate] (62.459 ms) : 0, 62459
Remote Config [baseline] (627.857 µs) : 0, 628
Remote Config [candidate] (601.005 µs) : 0, 601
Telemetry [baseline] (15.517 ms) : 0, 15517
Telemetry [candidate] (12.79 ms) : 0, 12790
Flare Poller [baseline] (4.57 ms) : 0, 4570
Flare Poller [candidate] (4.604 ms) : 0, 4604
section appsec
crashtracking [baseline] (1.21 ms) : 0, 1210
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (665.053 ms) : 0, 665053
BytebuddyAgent [candidate] (657.986 ms) : 0, 657986
AgentMeter [baseline] (11.92 ms) : 0, 11920
AgentMeter [candidate] (11.83 ms) : 0, 11830
GlobalTracer [baseline] (259.312 ms) : 0, 259312
GlobalTracer [candidate] (258.576 ms) : 0, 258576
IAST [baseline] (25.501 ms) : 0, 25501
IAST [candidate] (25.21 ms) : 0, 25210
AppSec [baseline] (168.583 ms) : 0, 168583
AppSec [candidate] (168.158 ms) : 0, 168158
Debugger [baseline] (67.265 ms) : 0, 67265
Debugger [candidate] (67.218 ms) : 0, 67218
Remote Config [baseline] (676.91 µs) : 0, 677
Remote Config [candidate] (660.801 µs) : 0, 661
Telemetry [baseline] (9.118 ms) : 0, 9118
Telemetry [candidate] (9.125 ms) : 0, 9125
Flare Poller [baseline] (3.632 ms) : 0, 3632
Flare Poller [candidate] (3.685 ms) : 0, 3685
section iast
crashtracking [baseline] (1.189 ms) : 0, 1189
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (799.868 ms) : 0, 799868
BytebuddyAgent [candidate] (802.206 ms) : 0, 802206
AgentMeter [baseline] (11.478 ms) : 0, 11478
AgentMeter [candidate] (11.549 ms) : 0, 11549
GlobalTracer [baseline] (247.981 ms) : 0, 247981
GlobalTracer [candidate] (248.995 ms) : 0, 248995
IAST [baseline] (26.984 ms) : 0, 26984
IAST [candidate] (26.89 ms) : 0, 26890
AppSec [baseline] (33.026 ms) : 0, 33026
AppSec [candidate] (34.91 ms) : 0, 34910
Debugger [baseline] (67.449 ms) : 0, 67449
Debugger [candidate] (65.548 ms) : 0, 65548
Remote Config [baseline] (551.729 µs) : 0, 552
Remote Config [candidate] (551.769 µs) : 0, 552
Telemetry [baseline] (8.776 ms) : 0, 8776
Telemetry [candidate] (8.642 ms) : 0, 8642
Flare Poller [baseline] (3.548 ms) : 0, 3548
Flare Poller [candidate] (3.459 ms) : 0, 3459
section profiling
crashtracking [baseline] (1.224 ms) : 0, 1224
crashtracking [candidate] (1.213 ms) : 0, 1213
BytebuddyAgent [baseline] (682.02 ms) : 0, 682020
BytebuddyAgent [candidate] (682.461 ms) : 0, 682461
AgentMeter [baseline] (8.78 ms) : 0, 8780
AgentMeter [candidate] (8.762 ms) : 0, 8762
GlobalTracer [baseline] (215.806 ms) : 0, 215806
GlobalTracer [candidate] (216.42 ms) : 0, 216420
AppSec [baseline] (32.346 ms) : 0, 32346
AppSec [candidate] (32.441 ms) : 0, 32441
Debugger [baseline] (67.531 ms) : 0, 67531
Debugger [candidate] (67.273 ms) : 0, 67273
Remote Config [baseline] (592.714 µs) : 0, 593
Remote Config [candidate] (594.306 µs) : 0, 594
Telemetry [baseline] (8.693 ms) : 0, 8693
Telemetry [candidate] (8.775 ms) : 0, 8775
Flare Poller [baseline] (3.759 ms) : 0, 3759
Flare Poller [candidate] (3.78 ms) : 0, 3780
ProfilingAgent [baseline] (99.0 ms) : 0, 99000
ProfilingAgent [candidate] (98.921 ms) : 0, 98921
Profiling [baseline] (99.583 ms) : 0, 99583
Profiling [candidate] (99.498 ms) : 0, 99498
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 18 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~2adef7a07e, baseline=1.60.0-SNAPSHOT~6fdb8c86a8
dateFormat X
axisFormat %s
section baseline
no_agent (19.39 ms) : 19194, 19586
. : milestone, 19390,
appsec (18.645 ms) : 18451, 18839
. : milestone, 18645,
code_origins (17.579 ms) : 17400, 17758
. : milestone, 17579,
iast (17.702 ms) : 17527, 17878
. : milestone, 17702,
profiling (18.547 ms) : 18361, 18734
. : milestone, 18547,
tracing (17.761 ms) : 17584, 17938
. : milestone, 17761,
section candidate
no_agent (18.101 ms) : 17918, 18283
. : milestone, 18101,
appsec (18.622 ms) : 18433, 18812
. : milestone, 18622,
code_origins (17.496 ms) : 17325, 17667
. : milestone, 17496,
iast (17.569 ms) : 17392, 17745
. : milestone, 17569,
profiling (18.427 ms) : 18244, 18610
. : milestone, 18427,
tracing (18.795 ms) : 18607, 18983
. : milestone, 18795,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~2adef7a07e, baseline=1.60.0-SNAPSHOT~6fdb8c86a8
dateFormat X
axisFormat %s
section baseline
no_agent (1.171 ms) : 1160, 1182
. : milestone, 1171,
iast (3.231 ms) : 3187, 3274
. : milestone, 3231,
iast_FULL (5.914 ms) : 5854, 5973
. : milestone, 5914,
iast_GLOBAL (3.601 ms) : 3542, 3661
. : milestone, 3601,
profiling (2.069 ms) : 2049, 2090
. : milestone, 2069,
tracing (1.769 ms) : 1754, 1784
. : milestone, 1769,
section candidate
no_agent (1.188 ms) : 1176, 1200
. : milestone, 1188,
iast (3.271 ms) : 3228, 3314
. : milestone, 3271,
iast_FULL (5.722 ms) : 5665, 5778
. : milestone, 5722,
iast_GLOBAL (3.621 ms) : 3554, 3688
. : milestone, 3621,
profiling (2.18 ms) : 2161, 2200
. : milestone, 2180,
tracing (1.811 ms) : 1796, 1826
. : milestone, 1811,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~2adef7a07e, baseline=1.60.0-SNAPSHOT~6fdb8c86a8
dateFormat X
axisFormat %s
section baseline
no_agent (15.319 s) : 15319000, 15319000
. : milestone, 15319000,
appsec (14.682 s) : 14682000, 14682000
. : milestone, 14682000,
iast (17.976 s) : 17976000, 17976000
. : milestone, 17976000,
iast_GLOBAL (17.613 s) : 17613000, 17613000
. : milestone, 17613000,
profiling (15.417 s) : 15417000, 15417000
. : milestone, 15417000,
tracing (14.87 s) : 14870000, 14870000
. : milestone, 14870000,
section candidate
no_agent (15.156 s) : 15156000, 15156000
. : milestone, 15156000,
appsec (15.14 s) : 15140000, 15140000
. : milestone, 15140000,
iast (17.839 s) : 17839000, 17839000
. : milestone, 17839000,
iast_GLOBAL (17.862 s) : 17862000, 17862000
. : milestone, 17862000,
profiling (14.865 s) : 14865000, 14865000
. : milestone, 14865000,
tracing (14.678 s) : 14678000, 14678000
. : milestone, 14678000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~2adef7a07e, baseline=1.60.0-SNAPSHOT~6fdb8c86a8
dateFormat X
axisFormat %s
section baseline
no_agent (1.466 ms) : 1454, 1477
. : milestone, 1466,
appsec (2.561 ms) : 2503, 2619
. : milestone, 2561,
iast (2.243 ms) : 2174, 2312
. : milestone, 2243,
iast_GLOBAL (2.29 ms) : 2220, 2360
. : milestone, 2290,
profiling (2.087 ms) : 2031, 2143
. : milestone, 2087,
tracing (2.065 ms) : 2011, 2119
. : milestone, 2065,
section candidate
no_agent (1.467 ms) : 1455, 1478
. : milestone, 1467,
appsec (3.753 ms) : 3532, 3973
. : milestone, 3753,
iast (2.241 ms) : 2172, 2311
. : milestone, 2241,
iast_GLOBAL (2.291 ms) : 2222, 2361
. : milestone, 2291,
profiling (2.133 ms) : 2074, 2192
. : milestone, 2133,
tracing (2.05 ms) : 1996, 2103
. : milestone, 2050,
|
bric3
approved these changes
Feb 4, 2026
Contributor
Author
|
I have to decide how to handle shorts. We have tests for shorts on DDSpanContext, but that behavior isn't currently exposed by AgentSpan / DDSpan. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Does This Do
Adds primitive versions of setMetric to DDSpanContext
Motivation
Avoids boxing of primitives - as metric flow from AgentSpan to TagMap through DDSpanContext
NOTE: Both AgentSpan/DDSpan and TagMap already have appropriate primitive methods
Reduces allocation & garbage collection
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]