Improve instrumentation JUnit testing #11096
Open
PerfectSlayer wants to merge 9 commits intomasterfrom
Open
Conversation
This was referenced Apr 13, 2026
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~9d9228c11a, baseline=1.62.0-SNAPSHOT~8b1580f2ad
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1055790
Total [baseline] (8.822 s) : 0, 8821651
Agent [candidate] (1.059 s) : 0, 1058610
Total [candidate] (8.851 s) : 0, 8850626
section iast
Agent [baseline] (1.225 s) : 0, 1224725
Total [baseline] (9.615 s) : 0, 9615070
Agent [candidate] (1.226 s) : 0, 1226439
Total [candidate] (9.566 s) : 0, 9566366
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~9d9228c11a, baseline=1.62.0-SNAPSHOT~8b1580f2ad
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.226 ms) : 0, 1226
crashtracking [candidate] (1.219 ms) : 0, 1219
BytebuddyAgent [baseline] (632.882 ms) : 0, 632882
BytebuddyAgent [candidate] (632.785 ms) : 0, 632785
AgentMeter [baseline] (29.495 ms) : 0, 29495
AgentMeter [candidate] (29.315 ms) : 0, 29315
GlobalTracer [baseline] (249.011 ms) : 0, 249011
GlobalTracer [candidate] (248.521 ms) : 0, 248521
AppSec [baseline] (32.425 ms) : 0, 32425
AppSec [candidate] (32.357 ms) : 0, 32357
Debugger [baseline] (59.158 ms) : 0, 59158
Debugger [candidate] (59.238 ms) : 0, 59238
Remote Config [baseline] (606.159 µs) : 0, 606
Remote Config [candidate] (587.845 µs) : 0, 588
Telemetry [baseline] (8.098 ms) : 0, 8098
Telemetry [candidate] (8.005 ms) : 0, 8005
Flare Poller [baseline] (6.611 ms) : 0, 6611
Flare Poller [candidate] (10.476 ms) : 0, 10476
section iast
crashtracking [baseline] (1.245 ms) : 0, 1245
crashtracking [candidate] (1.235 ms) : 0, 1235
BytebuddyAgent [baseline] (801.441 ms) : 0, 801441
BytebuddyAgent [candidate] (804.577 ms) : 0, 804577
AgentMeter [baseline] (11.436 ms) : 0, 11436
AgentMeter [candidate] (11.558 ms) : 0, 11558
GlobalTracer [baseline] (239.622 ms) : 0, 239622
GlobalTracer [candidate] (238.062 ms) : 0, 238062
AppSec [baseline] (30.429 ms) : 0, 30429
AppSec [candidate] (32.792 ms) : 0, 32792
Debugger [baseline] (64.998 ms) : 0, 64998
Debugger [candidate] (62.798 ms) : 0, 62798
Remote Config [baseline] (548.77 µs) : 0, 549
Remote Config [candidate] (544.513 µs) : 0, 545
Telemetry [baseline] (9.422 ms) : 0, 9422
Telemetry [candidate] (9.334 ms) : 0, 9334
Flare Poller [baseline] (3.608 ms) : 0, 3608
Flare Poller [candidate] (3.516 ms) : 0, 3516
IAST [baseline] (25.829 ms) : 0, 25829
IAST [candidate] (25.748 ms) : 0, 25748
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~9d9228c11a, baseline=1.62.0-SNAPSHOT~8b1580f2ad
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1057390
Total [baseline] (11.048 s) : 0, 11048274
Agent [candidate] (1.057 s) : 0, 1057300
Total [candidate] (11.101 s) : 0, 11100621
section appsec
Agent [baseline] (1.248 s) : 0, 1248463
Total [baseline] (11.201 s) : 0, 11201261
Agent [candidate] (1.258 s) : 0, 1257511
Total [candidate] (11.143 s) : 0, 11143436
section iast
Agent [baseline] (1.222 s) : 0, 1222428
Total [baseline] (11.318 s) : 0, 11318209
Agent [candidate] (1.226 s) : 0, 1225919
Total [candidate] (11.41 s) : 0, 11409518
section profiling
Agent [baseline] (1.186 s) : 0, 1186395
Total [baseline] (11.07 s) : 0, 11070173
Agent [candidate] (1.188 s) : 0, 1187955
Total [candidate] (11.107 s) : 0, 11107335
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~9d9228c11a, baseline=1.62.0-SNAPSHOT~8b1580f2ad
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.217 ms) : 0, 1217
crashtracking [candidate] (1.218 ms) : 0, 1218
BytebuddyAgent [baseline] (632.208 ms) : 0, 632208
BytebuddyAgent [candidate] (632.921 ms) : 0, 632921
AgentMeter [baseline] (29.231 ms) : 0, 29231
AgentMeter [candidate] (29.362 ms) : 0, 29362
GlobalTracer [baseline] (248.444 ms) : 0, 248444
GlobalTracer [candidate] (249.321 ms) : 0, 249321
AppSec [baseline] (32.316 ms) : 0, 32316
AppSec [candidate] (32.434 ms) : 0, 32434
Debugger [baseline] (59.926 ms) : 0, 59926
Debugger [candidate] (60.273 ms) : 0, 60273
Remote Config [baseline] (590.235 µs) : 0, 590
Remote Config [candidate] (600.763 µs) : 0, 601
Telemetry [baseline] (8.057 ms) : 0, 8057
Telemetry [candidate] (8.103 ms) : 0, 8103
Flare Poller [baseline] (9.203 ms) : 0, 9203
Flare Poller [candidate] (6.824 ms) : 0, 6824
section appsec
crashtracking [baseline] (1.227 ms) : 0, 1227
crashtracking [candidate] (1.221 ms) : 0, 1221
BytebuddyAgent [baseline] (661.657 ms) : 0, 661657
BytebuddyAgent [candidate] (667.478 ms) : 0, 667478
AgentMeter [baseline] (12.136 ms) : 0, 12136
AgentMeter [candidate] (12.181 ms) : 0, 12181
GlobalTracer [baseline] (249.412 ms) : 0, 249412
GlobalTracer [candidate] (250.34 ms) : 0, 250340
AppSec [baseline] (185.034 ms) : 0, 185034
AppSec [candidate] (186.158 ms) : 0, 186158
Debugger [baseline] (65.705 ms) : 0, 65705
Debugger [candidate] (66.358 ms) : 0, 66358
Remote Config [baseline] (604.768 µs) : 0, 605
Remote Config [candidate] (605.631 µs) : 0, 606
Telemetry [baseline] (8.366 ms) : 0, 8366
Telemetry [candidate] (8.422 ms) : 0, 8422
Flare Poller [baseline] (3.5 ms) : 0, 3500
Flare Poller [candidate] (3.543 ms) : 0, 3543
IAST [baseline] (24.434 ms) : 0, 24434
IAST [candidate] (24.653 ms) : 0, 24653
section iast
crashtracking [baseline] (1.218 ms) : 0, 1218
crashtracking [candidate] (1.219 ms) : 0, 1219
BytebuddyAgent [baseline] (799.173 ms) : 0, 799173
BytebuddyAgent [candidate] (802.061 ms) : 0, 802061
AgentMeter [baseline] (11.43 ms) : 0, 11430
AgentMeter [candidate] (11.514 ms) : 0, 11514
GlobalTracer [baseline] (238.586 ms) : 0, 238586
GlobalTracer [candidate] (239.383 ms) : 0, 239383
AppSec [baseline] (31.24 ms) : 0, 31240
AppSec [candidate] (33.668 ms) : 0, 33668
Debugger [baseline] (65.355 ms) : 0, 65355
Debugger [candidate] (62.674 ms) : 0, 62674
Remote Config [baseline] (541.23 µs) : 0, 541
Remote Config [candidate] (547.556 µs) : 0, 548
Telemetry [baseline] (9.395 ms) : 0, 9395
Telemetry [candidate] (9.292 ms) : 0, 9292
Flare Poller [baseline] (3.549 ms) : 0, 3549
Flare Poller [candidate] (3.497 ms) : 0, 3497
IAST [baseline] (25.799 ms) : 0, 25799
IAST [candidate] (25.932 ms) : 0, 25932
section profiling
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.187 ms) : 0, 1187
BytebuddyAgent [baseline] (693.436 ms) : 0, 693436
BytebuddyAgent [candidate] (692.383 ms) : 0, 692383
AgentMeter [baseline] (9.001 ms) : 0, 9001
AgentMeter [candidate] (9.153 ms) : 0, 9153
GlobalTracer [baseline] (207.281 ms) : 0, 207281
GlobalTracer [candidate] (208.201 ms) : 0, 208201
AppSec [baseline] (32.814 ms) : 0, 32814
AppSec [candidate] (32.972 ms) : 0, 32972
Debugger [baseline] (65.478 ms) : 0, 65478
Debugger [candidate] (65.841 ms) : 0, 65841
Remote Config [baseline] (570.857 µs) : 0, 571
Remote Config [candidate] (572.778 µs) : 0, 573
Telemetry [baseline] (7.8 ms) : 0, 7800
Telemetry [candidate] (7.895 ms) : 0, 7895
Flare Poller [baseline] (3.573 ms) : 0, 3573
Flare Poller [candidate] (3.613 ms) : 0, 3613
ProfilingAgent [baseline] (93.751 ms) : 0, 93751
ProfilingAgent [candidate] (94.669 ms) : 0, 94669
Profiling [baseline] (94.314 ms) : 0, 94314
Profiling [candidate] (95.232 ms) : 0, 95232
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 1 performance regressions! Performance is the same for 15 metrics, 19 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~9d9228c11a, baseline=1.62.0-SNAPSHOT~8b1580f2ad
dateFormat X
axisFormat %s
section baseline
no_agent (1.257 ms) : 1245, 1270
. : milestone, 1257,
iast (3.2 ms) : 3151, 3249
. : milestone, 3200,
iast_FULL (5.991 ms) : 5931, 6050
. : milestone, 5991,
iast_GLOBAL (3.615 ms) : 3561, 3669
. : milestone, 3615,
profiling (2.197 ms) : 2177, 2217
. : milestone, 2197,
tracing (1.929 ms) : 1913, 1945
. : milestone, 1929,
section candidate
no_agent (1.257 ms) : 1245, 1270
. : milestone, 1257,
iast (3.38 ms) : 3338, 3422
. : milestone, 3380,
iast_FULL (6.149 ms) : 6084, 6214
. : milestone, 6149,
iast_GLOBAL (3.646 ms) : 3585, 3708
. : milestone, 3646,
profiling (2.209 ms) : 2186, 2232
. : milestone, 2209,
tracing (1.86 ms) : 1845, 1875
. : milestone, 1860,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~9d9228c11a, baseline=1.62.0-SNAPSHOT~8b1580f2ad
dateFormat X
axisFormat %s
section baseline
no_agent (18.348 ms) : 18164, 18532
. : milestone, 18348,
appsec (18.904 ms) : 18712, 19096
. : milestone, 18904,
code_origins (17.79 ms) : 17614, 17965
. : milestone, 17790,
iast (18.568 ms) : 18385, 18752
. : milestone, 18568,
profiling (18.698 ms) : 18512, 18884
. : milestone, 18698,
tracing (17.87 ms) : 17694, 18047
. : milestone, 17870,
section candidate
no_agent (18.349 ms) : 18156, 18541
. : milestone, 18349,
appsec (18.609 ms) : 18420, 18798
. : milestone, 18609,
code_origins (17.58 ms) : 17410, 17750
. : milestone, 17580,
iast (18.704 ms) : 18515, 18893
. : milestone, 18704,
profiling (18.112 ms) : 17934, 18290
. : milestone, 18112,
tracing (18.16 ms) : 17981, 18338
. : milestone, 18160,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 1 unstable metrics.
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~9d9228c11a, baseline=1.62.0-SNAPSHOT~8b1580f2ad
dateFormat X
axisFormat %s
section baseline
no_agent (1.487 ms) : 1476, 1499
. : milestone, 1487,
appsec (3.728 ms) : 3512, 3945
. : milestone, 3728,
iast (2.274 ms) : 2204, 2344
. : milestone, 2274,
iast_GLOBAL (2.307 ms) : 2237, 2376
. : milestone, 2307,
profiling (2.094 ms) : 2039, 2148
. : milestone, 2094,
tracing (2.098 ms) : 2044, 2152
. : milestone, 2098,
section candidate
no_agent (1.487 ms) : 1475, 1499
. : milestone, 1487,
appsec (2.538 ms) : 2483, 2593
. : milestone, 2538,
iast (2.27 ms) : 2201, 2340
. : milestone, 2270,
iast_GLOBAL (2.304 ms) : 2235, 2374
. : milestone, 2304,
profiling (2.534 ms) : 2369, 2700
. : milestone, 2534,
tracing (2.08 ms) : 2027, 2134
. : milestone, 2080,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~9d9228c11a, baseline=1.62.0-SNAPSHOT~8b1580f2ad
dateFormat X
axisFormat %s
section baseline
no_agent (15.504 s) : 15504000, 15504000
. : milestone, 15504000,
appsec (15.067 s) : 15067000, 15067000
. : milestone, 15067000,
iast (17.973 s) : 17973000, 17973000
. : milestone, 17973000,
iast_GLOBAL (17.827 s) : 17827000, 17827000
. : milestone, 17827000,
profiling (14.852 s) : 14852000, 14852000
. : milestone, 14852000,
tracing (14.767 s) : 14767000, 14767000
. : milestone, 14767000,
section candidate
no_agent (15.677 s) : 15677000, 15677000
. : milestone, 15677000,
appsec (14.947 s) : 14947000, 14947000
. : milestone, 14947000,
iast (18.263 s) : 18263000, 18263000
. : milestone, 18263000,
iast_GLOBAL (17.972 s) : 17972000, 17972000
. : milestone, 17972000,
profiling (15.51 s) : 15510000, 15510000
. : milestone, 15510000,
tracing (15.146 s) : 15146000, 15146000
. : milestone, 15146000,
|
bric3
approved these changes
Apr 15, 2026
So child classes can benefits from class level configs and we can configure the tracer for example
8d727de to
cd97498
Compare
…tension Move DD_* environment variable and dd.* system property validation logic from DDJavaSpecification into a reusable CleanConfigStateExtension. Improves error reporting with detailed leak information.
Fix tracer initialization from per method to per class to match Spock setupSpec() / cleanUpSpec()
cd97498 to
af45d6c
Compare
1d931de to
9d9228c
Compare
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
This PR fixes base instrumentation tests class to initialize the tracer from per method to per class to match Spock setupSpec() / cleanUpSpec().
It introduces a
InstrumentationTestConfigto help with configuring the tests.As the tracer is now initialized in a static
@BeforeEach, the instrumentation test config must be done in a static initializer block like:Not ideal but it could have been worse. Not many tests should changed the default configuration any way.
Additionally, it improves error reports, add missing default tags to tag assert, and fix case when span link matchers are missing.
Motivation
This is the current behavior from the Spock specification and the per method was killing test execution performance.
Additional Notes
This PR is part of some bigger improvements in stacked PRs:
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.