-
Notifications
You must be signed in to change notification settings - Fork 292
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
Add outer exceptions support for Exception Replay #7897
Conversation
In some cases, the innermost exception could contain only third-party frames and no instrumentation is performed while the exception could be re-throw up in the stack where the call originated. This could help to root cause the inner exception. Now in that case we are climbing up the chained of exceptions to find user frames to instrument. when finding the innermost exception, we are reporting the list of all outer exceptions beginning by the innermost. The chained index is also kept in the probe and injected into the snapshot to be able to remap the frame index correctly and report it to the span as tag.
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 5 performance regressions! Performance is the same for 5 metrics, 5 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 (298.075 µs) : 274, 322
. : milestone, 298,
basic (299.783 µs) : 291, 309
. : milestone, 300,
loop (10.313 ms) : 10275, 10351
. : milestone, 10313,
section candidate
noprobe (304.206 µs) : 265, 344
. : milestone, 304,
basic (302.146 µs) : 293, 311
. : milestone, 302,
loop (10.946 ms) : 10912, 10980
. : milestone, 10946,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.43.0-SNAPSHOT~df904f0d38, baseline=1.43.0-SNAPSHOT~6082863645
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.089 s) : 0, 1089125
Total [baseline] (8.629 s) : 0, 8628734
Agent [candidate] (1.084 s) : 0, 1083904
Total [candidate] (8.654 s) : 0, 8653863
section iast
Agent [baseline] (1.211 s) : 0, 1210731
Total [baseline] (9.122 s) : 0, 9122371
Agent [candidate] (1.217 s) : 0, 1216541
Total [candidate] (9.174 s) : 0, 9173923
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.21 s) : 0, 1209776
Total [baseline] (9.108 s) : 0, 9107586
Agent [candidate] (1.243 s) : 0, 1243399
Total [candidate] (9.159 s) : 0, 9159291
section iast_TELEMETRY_OFF
Agent [baseline] (1.207 s) : 0, 1206949
Total [baseline] (9.139 s) : 0, 9138746
Agent [candidate] (1.206 s) : 0, 1205901
Total [candidate] (9.123 s) : 0, 9122956
gantt
title insecure-bank - break down per module: candidate=1.43.0-SNAPSHOT~df904f0d38, baseline=1.43.0-SNAPSHOT~6082863645
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (691.835 ms) : 0, 691835
BytebuddyAgent [candidate] (687.919 ms) : 0, 687919
GlobalTracer [baseline] (317.621 ms) : 0, 317621
GlobalTracer [candidate] (317.041 ms) : 0, 317041
AppSec [baseline] (54.472 ms) : 0, 54472
AppSec [candidate] (54.465 ms) : 0, 54465
Remote Config [baseline] (685.211 µs) : 0, 685
Remote Config [candidate] (670.667 µs) : 0, 671
Telemetry [baseline] (10.644 ms) : 0, 10644
Telemetry [candidate] (10.017 ms) : 0, 10017
section iast
BytebuddyAgent [baseline] (805.297 ms) : 0, 805297
BytebuddyAgent [candidate] (808.796 ms) : 0, 808796
GlobalTracer [baseline] (305.6 ms) : 0, 305600
GlobalTracer [candidate] (307.422 ms) : 0, 307422
AppSec [baseline] (57.299 ms) : 0, 57299
AppSec [candidate] (57.589 ms) : 0, 57589
IAST [baseline] (20.567 ms) : 0, 20567
IAST [candidate] (20.688 ms) : 0, 20688
Remote Config [baseline] (611.352 µs) : 0, 611
Remote Config [candidate] (606.469 µs) : 0, 606
Telemetry [baseline] (7.514 ms) : 0, 7514
Telemetry [candidate] (7.543 ms) : 0, 7543
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (804.454 ms) : 0, 804454
BytebuddyAgent [candidate] (827.785 ms) : 0, 827785
GlobalTracer [baseline] (305.15 ms) : 0, 305150
GlobalTracer [candidate] (313.259 ms) : 0, 313259
AppSec [baseline] (57.591 ms) : 0, 57591
AppSec [candidate] (58.547 ms) : 0, 58547
IAST [baseline] (20.731 ms) : 0, 20731
IAST [candidate] (21.317 ms) : 0, 21317
Remote Config [baseline] (598.772 µs) : 0, 599
Remote Config [candidate] (642.739 µs) : 0, 643
Telemetry [baseline] (7.492 ms) : 0, 7492
Telemetry [candidate] (7.672 ms) : 0, 7672
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (801.656 ms) : 0, 801656
BytebuddyAgent [candidate] (800.983 ms) : 0, 800983
GlobalTracer [baseline] (304.901 ms) : 0, 304901
GlobalTracer [candidate] (305.043 ms) : 0, 305043
AppSec [baseline] (56.783 ms) : 0, 56783
AppSec [candidate] (57.901 ms) : 0, 57901
IAST [baseline] (21.001 ms) : 0, 21001
IAST [candidate] (20.233 ms) : 0, 20233
Remote Config [baseline] (590.817 µs) : 0, 591
Remote Config [candidate] (603.516 µs) : 0, 604
Telemetry [baseline] (8.238 ms) : 0, 8238
Telemetry [candidate] (7.388 ms) : 0, 7388
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.43.0-SNAPSHOT~df904f0d38, baseline=1.43.0-SNAPSHOT~6082863645
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.089 s) : 0, 1088966
Total [baseline] (10.444 s) : 0, 10443734
Agent [candidate] (1.086 s) : 0, 1086176
Total [candidate] (10.371 s) : 0, 10370705
section appsec
Agent [baseline] (1.219 s) : 0, 1219355
Total [baseline] (10.682 s) : 0, 10681878
Agent [candidate] (1.218 s) : 0, 1218454
Total [candidate] (10.672 s) : 0, 10672078
section iast
Agent [baseline] (1.218 s) : 0, 1217992
Total [baseline] (10.916 s) : 0, 10915750
Agent [candidate] (1.209 s) : 0, 1209310
Total [candidate] (10.975 s) : 0, 10974701
section profiling
Agent [baseline] (1.279 s) : 0, 1279003
Total [baseline] (10.709 s) : 0, 10709144
Agent [candidate] (1.283 s) : 0, 1283219
Total [candidate] (10.792 s) : 0, 10791817
gantt
title petclinic - break down per module: candidate=1.43.0-SNAPSHOT~df904f0d38, baseline=1.43.0-SNAPSHOT~6082863645
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (691.649 ms) : 0, 691649
BytebuddyAgent [candidate] (688.641 ms) : 0, 688641
GlobalTracer [baseline] (318.19 ms) : 0, 318190
GlobalTracer [candidate] (317.268 ms) : 0, 317268
AppSec [baseline] (54.648 ms) : 0, 54648
AppSec [candidate] (54.538 ms) : 0, 54538
Remote Config [baseline] (679.641 µs) : 0, 680
Remote Config [candidate] (675.066 µs) : 0, 675
Telemetry [baseline] (9.945 ms) : 0, 9945
Telemetry [candidate] (11.284 ms) : 0, 11284
section appsec
BytebuddyAgent [baseline] (706.883 ms) : 0, 706883
BytebuddyAgent [candidate] (705.313 ms) : 0, 705313
GlobalTracer [baseline] (314.11 ms) : 0, 314110
GlobalTracer [candidate] (314.377 ms) : 0, 314377
AppSec [baseline] (165.688 ms) : 0, 165688
AppSec [candidate] (166.77 ms) : 0, 166770
Remote Config [baseline] (634.484 µs) : 0, 634
Remote Config [candidate] (640.563 µs) : 0, 641
Telemetry [baseline] (8.142 ms) : 0, 8142
Telemetry [candidate] (7.785 ms) : 0, 7785
IAST [baseline] (20.269 ms) : 0, 20269
IAST [candidate] (19.645 ms) : 0, 19645
section iast
BytebuddyAgent [baseline] (810.322 ms) : 0, 810322
BytebuddyAgent [candidate] (803.333 ms) : 0, 803333
GlobalTracer [baseline] (307.327 ms) : 0, 307327
GlobalTracer [candidate] (305.854 ms) : 0, 305854
AppSec [baseline] (56.787 ms) : 0, 56787
AppSec [candidate] (56.592 ms) : 0, 56592
Remote Config [baseline] (613.351 µs) : 0, 613
Remote Config [candidate] (612.405 µs) : 0, 612
Telemetry [baseline] (7.483 ms) : 0, 7483
Telemetry [candidate] (7.523 ms) : 0, 7523
IAST [baseline] (21.591 ms) : 0, 21591
IAST [candidate] (21.622 ms) : 0, 21622
section profiling
BytebuddyAgent [baseline] (680.975 ms) : 0, 680975
BytebuddyAgent [candidate] (683.568 ms) : 0, 683568
GlobalTracer [baseline] (399.696 ms) : 0, 399696
GlobalTracer [candidate] (399.63 ms) : 0, 399630
AppSec [baseline] (54.653 ms) : 0, 54653
AppSec [candidate] (54.761 ms) : 0, 54761
Remote Config [baseline] (668.341 µs) : 0, 668
Remote Config [candidate] (686.61 µs) : 0, 687
Telemetry [baseline] (11.924 ms) : 0, 11924
Telemetry [candidate] (12.923 ms) : 0, 12923
ProfilingAgent [baseline] (92.092 ms) : 0, 92092
ProfilingAgent [candidate] (92.608 ms) : 0, 92608
Profiling [baseline] (92.115 ms) : 0, 92115
Profiling [candidate] (92.633 ms) : 0, 92633
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~df904f0d38, baseline=1.43.0-SNAPSHOT~6082863645
dateFormat X
axisFormat %s
section baseline
no_agent (1.341 ms) : 1322, 1360
. : milestone, 1341,
appsec (1.729 ms) : 1705, 1753
. : milestone, 1729,
appsec_no_iast (1.711 ms) : 1687, 1736
. : milestone, 1711,
iast (1.482 ms) : 1459, 1505
. : milestone, 1482,
profiling (1.481 ms) : 1459, 1504
. : milestone, 1481,
tracing (1.482 ms) : 1459, 1506
. : milestone, 1482,
section candidate
no_agent (1.325 ms) : 1305, 1345
. : milestone, 1325,
appsec (1.733 ms) : 1710, 1756
. : milestone, 1733,
appsec_no_iast (1.702 ms) : 1677, 1726
. : milestone, 1702,
iast (1.485 ms) : 1463, 1507
. : milestone, 1485,
profiling (1.529 ms) : 1505, 1553
. : milestone, 1529,
tracing (1.459 ms) : 1433, 1484
. : milestone, 1459,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~df904f0d38, baseline=1.43.0-SNAPSHOT~6082863645
dateFormat X
axisFormat %s
section baseline
no_agent (372.468 µs) : 353, 392
. : milestone, 372,
iast (492.663 µs) : 470, 515
. : milestone, 493,
iast_FULL (641.436 µs) : 620, 663
. : milestone, 641,
iast_GLOBAL (510.452 µs) : 489, 532
. : milestone, 510,
iast_HARDCODED_SECRET_DISABLED (498.918 µs) : 475, 523
. : milestone, 499,
iast_INACTIVE (446.98 µs) : 426, 468
. : milestone, 447,
iast_TELEMETRY_OFF (474.767 µs) : 454, 496
. : milestone, 475,
tracing (447.76 µs) : 427, 469
. : milestone, 448,
section candidate
no_agent (367.989 µs) : 348, 388
. : milestone, 368,
iast (481.516 µs) : 460, 503
. : milestone, 482,
iast_FULL (643.987 µs) : 623, 665
. : milestone, 644,
iast_GLOBAL (505.994 µs) : 485, 527
. : milestone, 506,
iast_HARDCODED_SECRET_DISABLED (488.711 µs) : 467, 510
. : milestone, 489,
iast_INACTIVE (449.367 µs) : 428, 471
. : milestone, 449,
iast_TELEMETRY_OFF (476.279 µs) : 455, 498
. : milestone, 476,
tracing (440.323 µs) : 420, 461
. : milestone, 440,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.43.0-SNAPSHOT~df904f0d38, baseline=1.43.0-SNAPSHOT~6082863645
dateFormat X
axisFormat %s
section baseline
no_agent (15.036 s) : 15036000, 15036000
. : milestone, 15036000,
appsec (15.18 s) : 15180000, 15180000
. : milestone, 15180000,
iast (18.501 s) : 18501000, 18501000
. : milestone, 18501000,
iast_GLOBAL (17.932 s) : 17932000, 17932000
. : milestone, 17932000,
profiling (15.062 s) : 15062000, 15062000
. : milestone, 15062000,
tracing (15.266 s) : 15266000, 15266000
. : milestone, 15266000,
section candidate
no_agent (15.296 s) : 15296000, 15296000
. : milestone, 15296000,
appsec (15.335 s) : 15335000, 15335000
. : milestone, 15335000,
iast (18.509 s) : 18509000, 18509000
. : milestone, 18509000,
iast_GLOBAL (17.927 s) : 17927000, 17927000
. : milestone, 17927000,
profiling (15.494 s) : 15494000, 15494000
. : milestone, 15494000,
tracing (15.116 s) : 15116000, 15116000
. : milestone, 15116000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.43.0-SNAPSHOT~df904f0d38, baseline=1.43.0-SNAPSHOT~6082863645
dateFormat X
axisFormat %s
section baseline
no_agent (1.46 ms) : 1449, 1472
. : milestone, 1460,
appsec (2.318 ms) : 2277, 2359
. : milestone, 2318,
iast (2.05 ms) : 1999, 2102
. : milestone, 2050,
iast_GLOBAL (2.098 ms) : 2045, 2150
. : milestone, 2098,
profiling (1.93 ms) : 1888, 1972
. : milestone, 1930,
tracing (1.908 ms) : 1869, 1948
. : milestone, 1908,
section candidate
no_agent (1.461 ms) : 1449, 1472
. : milestone, 1461,
appsec (2.309 ms) : 2268, 2350
. : milestone, 2309,
iast (2.061 ms) : 2008, 2113
. : milestone, 2061,
iast_GLOBAL (2.101 ms) : 2049, 2153
. : milestone, 2101,
profiling (1.92 ms) : 1879, 1961
. : milestone, 1920,
tracing (1.909 ms) : 1869, 1949
. : milestone, 1909,
|
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.
generally looks fine. i know we're not big on docs here but some would help in the innards of all this.
public static Throwable getInnerMostThrowable(Throwable t, Deque<Throwable> chainedExceptions) { | ||
if (chainedExceptions != null) { | ||
chainedExceptions.addFirst(t); | ||
} | ||
int i = 100; | ||
while (t.getCause() != null && i > 0) { |
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.
i think i understand why this code is the way it is but perhaps some documentation explaining the magic number of 100, e.g., would be helpful for future someones.
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
|
||
// Hacky way to generate an exception with a stacktrace that does not contain the test class | ||
// we are starting a thread and create an exception in that thread and return it | ||
class ThirdPartyCode extends Thread { |
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.
tsk tsk. ;)
What Does This Do
In some cases, the innermost exception could contain only third-party frames and no instrumentation is performed while the exception could be re-throw up in the stack where the call originated. This could help to root cause the inner exception.
Now in that case we are climbing up the chained of exceptions to find user frames to instrument.
when finding the innermost exception, we are reporting the list of all outer exceptions beginning by the innermost. The chained index is also kept in the probe and injected into the snapshot to be able to remap the frame index correctly and report it to the span as tag.
Motivation
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: DEBUG-3107