-
Notifications
You must be signed in to change notification settings - Fork 324
Add Custom Exception Handler to Unwrap CompletionException for GraphQL Instrumentations
#10389
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
base: master
Are you sure you want to change the base?
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 12 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.59.0-SNAPSHOT~557d566fa8, baseline=1.59.0-SNAPSHOT~fae5bf3ff7
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.128 s) : 0, 1127549
Total [baseline] (11.221 s) : 0, 11221098
Agent [candidate] (1.128 s) : 0, 1127785
Total [candidate] (11.185 s) : 0, 11184872
section appsec
Agent [baseline] (1.311 s) : 0, 1311444
Total [baseline] (11.495 s) : 0, 11494583
Agent [candidate] (1.304 s) : 0, 1304136
Total [candidate] (11.534 s) : 0, 11533755
section iast
Agent [baseline] (1.261 s) : 0, 1261127
Total [baseline] (11.463 s) : 0, 11463117
Agent [candidate] (1.262 s) : 0, 1262233
Total [candidate] (11.5 s) : 0, 11500437
section profiling
Agent [baseline] (1.247 s) : 0, 1246912
Total [baseline] (11.175 s) : 0, 11175388
Agent [candidate] (1.24 s) : 0, 1240048
Total [candidate] (11.186 s) : 0, 11186191
gantt
title petclinic - break down per module: candidate=1.59.0-SNAPSHOT~557d566fa8, baseline=1.59.0-SNAPSHOT~fae5bf3ff7
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.268 ms) : 0, 1268
crashtracking [candidate] (1.265 ms) : 0, 1265
BytebuddyAgent [baseline] (675.222 ms) : 0, 675222
BytebuddyAgent [candidate] (676.234 ms) : 0, 676234
GlobalTracer [baseline] (294.955 ms) : 0, 294955
GlobalTracer [candidate] (294.421 ms) : 0, 294421
AppSec [baseline] (33.988 ms) : 0, 33988
AppSec [candidate] (34.031 ms) : 0, 34031
Debugger [baseline] (70.671 ms) : 0, 70671
Debugger [candidate] (71.119 ms) : 0, 71119
Remote Config [baseline] (695.071 µs) : 0, 695
Remote Config [candidate] (696.785 µs) : 0, 697
Telemetry [baseline] (9.368 ms) : 0, 9368
Telemetry [candidate] (9.423 ms) : 0, 9423
Flare Poller [baseline] (4.847 ms) : 0, 4847
Flare Poller [candidate] (3.912 ms) : 0, 3912
section appsec
crashtracking [baseline] (1.25 ms) : 0, 1250
crashtracking [candidate] (1.253 ms) : 0, 1253
BytebuddyAgent [baseline] (713.342 ms) : 0, 713342
BytebuddyAgent [candidate] (710.499 ms) : 0, 710499
GlobalTracer [baseline] (269.82 ms) : 0, 269820
GlobalTracer [candidate] (268.543 ms) : 0, 268543
IAST [baseline] (26.119 ms) : 0, 26119
IAST [candidate] (25.773 ms) : 0, 25773
AppSec [baseline] (178.383 ms) : 0, 178383
AppSec [candidate] (178.707 ms) : 0, 178707
Debugger [baseline] (71.484 ms) : 0, 71484
Debugger [candidate] (68.522 ms) : 0, 68522
Remote Config [baseline] (858.821 µs) : 0, 859
Remote Config [candidate] (846.269 µs) : 0, 846
Telemetry [baseline] (9.792 ms) : 0, 9792
Telemetry [candidate] (9.829 ms) : 0, 9829
Flare Poller [baseline] (3.959 ms) : 0, 3959
Flare Poller [candidate] (3.951 ms) : 0, 3951
section iast
crashtracking [baseline] (1.245 ms) : 0, 1245
crashtracking [candidate] (1.246 ms) : 0, 1246
BytebuddyAgent [baseline] (810.755 ms) : 0, 810755
BytebuddyAgent [candidate] (812.789 ms) : 0, 812789
GlobalTracer [baseline] (266.708 ms) : 0, 266708
GlobalTracer [candidate] (266.187 ms) : 0, 266187
IAST [baseline] (28.086 ms) : 0, 28086
IAST [candidate] (28.299 ms) : 0, 28299
AppSec [baseline] (35.352 ms) : 0, 35352
AppSec [candidate] (34.066 ms) : 0, 34066
Debugger [baseline] (69.477 ms) : 0, 69477
Debugger [candidate] (70.429 ms) : 0, 70429
Remote Config [baseline] (612.446 µs) : 0, 612
Remote Config [candidate] (629.239 µs) : 0, 629
Telemetry [baseline] (8.908 ms) : 0, 8908
Telemetry [candidate] (8.777 ms) : 0, 8777
Flare Poller [baseline] (3.731 ms) : 0, 3731
Flare Poller [candidate] (3.669 ms) : 0, 3669
section profiling
crashtracking [baseline] (1.278 ms) : 0, 1278
crashtracking [candidate] (1.263 ms) : 0, 1263
BytebuddyAgent [baseline] (724.704 ms) : 0, 724704
BytebuddyAgent [candidate] (721.011 ms) : 0, 721011
GlobalTracer [baseline] (231.666 ms) : 0, 231666
GlobalTracer [candidate] (231.15 ms) : 0, 231150
AppSec [baseline] (33.568 ms) : 0, 33568
AppSec [candidate] (33.374 ms) : 0, 33374
Debugger [baseline] (71.564 ms) : 0, 71564
Debugger [candidate] (70.884 ms) : 0, 70884
Remote Config [baseline] (648.847 µs) : 0, 649
Remote Config [candidate] (699.599 µs) : 0, 700
Telemetry [baseline] (9.474 ms) : 0, 9474
Telemetry [candidate] (9.545 ms) : 0, 9545
Flare Poller [baseline] (3.901 ms) : 0, 3901
Flare Poller [candidate] (3.898 ms) : 0, 3898
ProfilingAgent [baseline] (98.725 ms) : 0, 98725
ProfilingAgent [candidate] (97.173 ms) : 0, 97173
Profiling [baseline] (99.323 ms) : 0, 99323
Profiling [candidate] (97.77 ms) : 0, 97770
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.59.0-SNAPSHOT~557d566fa8, baseline=1.59.0-SNAPSHOT~fae5bf3ff7
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.116 s) : 0, 1115506
Total [baseline] (9.385 s) : 0, 9384988
Agent [candidate] (1.117 s) : 0, 1116892
Total [candidate] (9.393 s) : 0, 9393003
section iast
Agent [baseline] (1.26 s) : 0, 1260161
Total [baseline] (9.977 s) : 0, 9976620
Agent [candidate] (1.259 s) : 0, 1259061
Total [candidate] (9.993 s) : 0, 9992712
gantt
title insecure-bank - break down per module: candidate=1.59.0-SNAPSHOT~557d566fa8, baseline=1.59.0-SNAPSHOT~fae5bf3ff7
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.271 ms) : 0, 1271
crashtracking [candidate] (1.242 ms) : 0, 1242
BytebuddyAgent [baseline] (668.142 ms) : 0, 668142
BytebuddyAgent [candidate] (670.373 ms) : 0, 670373
GlobalTracer [baseline] (292.209 ms) : 0, 292209
GlobalTracer [candidate] (291.917 ms) : 0, 291917
AppSec [baseline] (33.738 ms) : 0, 33738
AppSec [candidate] (33.536 ms) : 0, 33536
Debugger [baseline] (70.061 ms) : 0, 70061
Debugger [candidate] (69.673 ms) : 0, 69673
Remote Config [baseline] (687.96 µs) : 0, 688
Remote Config [candidate] (712.26 µs) : 0, 712
Telemetry [baseline] (9.275 ms) : 0, 9275
Telemetry [candidate] (9.322 ms) : 0, 9322
Flare Poller [baseline] (3.85 ms) : 0, 3850
Flare Poller [candidate] (3.904 ms) : 0, 3904
section iast
crashtracking [baseline] (1.241 ms) : 0, 1241
crashtracking [candidate] (1.253 ms) : 0, 1253
BytebuddyAgent [baseline] (812.08 ms) : 0, 812080
BytebuddyAgent [candidate] (811.781 ms) : 0, 811781
GlobalTracer [baseline] (266.465 ms) : 0, 266465
GlobalTracer [candidate] (266.238 ms) : 0, 266238
IAST [baseline] (28.048 ms) : 0, 28048
IAST [candidate] (28.038 ms) : 0, 28038
AppSec [baseline] (37.242 ms) : 0, 37242
AppSec [candidate] (33.183 ms) : 0, 33183
Debugger [baseline] (65.924 ms) : 0, 65924
Debugger [candidate] (69.426 ms) : 0, 69426
Remote Config [baseline] (604.972 µs) : 0, 605
Remote Config [candidate] (620.986 µs) : 0, 621
Telemetry [baseline] (8.811 ms) : 0, 8811
Telemetry [candidate] (8.784 ms) : 0, 8784
Flare Poller [baseline] (3.658 ms) : 0, 3658
Flare Poller [candidate] (3.689 ms) : 0, 3689
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 17 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~557d566fa8, baseline=1.59.0-SNAPSHOT~fae5bf3ff7
dateFormat X
axisFormat %s
section baseline
no_agent (19.671 ms) : 19468, 19874
. : milestone, 19671,
appsec (19.131 ms) : 18937, 19324
. : milestone, 19131,
code_origins (18.273 ms) : 18091, 18455
. : milestone, 18273,
iast (18.024 ms) : 17842, 18206
. : milestone, 18024,
profiling (21.137 ms) : 20930, 21344
. : milestone, 21137,
tracing (18.355 ms) : 18170, 18539
. : milestone, 18355,
section candidate
no_agent (19.768 ms) : 19566, 19971
. : milestone, 19768,
appsec (19.119 ms) : 18924, 19314
. : milestone, 19119,
code_origins (18.396 ms) : 18208, 18583
. : milestone, 18396,
iast (17.985 ms) : 17807, 18164
. : milestone, 17985,
profiling (19.183 ms) : 18992, 19374
. : milestone, 19183,
tracing (18.559 ms) : 18369, 18748
. : milestone, 18559,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~557d566fa8, baseline=1.59.0-SNAPSHOT~fae5bf3ff7
dateFormat X
axisFormat %s
section baseline
no_agent (1.299 ms) : 1286, 1312
. : milestone, 1299,
iast (3.317 ms) : 3269, 3365
. : milestone, 3317,
iast_FULL (6.446 ms) : 6378, 6514
. : milestone, 6446,
iast_GLOBAL (3.873 ms) : 3803, 3943
. : milestone, 3873,
profiling (2.319 ms) : 2298, 2340
. : milestone, 2319,
tracing (2.012 ms) : 1994, 2029
. : milestone, 2012,
section candidate
no_agent (1.317 ms) : 1305, 1330
. : milestone, 1317,
iast (3.497 ms) : 3448, 3546
. : milestone, 3497,
iast_FULL (6.487 ms) : 6418, 6557
. : milestone, 6487,
iast_GLOBAL (3.772 ms) : 3711, 3832
. : milestone, 3772,
profiling (2.415 ms) : 2392, 2438
. : milestone, 2415,
tracing (1.912 ms) : 1896, 1928
. : milestone, 1912,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~557d566fa8, baseline=1.59.0-SNAPSHOT~fae5bf3ff7
dateFormat X
axisFormat %s
section baseline
no_agent (1.486 ms) : 1475, 1498
. : milestone, 1486,
appsec (2.802 ms) : 2717, 2887
. : milestone, 2802,
iast (2.585 ms) : 2482, 2687
. : milestone, 2585,
iast_GLOBAL (2.631 ms) : 2528, 2734
. : milestone, 2631,
profiling (2.406 ms) : 2319, 2492
. : milestone, 2406,
tracing (2.382 ms) : 2298, 2467
. : milestone, 2382,
section candidate
no_agent (1.485 ms) : 1473, 1496
. : milestone, 1485,
appsec (2.806 ms) : 2720, 2891
. : milestone, 2806,
iast (2.595 ms) : 2492, 2699
. : milestone, 2595,
iast_GLOBAL (2.627 ms) : 2524, 2731
. : milestone, 2627,
profiling (2.441 ms) : 2352, 2530
. : milestone, 2441,
tracing (2.364 ms) : 2281, 2448
. : milestone, 2364,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~557d566fa8, baseline=1.59.0-SNAPSHOT~fae5bf3ff7
dateFormat X
axisFormat %s
section baseline
no_agent (15.117 s) : 15117000, 15117000
. : milestone, 15117000,
appsec (14.374 s) : 14374000, 14374000
. : milestone, 14374000,
iast (17.535 s) : 17535000, 17535000
. : milestone, 17535000,
iast_GLOBAL (17.11 s) : 17110000, 17110000
. : milestone, 17110000,
profiling (14.609 s) : 14609000, 14609000
. : milestone, 14609000,
tracing (14.125 s) : 14125000, 14125000
. : milestone, 14125000,
section candidate
no_agent (14.999 s) : 14999000, 14999000
. : milestone, 14999000,
appsec (14.074 s) : 14074000, 14074000
. : milestone, 14074000,
iast (17.683 s) : 17683000, 17683000
. : milestone, 17683000,
iast_GLOBAL (17.491 s) : 17491000, 17491000
. : milestone, 17491000,
profiling (14.157 s) : 14157000, 14157000
. : milestone, 14157000,
tracing (14.219 s) : 14219000, 14219000
. : milestone, 14219000,
|
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
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 would want to make sure there are no issues with unwrapping in all possible cases. Perhaps keeping the original exception would be helpful for keeping context of where the original exception occurred in the stack trace, because unwrapping will only keep the inner exception's stack trace. Otherwise if this is not a concern, then LGTM
What Does This Do
Currently, if async calls done in the GraphQL result in exceptions, the integration will return the exception wrapped in a
CompletionException. This PR instruments theDataFetcherExceptionHandlerParameters.getExceptionmethod to unwrap the exception of anyCompletionExceptionbefore sending the exception to GraphQL'sDataFetcherExceptionHandler.Note that GraphQL's basic implementation of their
DataFetcherExceptionHandleralready unwraps one layer ofCompletionException.Motivation
Escalation
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]