-
Notifications
You must be signed in to change notification settings - Fork 320
Avoid NPE on BaseDecorator #10209
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
Avoid NPE on BaseDecorator #10209
Conversation
PerfectSlayer
left a comment
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.
Thanks for the extra safety 🙏
|
|
||
| public AgentSpan onError(final AgentSpan span, final Throwable throwable, byte errorPriority) { | ||
| if (throwable != null) { | ||
| if (throwable != null && span != null) { |
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.
🔍 nitpick: I would have switch the null checks for clarity wrt to the method arguments 😛 (you know how I like to bother your about non significant details)
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 7 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.57.0-SNAPSHOT~a2256f0b86, baseline=1.57.0-SNAPSHOT~fef9d162d8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.086 s) : 0, 1086147
Total [baseline] (8.762 s) : 0, 8762066
Agent [candidate] (1.088 s) : 0, 1087657
Total [candidate] (8.765 s) : 0, 8764583
section iast
Agent [baseline] (1.218 s) : 0, 1217976
Total [baseline] (9.373 s) : 0, 9372850
Agent [candidate] (1.221 s) : 0, 1220815
Total [candidate] (9.383 s) : 0, 9383401
gantt
title insecure-bank - break down per module: candidate=1.57.0-SNAPSHOT~a2256f0b86, baseline=1.57.0-SNAPSHOT~fef9d162d8
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.192 ms) : 0, 1192
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (652.597 ms) : 0, 652597
BytebuddyAgent [candidate] (653.803 ms) : 0, 653803
GlobalTracer [baseline] (282.97 ms) : 0, 282970
GlobalTracer [candidate] (283.588 ms) : 0, 283588
AppSec [baseline] (32.563 ms) : 0, 32563
AppSec [candidate] (32.485 ms) : 0, 32485
Debugger [baseline] (67.545 ms) : 0, 67545
Debugger [candidate] (67.279 ms) : 0, 67279
Remote Config [baseline] (628.631 µs) : 0, 629
Remote Config [candidate] (666.912 µs) : 0, 667
Telemetry [baseline] (9.106 ms) : 0, 9106
Telemetry [candidate] (9.127 ms) : 0, 9127
Flare Poller [baseline] (3.817 ms) : 0, 3817
Flare Poller [candidate] (3.83 ms) : 0, 3830
section iast
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.183 ms) : 0, 1183
BytebuddyAgent [baseline] (788.03 ms) : 0, 788030
BytebuddyAgent [candidate] (791.066 ms) : 0, 791066
GlobalTracer [baseline] (254.936 ms) : 0, 254936
GlobalTracer [candidate] (254.92 ms) : 0, 254920
IAST [baseline] (26.837 ms) : 0, 26837
IAST [candidate] (26.885 ms) : 0, 26885
AppSec [baseline] (35.205 ms) : 0, 35205
AppSec [candidate] (32.501 ms) : 0, 32501
Debugger [baseline] (63.862 ms) : 0, 63862
Debugger [candidate] (66.37 ms) : 0, 66370
Remote Config [baseline] (542.74 µs) : 0, 543
Remote Config [candidate] (562.368 µs) : 0, 562
Telemetry [baseline] (8.486 ms) : 0, 8486
Telemetry [candidate] (8.417 ms) : 0, 8417
Flare Poller [baseline] (3.546 ms) : 0, 3546
Flare Poller [candidate] (3.495 ms) : 0, 3495
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.57.0-SNAPSHOT~a2256f0b86, baseline=1.57.0-SNAPSHOT~fef9d162d8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.081 s) : 0, 1080834
Total [baseline] (10.85 s) : 0, 10850040
Agent [candidate] (1.088 s) : 0, 1087979
Total [candidate] (10.898 s) : 0, 10898282
section appsec
Agent [baseline] (1.263 s) : 0, 1263142
Total [baseline] (10.937 s) : 0, 10936624
Agent [candidate] (1.264 s) : 0, 1263691
Total [candidate] (10.91 s) : 0, 10910452
section iast
Agent [baseline] (1.228 s) : 0, 1228495
Total [baseline] (11.243 s) : 0, 11243341
Agent [candidate] (1.23 s) : 0, 1230244
Total [candidate] (11.239 s) : 0, 11238925
section profiling
Agent [baseline] (1.203 s) : 0, 1202590
Total [baseline] (10.915 s) : 0, 10915397
Agent [candidate] (1.205 s) : 0, 1205306
Total [candidate] (10.872 s) : 0, 10871547
gantt
title petclinic - break down per module: candidate=1.57.0-SNAPSHOT~a2256f0b86, baseline=1.57.0-SNAPSHOT~fef9d162d8
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.18 ms) : 0, 1180
crashtracking [candidate] (1.183 ms) : 0, 1183
BytebuddyAgent [baseline] (648.877 ms) : 0, 648877
BytebuddyAgent [candidate] (653.545 ms) : 0, 653545
GlobalTracer [baseline] (281.139 ms) : 0, 281139
GlobalTracer [candidate] (283.272 ms) : 0, 283272
AppSec [baseline] (32.389 ms) : 0, 32389
AppSec [candidate] (32.445 ms) : 0, 32445
Debugger [baseline] (68.157 ms) : 0, 68157
Debugger [candidate] (68.285 ms) : 0, 68285
Remote Config [baseline] (662.108 µs) : 0, 662
Remote Config [candidate] (633.534 µs) : 0, 634
Telemetry [baseline] (9.068 ms) : 0, 9068
Telemetry [candidate] (9.098 ms) : 0, 9098
Flare Poller [baseline] (3.778 ms) : 0, 3778
Flare Poller [candidate] (3.829 ms) : 0, 3829
section appsec
crashtracking [baseline] (1.177 ms) : 0, 1177
crashtracking [candidate] (1.18 ms) : 0, 1180
BytebuddyAgent [baseline] (688.664 ms) : 0, 688664
BytebuddyAgent [candidate] (688.997 ms) : 0, 688997
GlobalTracer [baseline] (258.616 ms) : 0, 258616
GlobalTracer [candidate] (258.931 ms) : 0, 258931
IAST [baseline] (24.554 ms) : 0, 24554
IAST [candidate] (24.449 ms) : 0, 24449
AppSec [baseline] (174.61 ms) : 0, 174610
AppSec [candidate] (174.268 ms) : 0, 174268
Debugger [baseline] (66.341 ms) : 0, 66341
Debugger [candidate] (66.627 ms) : 0, 66627
Remote Config [baseline] (724.958 µs) : 0, 725
Remote Config [candidate] (717.702 µs) : 0, 718
Telemetry [baseline] (9.097 ms) : 0, 9097
Telemetry [candidate] (9.114 ms) : 0, 9114
Flare Poller [baseline] (3.911 ms) : 0, 3911
Flare Poller [candidate] (3.908 ms) : 0, 3908
section iast
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.206 ms) : 0, 1206
BytebuddyAgent [baseline] (793.862 ms) : 0, 793862
BytebuddyAgent [candidate] (796.392 ms) : 0, 796392
GlobalTracer [baseline] (257.548 ms) : 0, 257548
GlobalTracer [candidate] (257.392 ms) : 0, 257392
IAST [baseline] (27.163 ms) : 0, 27163
IAST [candidate] (27.097 ms) : 0, 27097
AppSec [baseline] (35.26 ms) : 0, 35260
AppSec [candidate] (35.256 ms) : 0, 35256
Debugger [baseline] (65.503 ms) : 0, 65503
Debugger [candidate] (65.015 ms) : 0, 65015
Remote Config [baseline] (550.726 µs) : 0, 551
Remote Config [candidate] (544.94 µs) : 0, 545
Telemetry [baseline] (8.481 ms) : 0, 8481
Telemetry [candidate] (8.38 ms) : 0, 8380
Flare Poller [baseline] (3.498 ms) : 0, 3498
Flare Poller [candidate] (3.445 ms) : 0, 3445
section profiling
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.194 ms) : 0, 1194
BytebuddyAgent [baseline] (701.569 ms) : 0, 701569
BytebuddyAgent [candidate] (702.456 ms) : 0, 702456
GlobalTracer [baseline] (220.33 ms) : 0, 220330
GlobalTracer [candidate] (221.163 ms) : 0, 221163
AppSec [baseline] (32.089 ms) : 0, 32089
AppSec [candidate] (32.237 ms) : 0, 32237
Debugger [baseline] (68.239 ms) : 0, 68239
Debugger [candidate] (68.051 ms) : 0, 68051
Remote Config [baseline] (660.247 µs) : 0, 660
Remote Config [candidate] (645.371 µs) : 0, 645
Telemetry [baseline] (8.939 ms) : 0, 8939
Telemetry [candidate] (9.14 ms) : 0, 9140
Flare Poller [baseline] (3.693 ms) : 0, 3693
Flare Poller [candidate] (3.752 ms) : 0, 3752
ProfilingAgent [baseline] (96.034 ms) : 0, 96034
ProfilingAgent [candidate] (96.864 ms) : 0, 96864
Profiling [baseline] (96.603 ms) : 0, 96603
Profiling [candidate] (97.44 ms) : 0, 97440
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 20 metrics, 16 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~a2256f0b86, baseline=1.57.0-SNAPSHOT~fef9d162d8
dateFormat X
axisFormat %s
section baseline
no_agent (1.185 ms) : 1172, 1197
. : milestone, 1185,
iast (3.275 ms) : 3230, 3319
. : milestone, 3275,
iast_FULL (5.608 ms) : 5554, 5663
. : milestone, 5608,
iast_GLOBAL (3.584 ms) : 3528, 3640
. : milestone, 3584,
profiling (1.884 ms) : 1868, 1899
. : milestone, 1884,
tracing (1.775 ms) : 1759, 1790
. : milestone, 1775,
section candidate
no_agent (1.219 ms) : 1206, 1231
. : milestone, 1219,
iast (3.209 ms) : 3166, 3251
. : milestone, 3209,
iast_FULL (5.66 ms) : 5603, 5717
. : milestone, 5660,
iast_GLOBAL (3.585 ms) : 3525, 3645
. : milestone, 3585,
profiling (2.049 ms) : 2030, 2067
. : milestone, 2049,
tracing (1.841 ms) : 1824, 1858
. : milestone, 1841,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~a2256f0b86, baseline=1.57.0-SNAPSHOT~fef9d162d8
dateFormat X
axisFormat %s
section baseline
no_agent (18.213 ms) : 18023, 18404
. : milestone, 18213,
appsec (18.483 ms) : 18296, 18670
. : milestone, 18483,
code_origins (17.707 ms) : 17528, 17886
. : milestone, 17707,
iast (17.342 ms) : 17173, 17510
. : milestone, 17342,
profiling (18.592 ms) : 18405, 18779
. : milestone, 18592,
tracing (17.939 ms) : 17761, 18117
. : milestone, 17939,
section candidate
no_agent (18.941 ms) : 18747, 19135
. : milestone, 18941,
appsec (18.695 ms) : 18506, 18884
. : milestone, 18695,
code_origins (17.695 ms) : 17519, 17870
. : milestone, 17695,
iast (17.614 ms) : 17438, 17789
. : milestone, 17614,
profiling (18.546 ms) : 18362, 18731
. : milestone, 18546,
tracing (17.854 ms) : 17673, 18035
. : milestone, 17854,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~a2256f0b86, baseline=1.57.0-SNAPSHOT~fef9d162d8
dateFormat X
axisFormat %s
section baseline
no_agent (1.494 ms) : 1482, 1505
. : milestone, 1494,
appsec (3.684 ms) : 3467, 3900
. : milestone, 3684,
iast (2.23 ms) : 2165, 2295
. : milestone, 2230,
iast_GLOBAL (2.287 ms) : 2221, 2352
. : milestone, 2287,
profiling (2.481 ms) : 2277, 2685
. : milestone, 2481,
tracing (2.066 ms) : 2015, 2118
. : milestone, 2066,
section candidate
no_agent (1.486 ms) : 1474, 1497
. : milestone, 1486,
appsec (3.745 ms) : 3526, 3964
. : milestone, 3745,
iast (2.234 ms) : 2169, 2299
. : milestone, 2234,
iast_GLOBAL (2.263 ms) : 2198, 2328
. : milestone, 2263,
profiling (2.09 ms) : 2037, 2143
. : milestone, 2090,
tracing (2.067 ms) : 2016, 2118
. : milestone, 2067,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~a2256f0b86, baseline=1.57.0-SNAPSHOT~fef9d162d8
dateFormat X
axisFormat %s
section baseline
no_agent (15.064 s) : 15064000, 15064000
. : milestone, 15064000,
appsec (14.946 s) : 14946000, 14946000
. : milestone, 14946000,
iast (17.975 s) : 17975000, 17975000
. : milestone, 17975000,
iast_GLOBAL (17.854 s) : 17854000, 17854000
. : milestone, 17854000,
profiling (15.215 s) : 15215000, 15215000
. : milestone, 15215000,
tracing (14.564 s) : 14564000, 14564000
. : milestone, 14564000,
section candidate
no_agent (15.43 s) : 15430000, 15430000
. : milestone, 15430000,
appsec (14.828 s) : 14828000, 14828000
. : milestone, 14828000,
iast (17.918 s) : 17918000, 17918000
. : milestone, 17918000,
iast_GLOBAL (18.909 s) : 18909000, 18909000
. : milestone, 18909000,
profiling (14.523 s) : 14523000, 14523000
. : milestone, 14523000,
tracing (14.736 s) : 14736000, 14736000
. : milestone, 14736000,
|
What Does This Do
Some instrumentations seems willing to decorate null scopes/spans
This PR just protect the scope.span() and span itself from null accesses
Motivation
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]