New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Exception debugging instrumentation async #6829
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 1 performance improvements and 1 performance regressions! Performance is the same for 47 metrics, 14 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.32.0-SNAPSHOT~e53c4bc9b7, baseline=1.32.0-SNAPSHOT~78b3d6c5d9
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.078 s) : 0, 1078395
Total [baseline] (8.57 s) : 0, 8570408
Agent [candidate] (1.08 s) : 0, 1080000
Total [candidate] (8.568 s) : 0, 8567789
section iast
Agent [baseline] (1.202 s) : 0, 1201603
Total [baseline] (9.038 s) : 0, 9038203
Agent [candidate] (1.221 s) : 0, 1220994
Total [candidate] (9.101 s) : 0, 9100668
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.211 s) : 0, 1211188
Total [baseline] (9.011 s) : 0, 9011185
Agent [candidate] (1.211 s) : 0, 1210643
Total [candidate] (9.056 s) : 0, 9055853
section iast_TELEMETRY_OFF
Agent [baseline] (1.207 s) : 0, 1206924
Total [baseline] (9.127 s) : 0, 9127244
Agent [candidate] (1.202 s) : 0, 1201735
Total [candidate] (9.043 s) : 0, 9043142
gantt
title insecure-bank - break down per module: candidate=1.32.0-SNAPSHOT~e53c4bc9b7, baseline=1.32.0-SNAPSHOT~78b3d6c5d9
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.414 ms) : 0, 687414
BytebuddyAgent [candidate] (696.24 ms) : 0, 696240
GlobalTracer [baseline] (298.679 ms) : 0, 298679
GlobalTracer [candidate] (291.837 ms) : 0, 291837
AppSec [baseline] (49.496 ms) : 0, 49496
AppSec [candidate] (49.217 ms) : 0, 49217
Remote Config [baseline] (1.086 ms) : 0, 1086
Remote Config [candidate] (1.085 ms) : 0, 1085
Telemetry [baseline] (7.435 ms) : 0, 7435
Telemetry [candidate] (7.352 ms) : 0, 7352
section iast
BytebuddyAgent [baseline] (796.799 ms) : 0, 796799
BytebuddyAgent [candidate] (811.732 ms) : 0, 811732
GlobalTracer [baseline] (288.029 ms) : 0, 288029
GlobalTracer [candidate] (292.547 ms) : 0, 292547
AppSec [baseline] (48.878 ms) : 0, 48878
AppSec [candidate] (50.726 ms) : 0, 50726
IAST [baseline] (25.564 ms) : 0, 25564
IAST [candidate] (23.965 ms) : 0, 23965
Remote Config [baseline] (575.677 µs) : 0, 576
Remote Config [candidate] (571.398 µs) : 0, 571
Telemetry [baseline] (7.35 ms) : 0, 7350
Telemetry [candidate] (6.68 ms) : 0, 6680
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (803.493 ms) : 0, 803493
BytebuddyAgent [candidate] (803.872 ms) : 0, 803872
GlobalTracer [baseline] (290.891 ms) : 0, 290891
GlobalTracer [candidate] (290.698 ms) : 0, 290698
AppSec [baseline] (49.269 ms) : 0, 49269
AppSec [candidate] (50.755 ms) : 0, 50755
IAST [baseline] (25.886 ms) : 0, 25886
IAST [candidate] (21.026 ms) : 0, 21026
Remote Config [baseline] (555.218 µs) : 0, 555
Remote Config [candidate] (581.347 µs) : 0, 581
Telemetry [baseline] (6.479 ms) : 0, 6479
Telemetry [candidate] (9.109 ms) : 0, 9109
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (799.365 ms) : 0, 799365
BytebuddyAgent [candidate] (795.286 ms) : 0, 795286
GlobalTracer [baseline] (291.222 ms) : 0, 291222
GlobalTracer [candidate] (290.573 ms) : 0, 290573
AppSec [baseline] (51.27 ms) : 0, 51270
AppSec [candidate] (50.2 ms) : 0, 50200
IAST [baseline] (23.221 ms) : 0, 23221
IAST [candidate] (24.128 ms) : 0, 24128
Remote Config [baseline] (593.977 µs) : 0, 594
Remote Config [candidate] (605.521 µs) : 0, 606
Telemetry [baseline] (6.688 ms) : 0, 6688
Telemetry [candidate] (6.613 ms) : 0, 6613
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.32.0-SNAPSHOT~e53c4bc9b7, baseline=1.32.0-SNAPSHOT~78b3d6c5d9
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.078 s) : 0, 1078322
Total [baseline] (9.182 s) : 0, 9181902
Agent [candidate] (1.085 s) : 0, 1085185
Total [candidate] (9.138 s) : 0, 9138175
section appsec
Agent [baseline] (1.21 s) : 0, 1209720
Total [baseline] (9.307 s) : 0, 9306897
Agent [candidate] (1.209 s) : 0, 1209080
Total [candidate] (9.282 s) : 0, 9282425
section iast
Agent [baseline] (1.206 s) : 0, 1206244
Total [baseline] (9.362 s) : 0, 9361636
Agent [candidate] (1.208 s) : 0, 1208309
Total [candidate] (9.365 s) : 0, 9365265
section profiling
Agent [baseline] (1.275 s) : 0, 1275419
Total [baseline] (9.388 s) : 0, 9387944
Agent [candidate] (1.276 s) : 0, 1275930
Total [candidate] (9.396 s) : 0, 9395961
gantt
title petclinic - break down per module: candidate=1.32.0-SNAPSHOT~e53c4bc9b7, baseline=1.32.0-SNAPSHOT~78b3d6c5d9
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (686.824 ms) : 0, 686824
BytebuddyAgent [candidate] (699.966 ms) : 0, 699966
GlobalTracer [baseline] (298.917 ms) : 0, 298917
GlobalTracer [candidate] (292.705 ms) : 0, 292705
AppSec [baseline] (49.613 ms) : 0, 49613
AppSec [candidate] (49.155 ms) : 0, 49155
Remote Config [baseline] (1.061 ms) : 0, 1061
Remote Config [candidate] (1.088 ms) : 0, 1088
Telemetry [baseline] (7.543 ms) : 0, 7543
Telemetry [candidate] (7.503 ms) : 0, 7503
section appsec
BytebuddyAgent [baseline] (699.873 ms) : 0, 699873
BytebuddyAgent [candidate] (701.038 ms) : 0, 701038
GlobalTracer [baseline] (293.959 ms) : 0, 293959
GlobalTracer [candidate] (294.008 ms) : 0, 294008
AppSec [baseline] (154.511 ms) : 0, 154511
AppSec [candidate] (153.907 ms) : 0, 153907
Remote Config [baseline] (616.605 µs) : 0, 617
Remote Config [candidate] (623.376 µs) : 0, 623
Telemetry [baseline] (6.857 ms) : 0, 6857
Telemetry [candidate] (6.917 ms) : 0, 6917
IAST [baseline] (19.534 ms) : 0, 19534
IAST [candidate] (18.001 ms) : 0, 18001
section iast
BytebuddyAgent [baseline] (799.939 ms) : 0, 799939
BytebuddyAgent [candidate] (802.451 ms) : 0, 802451
GlobalTracer [baseline] (289.629 ms) : 0, 289629
GlobalTracer [candidate] (290.265 ms) : 0, 290265
AppSec [baseline] (50.512 ms) : 0, 50512
AppSec [candidate] (49.615 ms) : 0, 49615
Remote Config [baseline] (571.696 µs) : 0, 572
Remote Config [candidate] (570.861 µs) : 0, 571
Telemetry [baseline] (6.607 ms) : 0, 6607
Telemetry [candidate] (6.571 ms) : 0, 6571
IAST [baseline] (24.587 ms) : 0, 24587
IAST [candidate] (24.522 ms) : 0, 24522
section profiling
BytebuddyAgent [baseline] (681.008 ms) : 0, 681008
BytebuddyAgent [candidate] (689.811 ms) : 0, 689811
GlobalTracer [baseline] (382.915 ms) : 0, 382915
GlobalTracer [candidate] (376.573 ms) : 0, 376573
AppSec [baseline] (50.369 ms) : 0, 50369
AppSec [candidate] (50.107 ms) : 0, 50107
Remote Config [baseline] (885.048 µs) : 0, 885
Remote Config [candidate] (860.033 µs) : 0, 860
Telemetry [baseline] (7.49 ms) : 0, 7490
Telemetry [candidate] (7.377 ms) : 0, 7377
ProfilingAgent [baseline] (96.541 ms) : 0, 96541
ProfilingAgent [candidate] (95.078 ms) : 0, 95078
Profiling [baseline] (96.564 ms) : 0, 96564
Profiling [candidate] (95.101 ms) : 0, 95101
LoadRequest duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.32.0-SNAPSHOT~e53c4bc9b7, baseline=1.32.0-SNAPSHOT~78b3d6c5d9
dateFormat X
axisFormat %s
section baseline
no_agent (361.707 µs) : 342, 382
. : milestone, 362,
iast (472.735 µs) : 452, 493
. : milestone, 473,
iast_FULL (544.998 µs) : 525, 565
. : milestone, 545,
iast_GLOBAL (487.249 µs) : 467, 508
. : milestone, 487,
iast_HARDCODED_SECRET_DISABLED (473.55 µs) : 453, 494
. : milestone, 474,
iast_INACTIVE (444.07 µs) : 424, 464
. : milestone, 444,
iast_TELEMETRY_OFF (471.861 µs) : 450, 493
. : milestone, 472,
tracing (442.796 µs) : 422, 464
. : milestone, 443,
section candidate
no_agent (362.881 µs) : 343, 383
. : milestone, 363,
iast (484.598 µs) : 464, 505
. : milestone, 485,
iast_FULL (540.189 µs) : 519, 561
. : milestone, 540,
iast_GLOBAL (495.967 µs) : 475, 517
. : milestone, 496,
iast_HARDCODED_SECRET_DISABLED (472.917 µs) : 452, 493
. : milestone, 473,
iast_INACTIVE (456.233 µs) : 435, 478
. : milestone, 456,
iast_TELEMETRY_OFF (462.383 µs) : 442, 483
. : milestone, 462,
tracing (443.164 µs) : 422, 464
. : milestone, 443,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.32.0-SNAPSHOT~e53c4bc9b7, baseline=1.32.0-SNAPSHOT~78b3d6c5d9
dateFormat X
axisFormat %s
section baseline
no_agent (1.359 ms) : 1340, 1378
. : milestone, 1359,
appsec (1.786 ms) : 1763, 1809
. : milestone, 1786,
iast (1.494 ms) : 1471, 1518
. : milestone, 1494,
profiling (1.541 ms) : 1517, 1565
. : milestone, 1541,
tracing (1.512 ms) : 1488, 1536
. : milestone, 1512,
section candidate
no_agent (1.349 ms) : 1330, 1368
. : milestone, 1349,
appsec (1.789 ms) : 1766, 1812
. : milestone, 1789,
iast (1.538 ms) : 1515, 1561
. : milestone, 1538,
profiling (1.516 ms) : 1492, 1539
. : milestone, 1516,
tracing (1.505 ms) : 1481, 1528
. : milestone, 1505,
|
5d73b78
to
1679925
Compare
Rename config option for exception debugging from DD_DYNAMIC_INSTRUMENTATION_EXCEPTION_ENABLED to DD_EXCEPTION_DEBUGGING_ENABLED Fix frame index following the change in Error Tracking UI
1679925
to
1c59b38
Compare
} | ||
} | ||
|
||
private void applyExceptionConfiguration(String fingerprint) { | ||
configurationUpdater.accept(EXCEPTION, exceptionProbeManager.getProbes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add check: if (exceptionProbeManager.isAlreadyInstrumented(fingerprint)) {
to avoid race condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm no because IsAlreadyInstrumented
rely on the fact we add the fingerprint which is now done after applying the config...
@@ -73,7 +73,7 @@ public static Throwable getInnerMostThrowable(Throwable t) { | |||
|
|||
public static StackTraceElement[] flattenStackTrace(Throwable t) { | |||
List<StackTraceElement> result = new ArrayList<>(); | |||
result.add(null); // add a stack frame representing the exception message | |||
// result.add(null); // add a stack frame representing the exception message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right!
@@ -52,4 +53,19 @@ void filterAllFrames() { | |||
exceptionProbeManager.createProbesForException("", exception.getStackTrace()); | |||
assertEquals(0, exceptionProbeManager.getProbes().size()); | |||
} | |||
|
|||
static void waitForInstrumentation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a great utility function to have
assertWithTimeout(()->exceptionProbeManager.isAlreadyInstrumented(fingerprint), Duration.OfSeconds(30))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
What Does This Do
Rename config option for exception debugging from
DD_DYNAMIC_INSTRUMENTATION_EXCEPTION_ENABLED
toDD_EXCEPTION_DEBUGGING_ENABLED
Fix frame index following the change in Error Tracking UI
Motivation
Additional Notes
Jira ticket: DEBUG-2068