-
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 unresolved field error when instrumenting Kafka 3.7 with Quarkus native #7403
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… an instrumentation fails Co-authored-by: luneo7 <luneo7@gmail.com>
This was referenced Aug 9, 2024
luneo7
approved these changes
Aug 9, 2024
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 15 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.39.0-SNAPSHOT~65a61a8fa9, baseline=1.39.0-SNAPSHOT~bec85d9b82
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.045 s) : 0, 1045075
Total [baseline] (8.472 s) : 0, 8471660
Agent [candidate] (1.048 s) : 0, 1048001
Total [candidate] (8.502 s) : 0, 8502464
section iast
Agent [baseline] (1.176 s) : 0, 1176455
Total [baseline] (8.952 s) : 0, 8952297
Agent [candidate] (1.178 s) : 0, 1178167
Total [candidate] (9.081 s) : 0, 9080528
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.175 s) : 0, 1175001
Total [baseline] (8.929 s) : 0, 8929051
Agent [candidate] (1.181 s) : 0, 1181119
Total [candidate] (8.951 s) : 0, 8951045
section iast_TELEMETRY_OFF
Agent [baseline] (1.174 s) : 0, 1173998
Total [baseline] (8.947 s) : 0, 8946930
Agent [candidate] (1.173 s) : 0, 1172697
Total [candidate] (8.965 s) : 0, 8965393
gantt
title insecure-bank - break down per module: candidate=1.39.0-SNAPSHOT~65a61a8fa9, baseline=1.39.0-SNAPSHOT~bec85d9b82
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (667.019 ms) : 0, 667019
BytebuddyAgent [candidate] (670.35 ms) : 0, 670350
GlobalTracer [baseline] (306.252 ms) : 0, 306252
GlobalTracer [candidate] (305.688 ms) : 0, 305688
AppSec [baseline] (50.411 ms) : 0, 50411
AppSec [candidate] (50.45 ms) : 0, 50450
Remote Config [baseline] (682.779 µs) : 0, 683
Remote Config [candidate] (695.745 µs) : 0, 696
Telemetry [baseline] (7.295 ms) : 0, 7295
Telemetry [candidate] (7.331 ms) : 0, 7331
section iast
BytebuddyAgent [baseline] (783.026 ms) : 0, 783026
BytebuddyAgent [candidate] (782.763 ms) : 0, 782763
GlobalTracer [baseline] (296.581 ms) : 0, 296581
GlobalTracer [candidate] (298.512 ms) : 0, 298512
AppSec [baseline] (51.602 ms) : 0, 51602
AppSec [candidate] (52.517 ms) : 0, 52517
IAST [baseline] (22.57 ms) : 0, 22570
IAST [candidate] (22.57 ms) : 0, 22570
Remote Config [baseline] (575.485 µs) : 0, 575
Remote Config [candidate] (575.031 µs) : 0, 575
Telemetry [baseline] (8.632 ms) : 0, 8632
Telemetry [candidate] (7.754 ms) : 0, 7754
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (782.404 ms) : 0, 782404
BytebuddyAgent [candidate] (786.655 ms) : 0, 786655
GlobalTracer [baseline] (296.387 ms) : 0, 296387
GlobalTracer [candidate] (298.047 ms) : 0, 298047
AppSec [baseline] (51.096 ms) : 0, 51096
AppSec [candidate] (49.991 ms) : 0, 49991
IAST [baseline] (23.318 ms) : 0, 23318
IAST [candidate] (23.647 ms) : 0, 23647
Remote Config [baseline] (573.333 µs) : 0, 573
Remote Config [candidate] (591.16 µs) : 0, 591
Telemetry [baseline] (7.728 ms) : 0, 7728
Telemetry [candidate] (8.586 ms) : 0, 8586
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (781.751 ms) : 0, 781751
BytebuddyAgent [candidate] (779.812 ms) : 0, 779812
GlobalTracer [baseline] (297.215 ms) : 0, 297215
GlobalTracer [candidate] (297.049 ms) : 0, 297049
AppSec [baseline] (48.669 ms) : 0, 48669
AppSec [candidate] (48.268 ms) : 0, 48268
IAST [baseline] (25.221 ms) : 0, 25221
IAST [candidate] (25.792 ms) : 0, 25792
Remote Config [baseline] (630.025 µs) : 0, 630
Remote Config [candidate] (597.021 µs) : 0, 597
Telemetry [baseline] (6.996 ms) : 0, 6996
Telemetry [candidate] (7.645 ms) : 0, 7645
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.39.0-SNAPSHOT~65a61a8fa9, baseline=1.39.0-SNAPSHOT~bec85d9b82
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1046738
Total [baseline] (10.367 s) : 0, 10366509
Agent [candidate] (1.048 s) : 0, 1048136
Total [candidate] (10.272 s) : 0, 10271541
section appsec
Agent [baseline] (1.172 s) : 0, 1172011
Total [baseline] (10.448 s) : 0, 10448316
Agent [candidate] (1.165 s) : 0, 1164921
Total [candidate] (10.516 s) : 0, 10515787
section iast
Agent [baseline] (1.177 s) : 0, 1177146
Total [baseline] (10.803 s) : 0, 10802726
Agent [candidate] (1.173 s) : 0, 1172810
Total [candidate] (10.748 s) : 0, 10748424
section profiling
Agent [baseline] (1.245 s) : 0, 1245274
Total [baseline] (10.548 s) : 0, 10547829
Agent [candidate] (1.243 s) : 0, 1242546
Total [candidate] (10.531 s) : 0, 10530531
gantt
title petclinic - break down per module: candidate=1.39.0-SNAPSHOT~65a61a8fa9, baseline=1.39.0-SNAPSHOT~bec85d9b82
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (668.163 ms) : 0, 668163
BytebuddyAgent [candidate] (668.503 ms) : 0, 668503
GlobalTracer [baseline] (306.735 ms) : 0, 306735
GlobalTracer [candidate] (307.898 ms) : 0, 307898
AppSec [baseline] (50.354 ms) : 0, 50354
AppSec [candidate] (50.252 ms) : 0, 50252
Remote Config [baseline] (691.642 µs) : 0, 692
Remote Config [candidate] (689.286 µs) : 0, 689
Telemetry [baseline] (7.364 ms) : 0, 7364
Telemetry [candidate] (7.352 ms) : 0, 7352
section appsec
BytebuddyAgent [baseline] (682.554 ms) : 0, 682554
BytebuddyAgent [candidate] (677.305 ms) : 0, 677305
GlobalTracer [baseline] (301.556 ms) : 0, 301556
GlobalTracer [candidate] (299.786 ms) : 0, 299786
AppSec [baseline] (155.357 ms) : 0, 155357
AppSec [candidate] (155.107 ms) : 0, 155107
Remote Config [baseline] (607.869 µs) : 0, 608
Remote Config [candidate] (598.957 µs) : 0, 599
Telemetry [baseline] (8.198 ms) : 0, 8198
Telemetry [candidate] (8.548 ms) : 0, 8548
IAST [baseline] (20.376 ms) : 0, 20376
IAST [candidate] (20.177 ms) : 0, 20177
section iast
BytebuddyAgent [baseline] (785.346 ms) : 0, 785346
BytebuddyAgent [candidate] (781.411 ms) : 0, 781411
GlobalTracer [baseline] (295.948 ms) : 0, 295948
GlobalTracer [candidate] (295.958 ms) : 0, 295958
AppSec [baseline] (49.063 ms) : 0, 49063
AppSec [candidate] (50.915 ms) : 0, 50915
Remote Config [baseline] (596.228 µs) : 0, 596
Remote Config [candidate] (585.566 µs) : 0, 586
Telemetry [baseline] (9.325 ms) : 0, 9325
Telemetry [candidate] (7.831 ms) : 0, 7831
IAST [baseline] (23.306 ms) : 0, 23306
IAST [candidate] (22.602 ms) : 0, 22602
section profiling
ProfilingAgent [baseline] (95.25 ms) : 0, 95250
ProfilingAgent [candidate] (94.662 ms) : 0, 94662
BytebuddyAgent [baseline] (663.631 ms) : 0, 663631
BytebuddyAgent [candidate] (662.035 ms) : 0, 662035
GlobalTracer [baseline] (389.792 ms) : 0, 389792
GlobalTracer [candidate] (389.453 ms) : 0, 389453
AppSec [baseline] (51.484 ms) : 0, 51484
AppSec [candidate] (51.293 ms) : 0, 51293
Remote Config [baseline] (685.768 µs) : 0, 686
Remote Config [candidate] (709.147 µs) : 0, 709
Telemetry [baseline] (7.243 ms) : 0, 7243
Telemetry [candidate] (7.219 ms) : 0, 7219
Profiling [baseline] (95.276 ms) : 0, 95276
Profiling [candidate] (94.687 ms) : 0, 94687
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~65a61a8fa9, baseline=1.39.0-SNAPSHOT~bec85d9b82
dateFormat X
axisFormat %s
section baseline
no_agent (1.34 ms) : 1320, 1359
. : milestone, 1340,
appsec (1.696 ms) : 1673, 1719
. : milestone, 1696,
appsec_no_iast (1.724 ms) : 1700, 1749
. : milestone, 1724,
iast (1.473 ms) : 1450, 1495
. : milestone, 1473,
profiling (1.482 ms) : 1457, 1507
. : milestone, 1482,
tracing (1.464 ms) : 1439, 1488
. : milestone, 1464,
section candidate
no_agent (1.34 ms) : 1319, 1360
. : milestone, 1340,
appsec (1.708 ms) : 1683, 1732
. : milestone, 1708,
appsec_no_iast (1.715 ms) : 1692, 1739
. : milestone, 1715,
iast (1.489 ms) : 1466, 1512
. : milestone, 1489,
profiling (1.533 ms) : 1507, 1558
. : milestone, 1533,
tracing (1.466 ms) : 1442, 1491
. : milestone, 1466,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~65a61a8fa9, baseline=1.39.0-SNAPSHOT~bec85d9b82
dateFormat X
axisFormat %s
section baseline
no_agent (369.232 µs) : 349, 389
. : milestone, 369,
iast (478.644 µs) : 457, 500
. : milestone, 479,
iast_FULL (548.032 µs) : 527, 569
. : milestone, 548,
iast_GLOBAL (502.934 µs) : 481, 525
. : milestone, 503,
iast_HARDCODED_SECRET_DISABLED (480.101 µs) : 459, 501
. : milestone, 480,
iast_INACTIVE (451.911 µs) : 431, 473
. : milestone, 452,
iast_TELEMETRY_OFF (470.244 µs) : 449, 492
. : milestone, 470,
tracing (439.757 µs) : 419, 460
. : milestone, 440,
section candidate
no_agent (372.087 µs) : 353, 392
. : milestone, 372,
iast (473.775 µs) : 453, 495
. : milestone, 474,
iast_FULL (551.396 µs) : 530, 573
. : milestone, 551,
iast_GLOBAL (503.255 µs) : 482, 524
. : milestone, 503,
iast_HARDCODED_SECRET_DISABLED (488.666 µs) : 467, 510
. : milestone, 489,
iast_INACTIVE (460.173 µs) : 438, 483
. : milestone, 460,
iast_TELEMETRY_OFF (473.664 µs) : 453, 495
. : milestone, 474,
tracing (444.562 µs) : 424, 466
. : milestone, 445,
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.39.0-SNAPSHOT~65a61a8fa9, baseline=1.39.0-SNAPSHOT~bec85d9b82
dateFormat X
axisFormat %s
section baseline
no_agent (14.842 s) : 14842000, 14842000
. : milestone, 14842000,
appsec (15.318 s) : 15318000, 15318000
. : milestone, 15318000,
iast (18.695 s) : 18695000, 18695000
. : milestone, 18695000,
iast_GLOBAL (17.821 s) : 17821000, 17821000
. : milestone, 17821000,
profiling (14.995 s) : 14995000, 14995000
. : milestone, 14995000,
tracing (14.893 s) : 14893000, 14893000
. : milestone, 14893000,
section candidate
no_agent (15.544 s) : 15544000, 15544000
. : milestone, 15544000,
appsec (15.176 s) : 15176000, 15176000
. : milestone, 15176000,
iast (19.022 s) : 19022000, 19022000
. : milestone, 19022000,
iast_GLOBAL (17.798 s) : 17798000, 17798000
. : milestone, 17798000,
profiling (15.434 s) : 15434000, 15434000
. : milestone, 15434000,
tracing (15.131 s) : 15131000, 15131000
. : milestone, 15131000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.39.0-SNAPSHOT~65a61a8fa9, baseline=1.39.0-SNAPSHOT~bec85d9b82
dateFormat X
axisFormat %s
section baseline
no_agent (1.459 ms) : 1447, 1470
. : milestone, 1459,
appsec (2.205 ms) : 2171, 2240
. : milestone, 2205,
iast (1.963 ms) : 1922, 2005
. : milestone, 1963,
iast_GLOBAL (2.02 ms) : 1976, 2064
. : milestone, 2020,
profiling (1.856 ms) : 1823, 1890
. : milestone, 1856,
tracing (1.821 ms) : 1789, 1853
. : milestone, 1821,
section candidate
no_agent (1.455 ms) : 1444, 1467
. : milestone, 1455,
appsec (2.201 ms) : 2167, 2235
. : milestone, 2201,
iast (1.954 ms) : 1913, 1996
. : milestone, 1954,
iast_GLOBAL (2.011 ms) : 1970, 2053
. : milestone, 2011,
profiling (1.858 ms) : 1824, 1893
. : milestone, 1858,
tracing (1.839 ms) : 1806, 1872
. : milestone, 1839,
|
amarziali
approved these changes
Aug 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Does This Do
When an instrumentation fails the
visitEnd
method inFieldBackedContextInjector
may not be called. This method is responsible for removing a thread local which collects the store ids injected so far, across all field-injectors of a class.If the thread-local is not removed then collected store ids may leak across to another class, leading to getters/setters referring to a non-existent field. This doesn't cause an issue with most JVMs because that particular generated branch will never be called (since the class is not expected to hold that store). But it leads to an unresolved field on GraalVM/Quarkus because the native-image builder performs additional checks that fields exist.
Additional Notes
The instrumentation failure in Kafka 3.7 that exposed this bug was:
This will be fixed in a separate PR.
Jira ticket: APMS-12871