Conversation
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (321.817 µs) : 283, 361
. : milestone, 322,
basic (277.501 µs) : 272, 283
. : milestone, 278,
loop (8.964 ms) : 8960, 8969
. : milestone, 8964,
section candidate
noprobe (310.295 µs) : 286, 335
. : milestone, 310,
basic (273.066 µs) : 267, 280
. : milestone, 273,
loop (8.959 ms) : 8955, 8964
. : milestone, 8959,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.60.0-SNAPSHOT~f0f6ad1400, baseline=1.60.0-SNAPSHOT~9c3d035f5f
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1064208
Total [baseline] (8.737 s) : 0, 8736509
Agent [candidate] (1.063 s) : 0, 1062628
Total [candidate] (8.72 s) : 0, 8719736
section iast
Agent [baseline] (1.239 s) : 0, 1239367
Total [baseline] (9.382 s) : 0, 9382360
Agent [candidate] (1.23 s) : 0, 1230242
Total [candidate] (9.38 s) : 0, 9379636
gantt
title insecure-bank - break down per module: candidate=1.60.0-SNAPSHOT~f0f6ad1400, baseline=1.60.0-SNAPSHOT~9c3d035f5f
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.186 ms) : 0, 1186
crashtracking [candidate] (1.181 ms) : 0, 1181
BytebuddyAgent [baseline] (629.018 ms) : 0, 629018
BytebuddyAgent [candidate] (626.915 ms) : 0, 626915
AgentMeter [baseline] (28.818 ms) : 0, 28818
AgentMeter [candidate] (28.76 ms) : 0, 28760
GlobalTracer [baseline] (258.031 ms) : 0, 258031
GlobalTracer [candidate] (257.714 ms) : 0, 257714
AppSec [baseline] (32.827 ms) : 0, 32827
AppSec [candidate] (32.679 ms) : 0, 32679
Debugger [baseline] (61.434 ms) : 0, 61434
Debugger [candidate] (59.425 ms) : 0, 59425
Remote Config [baseline] (688.95 µs) : 0, 689
Remote Config [candidate] (612.645 µs) : 0, 613
Telemetry [baseline] (12.269 ms) : 0, 12269
Telemetry [candidate] (15.312 ms) : 0, 15312
Flare Poller [baseline] (4.459 ms) : 0, 4459
Flare Poller [candidate] (4.629 ms) : 0, 4629
section iast
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (801.944 ms) : 0, 801944
BytebuddyAgent [candidate] (795.624 ms) : 0, 795624
AgentMeter [baseline] (11.529 ms) : 0, 11529
AgentMeter [candidate] (11.26 ms) : 0, 11260
GlobalTracer [baseline] (248.742 ms) : 0, 248742
GlobalTracer [candidate] (247.446 ms) : 0, 247446
AppSec [baseline] (31.81 ms) : 0, 31810
AppSec [candidate] (32.228 ms) : 0, 32228
Debugger [baseline] (68.726 ms) : 0, 68726
Debugger [candidate] (67.479 ms) : 0, 67479
Remote Config [baseline] (538.159 µs) : 0, 538
Remote Config [candidate] (552.659 µs) : 0, 553
Telemetry [baseline] (8.785 ms) : 0, 8785
Telemetry [candidate] (8.719 ms) : 0, 8719
Flare Poller [baseline] (3.513 ms) : 0, 3513
Flare Poller [candidate] (3.506 ms) : 0, 3506
IAST [baseline] (27.089 ms) : 0, 27089
IAST [candidate] (26.932 ms) : 0, 26932
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.60.0-SNAPSHOT~f0f6ad1400, baseline=1.60.0-SNAPSHOT~9c3d035f5f
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.074 s) : 0, 1074120
Total [baseline] (10.858 s) : 0, 10858116
Agent [candidate] (1.064 s) : 0, 1063672
Total [candidate] (10.905 s) : 0, 10904697
section appsec
Agent [baseline] (1.239 s) : 0, 1239175
Total [baseline] (11.033 s) : 0, 11033119
Agent [candidate] (1.249 s) : 0, 1248840
Total [candidate] (11.066 s) : 0, 11065915
section iast
Agent [baseline] (1.243 s) : 0, 1242548
Total [baseline] (11.24 s) : 0, 11240194
Agent [candidate] (1.243 s) : 0, 1242970
Total [candidate] (11.234 s) : 0, 11234310
section profiling
Agent [baseline] (1.188 s) : 0, 1187593
Total [baseline] (11.033 s) : 0, 11032586
Agent [candidate] (1.199 s) : 0, 1198588
Total [candidate] (11.094 s) : 0, 11094188
gantt
title petclinic - break down per module: candidate=1.60.0-SNAPSHOT~f0f6ad1400, baseline=1.60.0-SNAPSHOT~9c3d035f5f
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.188 ms) : 0, 1188
crashtracking [candidate] (1.182 ms) : 0, 1182
BytebuddyAgent [baseline] (633.386 ms) : 0, 633386
BytebuddyAgent [candidate] (628.055 ms) : 0, 628055
AgentMeter [baseline] (29.132 ms) : 0, 29132
AgentMeter [candidate] (28.758 ms) : 0, 28758
GlobalTracer [baseline] (259.671 ms) : 0, 259671
GlobalTracer [candidate] (257.892 ms) : 0, 257892
AppSec [baseline] (33.117 ms) : 0, 33117
AppSec [candidate] (32.803 ms) : 0, 32803
Debugger [baseline] (63.08 ms) : 0, 63080
Debugger [candidate] (61.294 ms) : 0, 61294
Remote Config [baseline] (657.87 µs) : 0, 658
Remote Config [candidate] (623.405 µs) : 0, 623
Telemetry [baseline] (13.9 ms) : 0, 13900
Telemetry [candidate] (11.567 ms) : 0, 11567
Flare Poller [baseline] (4.54 ms) : 0, 4540
Flare Poller [candidate] (6.126 ms) : 0, 6126
section appsec
crashtracking [baseline] (1.186 ms) : 0, 1186
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (657.995 ms) : 0, 657995
BytebuddyAgent [candidate] (663.725 ms) : 0, 663725
AgentMeter [baseline] (11.885 ms) : 0, 11885
AgentMeter [candidate] (11.97 ms) : 0, 11970
GlobalTracer [baseline] (258.777 ms) : 0, 258777
GlobalTracer [candidate] (260.548 ms) : 0, 260548
IAST [baseline] (25.366 ms) : 0, 25366
IAST [candidate] (25.686 ms) : 0, 25686
AppSec [baseline] (167.971 ms) : 0, 167971
AppSec [candidate] (168.828 ms) : 0, 168828
Debugger [baseline] (67.275 ms) : 0, 67275
Debugger [candidate] (67.695 ms) : 0, 67695
Remote Config [baseline] (671.949 µs) : 0, 672
Remote Config [candidate] (674.922 µs) : 0, 675
Telemetry [baseline] (9.151 ms) : 0, 9151
Telemetry [candidate] (9.28 ms) : 0, 9280
Flare Poller [baseline] (3.584 ms) : 0, 3584
Flare Poller [candidate] (3.712 ms) : 0, 3712
section iast
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (804.574 ms) : 0, 804574
BytebuddyAgent [candidate] (804.188 ms) : 0, 804188
AgentMeter [baseline] (11.52 ms) : 0, 11520
AgentMeter [candidate] (11.558 ms) : 0, 11558
GlobalTracer [baseline] (250.233 ms) : 0, 250233
GlobalTracer [candidate] (250.11 ms) : 0, 250110
IAST [baseline] (27.089 ms) : 0, 27089
IAST [candidate] (27.27 ms) : 0, 27270
AppSec [baseline] (32.996 ms) : 0, 32996
AppSec [candidate] (33.164 ms) : 0, 33164
Debugger [baseline] (66.842 ms) : 0, 66842
Debugger [candidate] (67.449 ms) : 0, 67449
Remote Config [baseline] (538.362 µs) : 0, 538
Remote Config [candidate] (542.112 µs) : 0, 542
Telemetry [baseline] (8.695 ms) : 0, 8695
Telemetry [candidate] (8.6 ms) : 0, 8600
Flare Poller [baseline] (3.402 ms) : 0, 3402
Flare Poller [candidate] (3.415 ms) : 0, 3415
section profiling
crashtracking [baseline] (1.213 ms) : 0, 1213
crashtracking [candidate] (1.217 ms) : 0, 1217
BytebuddyAgent [baseline] (679.996 ms) : 0, 679996
BytebuddyAgent [candidate] (686.894 ms) : 0, 686894
AgentMeter [baseline] (8.708 ms) : 0, 8708
AgentMeter [candidate] (8.833 ms) : 0, 8833
GlobalTracer [baseline] (215.739 ms) : 0, 215739
GlobalTracer [candidate] (217.449 ms) : 0, 217449
AppSec [baseline] (32.211 ms) : 0, 32211
AppSec [candidate] (32.803 ms) : 0, 32803
Debugger [baseline] (67.459 ms) : 0, 67459
Debugger [candidate] (68.241 ms) : 0, 68241
Remote Config [baseline] (600.891 µs) : 0, 601
Remote Config [candidate] (613.013 µs) : 0, 613
Telemetry [baseline] (8.754 ms) : 0, 8754
Telemetry [candidate] (8.851 ms) : 0, 8851
Flare Poller [baseline] (3.699 ms) : 0, 3699
Flare Poller [candidate] (3.765 ms) : 0, 3765
ProfilingAgent [baseline] (99.447 ms) : 0, 99447
ProfilingAgent [candidate] (99.795 ms) : 0, 99795
Profiling [baseline] (100.052 ms) : 0, 100052
Profiling [candidate] (100.375 ms) : 0, 100375
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 20 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~f0f6ad1400, baseline=1.60.0-SNAPSHOT~9c3d035f5f
dateFormat X
axisFormat %s
section baseline
no_agent (17.922 ms) : 17745, 18099
. : milestone, 17922,
appsec (18.408 ms) : 18219, 18597
. : milestone, 18408,
code_origins (17.92 ms) : 17739, 18102
. : milestone, 17920,
iast (17.932 ms) : 17752, 18112
. : milestone, 17932,
profiling (19.418 ms) : 19217, 19619
. : milestone, 19418,
tracing (17.713 ms) : 17537, 17890
. : milestone, 17713,
section candidate
no_agent (17.869 ms) : 17689, 18049
. : milestone, 17869,
appsec (18.499 ms) : 18309, 18689
. : milestone, 18499,
code_origins (17.97 ms) : 17791, 18150
. : milestone, 17970,
iast (17.443 ms) : 17268, 17618
. : milestone, 17443,
profiling (18.596 ms) : 18411, 18781
. : milestone, 18596,
tracing (17.827 ms) : 17649, 18005
. : milestone, 17827,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~f0f6ad1400, baseline=1.60.0-SNAPSHOT~9c3d035f5f
dateFormat X
axisFormat %s
section baseline
no_agent (1.298 ms) : 1284, 1312
. : milestone, 1298,
iast (3.203 ms) : 3161, 3245
. : milestone, 3203,
iast_FULL (5.85 ms) : 5791, 5909
. : milestone, 5850,
iast_GLOBAL (3.64 ms) : 3577, 3703
. : milestone, 3640,
profiling (2.091 ms) : 2072, 2110
. : milestone, 2091,
tracing (1.834 ms) : 1818, 1850
. : milestone, 1834,
section candidate
no_agent (1.197 ms) : 1185, 1208
. : milestone, 1197,
iast (3.239 ms) : 3192, 3286
. : milestone, 3239,
iast_FULL (5.786 ms) : 5728, 5843
. : milestone, 5786,
iast_GLOBAL (3.645 ms) : 3582, 3707
. : milestone, 3645,
profiling (2.085 ms) : 2064, 2106
. : milestone, 2085,
tracing (1.803 ms) : 1787, 1818
. : milestone, 1803,
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.60.0-SNAPSHOT~f0f6ad1400, baseline=1.60.0-SNAPSHOT~9c3d035f5f
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (2.55 ms) : 2492, 2609
. : milestone, 2550,
iast (2.248 ms) : 2178, 2317
. : milestone, 2248,
iast_GLOBAL (2.283 ms) : 2214, 2352
. : milestone, 2283,
profiling (2.07 ms) : 2015, 2124
. : milestone, 2070,
tracing (2.056 ms) : 2002, 2109
. : milestone, 2056,
section candidate
no_agent (1.465 ms) : 1454, 1477
. : milestone, 1465,
appsec (3.75 ms) : 3529, 3970
. : milestone, 3750,
iast (2.24 ms) : 2172, 2309
. : milestone, 2240,
iast_GLOBAL (2.293 ms) : 2223, 2362
. : milestone, 2293,
profiling (2.093 ms) : 2037, 2149
. : milestone, 2093,
tracing (2.049 ms) : 1995, 2102
. : milestone, 2049,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~f0f6ad1400, baseline=1.60.0-SNAPSHOT~9c3d035f5f
dateFormat X
axisFormat %s
section baseline
no_agent (14.954 s) : 14954000, 14954000
. : milestone, 14954000,
appsec (14.763 s) : 14763000, 14763000
. : milestone, 14763000,
iast (18.282 s) : 18282000, 18282000
. : milestone, 18282000,
iast_GLOBAL (17.666 s) : 17666000, 17666000
. : milestone, 17666000,
profiling (14.894 s) : 14894000, 14894000
. : milestone, 14894000,
tracing (14.799 s) : 14799000, 14799000
. : milestone, 14799000,
section candidate
no_agent (15.29 s) : 15290000, 15290000
. : milestone, 15290000,
appsec (15.038 s) : 15038000, 15038000
. : milestone, 15038000,
iast (18.203 s) : 18203000, 18203000
. : milestone, 18203000,
iast_GLOBAL (17.812 s) : 17812000, 17812000
. : milestone, 17812000,
profiling (15.573 s) : 15573000, 15573000
. : milestone, 15573000,
tracing (15.035 s) : 15035000, 15035000
. : milestone, 15035000,
|
shatzi
left a comment
There was a problem hiding this comment.
looks great, but I think we need to a little more here
| verify(probeStatusSink, times(1)).addError(probeIdCaptor.capture(), strCaptor.capture()); | ||
| assertEquals(PROBE_ID.getId(), probeIdCaptor.getAllValues().get(0).getId()); | ||
| assertEquals( | ||
| "Instrumentation fails for com.datadog.debugger.MyRecord1", |
There was a problem hiding this comment.
I don’t like this error message. I’d prefer: "Instrumentation is not supported for class.method". This makes it clear to the user that nothing is wrong; it’s simply not supported, rather than implying something failed.
| } | ||
| List<Class<?>> changedClasses = | ||
| finder.getAllLoadedChangedClasses(instrumentation.getAllLoadedClasses(), changes); | ||
| changedClasses = detectMethodParameters(changedClasses); |
There was a problem hiding this comment.
I think this means we filter the transformation for those probes, and therefore we don't report any probe status on those classes.
if this is the case, the UI would say error because no diagnostics where received. How complex would be to report a probe status on that one?
| method.getName(), | ||
| parameters[0].getName()); | ||
| // skip the class: compiled with -parameters | ||
| addClass = false; |
There was a problem hiding this comment.
Idea: if getAllLoadedChangedClasses can return a list of probes per class, we can update their status and avoid rechecking the same class in the future. Since we already know probe-id X is blocked, we do not need to report changes for it.
There was a problem hiding this comment.
Should we bail out for entire applications? If one class was compiled using the -parameters argument is it worth rechecking ever again?
There was a problem hiding this comment.
not all classes will be like this, you can have shared libraries or third-party libs that are not compiled with MethodParameters
Prevent classfiles with Method Parameters attribute (javac -parameters) to be (re)transformed when on JDK < 19. Spring 6+ or SpringBoot3+ rely exclusively on method parameters to get param name and if the attribute is not present throw an exception and returns 500 on endpoints. see OpenJDK bug JDK-8240908. we are scanning method with at least on parameter to detect if the class was compiled with method parameters attribute and if the JDK is < 19 we prevent instrumentation to happen. Even at load time we prevent it because we need to call retransform to remove instrumentation. Therefore the attribute can be strip at that time.
canonical record constructor has method parameters attribute
9acdfab to
4bfed3c
Compare
|
Can we add a release note with a breaking change to communicate to customers the added limitations here? |
What Does This Do
Prevent classfiles with Method Parameters attribute (javac -parameters) to be (re)transformed when on JDK < 19. Spring 6+ or SpringBoot3+ rely exclusively on method parameters to get param name and if the attribute is not present throw an exception and returns 500 on endpoints.
see OpenJDK bug JDK-8240908.
we are scanning method with at least on parameter to detect if the class was compiled with method parameters attribute and if the JDK is < 19 we prevent instrumentation to happen.
Even at load time we prevent it because we need to call retransform to remove instrumentation. Therefore the attribute can be strip at that time.
Note: because Scala compiler always emits Method Parameters attribute, probe cannot work on scala if running on JDK < 19
Motivation
Additional Notes
OpenJDK bug
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: DEBUG-5131