-
Notifications
You must be signed in to change notification settings - Fork 291
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
Fix NPE on traceState() in DDSpanLink.java #6758
Conversation
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.
LGTM
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 41 metrics, 13 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.31.0-SNAPSHOT~e97ee04072, baseline=1.31.0-SNAPSHOT~487a9e0583
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.081 s) : 0, 1081493
Total [baseline] (9.197 s) : 0, 9196698
Agent [candidate] (1.082 s) : 0, 1081825
Total [candidate] (9.207 s) : 0, 9206910
section appsec
Agent [baseline] (1.187 s) : 0, 1186966
Total [baseline] (9.356 s) : 0, 9355845
Agent [candidate] (1.19 s) : 0, 1190099
Total [candidate] (9.376 s) : 0, 9375596
section iast
Agent [baseline] (1.21 s) : 0, 1209551
Total [baseline] (9.355 s) : 0, 9355176
Agent [candidate] (1.212 s) : 0, 1212472
Total [candidate] (9.409 s) : 0, 9409162
section profiling
Agent [baseline] (1.277 s) : 0, 1276862
Total [baseline] (9.39 s) : 0, 9389522
Agent [candidate] (1.276 s) : 0, 1275719
Total [candidate] (9.373 s) : 0, 9372803
gantt
title petclinic - break down per module: candidate=1.31.0-SNAPSHOT~e97ee04072, baseline=1.31.0-SNAPSHOT~487a9e0583
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (689.259 ms) : 0, 689259
BytebuddyAgent [candidate] (689.176 ms) : 0, 689176
GlobalTracer [baseline] (297.803 ms) : 0, 297803
GlobalTracer [candidate] (298.34 ms) : 0, 298340
AppSec [baseline] (51.441 ms) : 0, 51441
AppSec [candidate] (51.379 ms) : 0, 51379
Remote Config [baseline] (720.663 µs) : 0, 721
Remote Config [candidate] (714.175 µs) : 0, 714
Telemetry [baseline] (7.866 ms) : 0, 7866
Telemetry [candidate] (7.851 ms) : 0, 7851
section appsec
BytebuddyAgent [baseline] (693.468 ms) : 0, 693468
BytebuddyAgent [candidate] (694.686 ms) : 0, 694686
GlobalTracer [baseline] (299.462 ms) : 0, 299462
GlobalTracer [candidate] (300.879 ms) : 0, 300879
AppSec [baseline] (151.813 ms) : 0, 151813
AppSec [candidate] (152.3 ms) : 0, 152300
Remote Config [baseline] (642.864 µs) : 0, 643
Remote Config [candidate] (646.183 µs) : 0, 646
Telemetry [baseline] (7.021 ms) : 0, 7021
Telemetry [candidate] (7.017 ms) : 0, 7017
section iast
BytebuddyAgent [baseline] (802.691 ms) : 0, 802691
BytebuddyAgent [candidate] (804.964 ms) : 0, 804964
GlobalTracer [baseline] (289.108 ms) : 0, 289108
GlobalTracer [candidate] (290.213 ms) : 0, 290213
AppSec [baseline] (51.827 ms) : 0, 51827
AppSec [candidate] (52.707 ms) : 0, 52707
Remote Config [baseline] (596.231 µs) : 0, 596
Remote Config [candidate] (585.556 µs) : 0, 586
Telemetry [baseline] (7.47 ms) : 0, 7470
Telemetry [candidate] (6.688 ms) : 0, 6688
IAST [baseline] (23.346 ms) : 0, 23346
IAST [candidate] (22.823 ms) : 0, 22823
section profiling
ProfilingAgent [baseline] (91.588 ms) : 0, 91588
ProfilingAgent [candidate] (92.524 ms) : 0, 92524
BytebuddyAgent [baseline] (683.882 ms) : 0, 683882
BytebuddyAgent [candidate] (681.141 ms) : 0, 681141
GlobalTracer [baseline] (379.98 ms) : 0, 379980
GlobalTracer [candidate] (381.671 ms) : 0, 381671
AppSec [baseline] (52.956 ms) : 0, 52956
AppSec [candidate] (53.025 ms) : 0, 53025
Remote Config [baseline] (782.855 µs) : 0, 783
Remote Config [candidate] (779.199 µs) : 0, 779
Telemetry [baseline] (10.93 ms) : 0, 10930
Telemetry [candidate] (10.266 ms) : 0, 10266
Profiling [baseline] (91.612 ms) : 0, 91612
Profiling [candidate] (92.548 ms) : 0, 92548
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 14 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~e97ee04072, baseline=1.31.0-SNAPSHOT~487a9e0583
dateFormat X
axisFormat %s
section baseline
no_agent (1.364 ms) : 1344, 1383
. : milestone, 1364,
appsec (1.783 ms) : 1759, 1807
. : milestone, 1783,
iast (1.509 ms) : 1485, 1532
. : milestone, 1509,
profiling (1.525 ms) : 1501, 1548
. : milestone, 1525,
tracing (1.502 ms) : 1478, 1526
. : milestone, 1502,
section candidate
no_agent (1.364 ms) : 1345, 1383
. : milestone, 1364,
appsec (1.807 ms) : 1784, 1830
. : milestone, 1807,
iast (1.553 ms) : 1530, 1576
. : milestone, 1553,
profiling (1.512 ms) : 1489, 1536
. : milestone, 1512,
tracing (1.515 ms) : 1492, 1539
. : milestone, 1515,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~e97ee04072, baseline=1.31.0-SNAPSHOT~487a9e0583
dateFormat X
axisFormat %s
section baseline
no_agent (370.413 µs) : 351, 390
. : milestone, 370,
iast (472.519 µs) : 452, 493
. : milestone, 473,
iast_FULL (544.507 µs) : 524, 565
. : milestone, 545,
iast_GLOBAL (497.427 µs) : 477, 517
. : milestone, 497,
iast_HARDCODED_SECRET_DISABLED (479.873 µs) : 459, 501
. : milestone, 480,
iast_INACTIVE (455.14 µs) : 435, 475
. : milestone, 455,
iast_TELEMETRY_OFF (470.009 µs) : 450, 491
. : milestone, 470,
tracing (448.62 µs) : 428, 469
. : milestone, 449,
section candidate
no_agent (369.067 µs) : 349, 389
. : milestone, 369,
iast (479.263 µs) : 458, 501
. : milestone, 479,
iast_FULL (542.807 µs) : 522, 563
. : milestone, 543,
iast_GLOBAL (498.156 µs) : 477, 519
. : milestone, 498,
iast_HARDCODED_SECRET_DISABLED (473.988 µs) : 454, 494
. : milestone, 474,
iast_INACTIVE (457.538 µs) : 436, 479
. : milestone, 458,
iast_TELEMETRY_OFF (472.468 µs) : 452, 493
. : milestone, 472,
tracing (445.961 µs) : 426, 466
. : milestone, 446,
|
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.
Before merging, I would like to check why there is null
value in the first place.
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.
Hey, I would rather see the constructor changed in order to prevent any further issue.
To do this, you would need to check if traceState
is null
in SpanLink
constructor and set an empty string ""
if it is.
Similarly, you can check for null
attributes
and set it to EMPTY
from SpanLinkAttributes
.
The main idea is, if we fix the usage of the variable, we will need to fix everywhere is is (and will be) used. Whereas if you fix it where is it set, you fix it once for all (as the variable is final
, once set it won’t change).
Thanks for the fix! 💪 I update the PR description to match the new changes. |
What Does This Do
Ensure
tracestate
from span links can't be null.Motivation
NPE observed.
Additional Notes
Jira ticket: [APMS-11554]