-
Notifications
You must be signed in to change notification settings - Fork 322
Support creating AOT caches for Spring apps with custom TraceInterceptors
#10272
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
…rkaround AOT bug in Java 25
amarziali
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.
that's smart. lgtm
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 5 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.58.0-SNAPSHOT~d6b2b0644a, baseline=1.58.0-SNAPSHOT~d9893626df
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.087 s) : 0, 1087106
Total [baseline] (10.845 s) : 0, 10845005
Agent [candidate] (1.093 s) : 0, 1092840
Total [candidate] (10.793 s) : 0, 10793436
section appsec
Agent [baseline] (1.268 s) : 0, 1268206
Total [baseline] (10.838 s) : 0, 10837687
Agent [candidate] (1.267 s) : 0, 1267395
Total [candidate] (10.958 s) : 0, 10957980
section iast
Agent [baseline] (1.225 s) : 0, 1225459
Total [baseline] (11.121 s) : 0, 11120685
Agent [candidate] (1.231 s) : 0, 1231448
Total [candidate] (11.158 s) : 0, 11157826
section profiling
Agent [baseline] (1.208 s) : 0, 1208070
Total [baseline] (10.906 s) : 0, 10906262
Agent [candidate] (1.204 s) : 0, 1204379
Total [candidate] (10.899 s) : 0, 10899486
gantt
title petclinic - break down per module: candidate=1.58.0-SNAPSHOT~d6b2b0644a, baseline=1.58.0-SNAPSHOT~d9893626df
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.178 ms) : 0, 1178
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (652.912 ms) : 0, 652912
BytebuddyAgent [candidate] (656.222 ms) : 0, 656222
GlobalTracer [baseline] (283.204 ms) : 0, 283204
GlobalTracer [candidate] (284.551 ms) : 0, 284551
AppSec [baseline] (32.694 ms) : 0, 32694
AppSec [candidate] (32.757 ms) : 0, 32757
Debugger [baseline] (68.154 ms) : 0, 68154
Debugger [candidate] (69.004 ms) : 0, 69004
Remote Config [baseline] (621.071 µs) : 0, 621
Remote Config [candidate] (623.673 µs) : 0, 624
Telemetry [baseline] (9.024 ms) : 0, 9024
Telemetry [candidate] (9.011 ms) : 0, 9011
Flare Poller [baseline] (3.779 ms) : 0, 3779
Flare Poller [candidate] (3.754 ms) : 0, 3754
section appsec
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.18 ms) : 0, 1180
BytebuddyAgent [baseline] (693.67 ms) : 0, 693670
BytebuddyAgent [candidate] (691.833 ms) : 0, 691833
GlobalTracer [baseline] (258.423 ms) : 0, 258423
GlobalTracer [candidate] (257.727 ms) : 0, 257727
IAST [baseline] (24.754 ms) : 0, 24754
IAST [candidate] (24.638 ms) : 0, 24638
AppSec [baseline] (174.989 ms) : 0, 174989
AppSec [candidate] (173.975 ms) : 0, 173975
Debugger [baseline] (65.956 ms) : 0, 65956
Debugger [candidate] (68.774 ms) : 0, 68774
Remote Config [baseline] (754.517 µs) : 0, 755
Remote Config [candidate] (774.647 µs) : 0, 775
Telemetry [baseline] (9.295 ms) : 0, 9295
Telemetry [candidate] (9.458 ms) : 0, 9458
Flare Poller [baseline] (3.639 ms) : 0, 3639
Flare Poller [candidate] (3.694 ms) : 0, 3694
section iast
crashtracking [baseline] (1.188 ms) : 0, 1188
crashtracking [candidate] (1.184 ms) : 0, 1184
BytebuddyAgent [baseline] (793.467 ms) : 0, 793467
BytebuddyAgent [candidate] (797.781 ms) : 0, 797781
GlobalTracer [baseline] (255.477 ms) : 0, 255477
GlobalTracer [candidate] (256.675 ms) : 0, 256675
IAST [baseline] (27.097 ms) : 0, 27097
IAST [candidate] (27.082 ms) : 0, 27082
AppSec [baseline] (34.383 ms) : 0, 34383
AppSec [candidate] (35.139 ms) : 0, 35139
Debugger [baseline] (65.938 ms) : 0, 65938
Debugger [candidate] (65.223 ms) : 0, 65223
Remote Config [baseline] (566.659 µs) : 0, 567
Remote Config [candidate] (595.681 µs) : 0, 596
Telemetry [baseline] (8.418 ms) : 0, 8418
Telemetry [candidate] (8.689 ms) : 0, 8689
Flare Poller [baseline] (3.499 ms) : 0, 3499
Flare Poller [candidate] (3.541 ms) : 0, 3541
section profiling
crashtracking [baseline] (1.218 ms) : 0, 1218
crashtracking [candidate] (1.212 ms) : 0, 1212
BytebuddyAgent [baseline] (704.999 ms) : 0, 704999
BytebuddyAgent [candidate] (703.403 ms) : 0, 703403
GlobalTracer [baseline] (220.807 ms) : 0, 220807
GlobalTracer [candidate] (220.525 ms) : 0, 220525
AppSec [baseline] (32.291 ms) : 0, 32291
AppSec [candidate] (31.952 ms) : 0, 31952
Debugger [baseline] (68.378 ms) : 0, 68378
Debugger [candidate] (67.758 ms) : 0, 67758
Remote Config [baseline] (638.389 µs) : 0, 638
Remote Config [candidate] (611.741 µs) : 0, 612
Telemetry [baseline] (8.793 ms) : 0, 8793
Telemetry [candidate] (8.682 ms) : 0, 8682
Flare Poller [baseline] (3.674 ms) : 0, 3674
Flare Poller [candidate] (3.618 ms) : 0, 3618
ProfilingAgent [baseline] (97.299 ms) : 0, 97299
ProfilingAgent [candidate] (96.761 ms) : 0, 96761
Profiling [baseline] (97.919 ms) : 0, 97919
Profiling [candidate] (97.336 ms) : 0, 97336
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.58.0-SNAPSHOT~d6b2b0644a, baseline=1.58.0-SNAPSHOT~d9893626df
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.09 s) : 0, 1090161
Total [baseline] (8.778 s) : 0, 8777912
Agent [candidate] (1.083 s) : 0, 1083383
Total [candidate] (8.735 s) : 0, 8734539
section iast
Agent [baseline] (1.222 s) : 0, 1221970
Total [baseline] (9.328 s) : 0, 9328219
Agent [candidate] (1.225 s) : 0, 1224590
Total [candidate] (9.328 s) : 0, 9327851
gantt
title insecure-bank - break down per module: candidate=1.58.0-SNAPSHOT~d6b2b0644a, baseline=1.58.0-SNAPSHOT~d9893626df
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.186 ms) : 0, 1186
BytebuddyAgent [baseline] (655.718 ms) : 0, 655718
BytebuddyAgent [candidate] (651.079 ms) : 0, 651079
GlobalTracer [baseline] (283.601 ms) : 0, 283601
GlobalTracer [candidate] (282.118 ms) : 0, 282118
AppSec [baseline] (32.82 ms) : 0, 32820
AppSec [candidate] (32.489 ms) : 0, 32489
Debugger [baseline] (67.672 ms) : 0, 67672
Debugger [candidate] (67.797 ms) : 0, 67797
Remote Config [baseline] (624.595 µs) : 0, 625
Remote Config [candidate] (639.25 µs) : 0, 639
Telemetry [baseline] (9.083 ms) : 0, 9083
Telemetry [candidate] (8.869 ms) : 0, 8869
Flare Poller [baseline] (3.767 ms) : 0, 3767
Flare Poller [candidate] (3.641 ms) : 0, 3641
section iast
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (791.77 ms) : 0, 791770
BytebuddyAgent [candidate] (793.605 ms) : 0, 793605
GlobalTracer [baseline] (254.674 ms) : 0, 254674
GlobalTracer [candidate] (255.438 ms) : 0, 255438
AppSec [baseline] (32.485 ms) : 0, 32485
AppSec [candidate] (34.36 ms) : 0, 34360
Debugger [baseline] (66.684 ms) : 0, 66684
Debugger [candidate] (64.845 ms) : 0, 64845
Remote Config [baseline] (608.792 µs) : 0, 609
Remote Config [candidate] (579.285 µs) : 0, 579
Telemetry [baseline] (8.417 ms) : 0, 8417
Telemetry [candidate] (8.541 ms) : 0, 8541
Flare Poller [baseline] (3.514 ms) : 0, 3514
Flare Poller [candidate] (3.518 ms) : 0, 3518
IAST [baseline] (27.102 ms) : 0, 27102
IAST [candidate] (27.013 ms) : 0, 27013
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 18 metrics, 17 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.58.0-SNAPSHOT~d6b2b0644a, baseline=1.58.0-SNAPSHOT~d9893626df
dateFormat X
axisFormat %s
section baseline
no_agent (19.171 ms) : 18976, 19366
. : milestone, 19171,
appsec (18.524 ms) : 18338, 18711
. : milestone, 18524,
code_origins (17.686 ms) : 17509, 17863
. : milestone, 17686,
iast (17.921 ms) : 17744, 18098
. : milestone, 17921,
profiling (18.794 ms) : 18607, 18981
. : milestone, 18794,
tracing (17.776 ms) : 17599, 17953
. : milestone, 17776,
section candidate
no_agent (17.854 ms) : 17672, 18036
. : milestone, 17854,
appsec (18.728 ms) : 18537, 18920
. : milestone, 18728,
code_origins (17.751 ms) : 17574, 17927
. : milestone, 17751,
iast (17.864 ms) : 17687, 18042
. : milestone, 17864,
profiling (18.865 ms) : 18676, 19054
. : milestone, 18865,
tracing (17.806 ms) : 17628, 17984
. : milestone, 17806,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.58.0-SNAPSHOT~d6b2b0644a, baseline=1.58.0-SNAPSHOT~d9893626df
dateFormat X
axisFormat %s
section baseline
no_agent (1.198 ms) : 1186, 1210
. : milestone, 1198,
iast (3.21 ms) : 3169, 3251
. : milestone, 3210,
iast_FULL (5.753 ms) : 5696, 5810
. : milestone, 5753,
iast_GLOBAL (3.59 ms) : 3536, 3644
. : milestone, 3590,
profiling (2.041 ms) : 2023, 2059
. : milestone, 2041,
tracing (1.811 ms) : 1796, 1827
. : milestone, 1811,
section candidate
no_agent (1.19 ms) : 1178, 1201
. : milestone, 1190,
iast (3.148 ms) : 3107, 3189
. : milestone, 3148,
iast_FULL (5.69 ms) : 5635, 5746
. : milestone, 5690,
iast_GLOBAL (3.645 ms) : 3583, 3707
. : milestone, 3645,
profiling (2.07 ms) : 2051, 2089
. : milestone, 2070,
tracing (1.871 ms) : 1856, 1887
. : milestone, 1871,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.58.0-SNAPSHOT~d6b2b0644a, baseline=1.58.0-SNAPSHOT~d9893626df
dateFormat X
axisFormat %s
section baseline
no_agent (14.974 s) : 14974000, 14974000
. : milestone, 14974000,
appsec (14.406 s) : 14406000, 14406000
. : milestone, 14406000,
iast (18.486 s) : 18486000, 18486000
. : milestone, 18486000,
iast_GLOBAL (17.662 s) : 17662000, 17662000
. : milestone, 17662000,
profiling (14.977 s) : 14977000, 14977000
. : milestone, 14977000,
tracing (14.571 s) : 14571000, 14571000
. : milestone, 14571000,
section candidate
no_agent (15.504 s) : 15504000, 15504000
. : milestone, 15504000,
appsec (14.695 s) : 14695000, 14695000
. : milestone, 14695000,
iast (18.218 s) : 18218000, 18218000
. : milestone, 18218000,
iast_GLOBAL (17.958 s) : 17958000, 17958000
. : milestone, 17958000,
profiling (15.06 s) : 15060000, 15060000
. : milestone, 15060000,
tracing (14.529 s) : 14529000, 14529000
. : milestone, 14529000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.58.0-SNAPSHOT~d6b2b0644a, baseline=1.58.0-SNAPSHOT~d9893626df
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (3.655 ms) : 3441, 3870
. : milestone, 3655,
iast (2.203 ms) : 2139, 2268
. : milestone, 2203,
iast_GLOBAL (2.252 ms) : 2187, 2317
. : milestone, 2252,
profiling (2.083 ms) : 2029, 2138
. : milestone, 2083,
tracing (2.045 ms) : 1994, 2096
. : milestone, 2045,
section candidate
no_agent (1.476 ms) : 1464, 1488
. : milestone, 1476,
appsec (3.651 ms) : 3437, 3866
. : milestone, 3651,
iast (2.205 ms) : 2140, 2269
. : milestone, 2205,
iast_GLOBAL (2.258 ms) : 2192, 2323
. : milestone, 2258,
profiling (2.093 ms) : 2039, 2147
. : milestone, 2093,
tracing (2.046 ms) : 1995, 2097
. : milestone, 2046,
|
What Does This Do
During "AOT training" mode, replace custom
TraceInterceptorreturn values with placeholders to workaround an AOT bug in Java 25. Note this transformation is not persisted, so in production the original interceptor is used.Motivation
The original workaround of replacing calls to
Tracer.addTraceInterceptor()worked for most Java apps when creating AOT caches, but Spring apps containing@Beanmethods returning customTraceInterceptors require an additional workaround.Additional Notes
Follow-up to #10166
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: APMS-18027