Make propagation happen on AsyncResponse using CFX JAX-RS#6313
Conversation
31db51b to
e979df0
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 8 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.26.0-SNAPSHOT~a6bef34154, baseline=1.26.0-SNAPSHOT~21e5b464db
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1047018
Total [baseline] (8.696 s) : 0, 8695981
Agent [candidate] (1.049 s) : 0, 1049064
Total [candidate] (8.763 s) : 0, 8763368
section iast
Agent [baseline] (1.158 s) : 0, 1157578
Total [baseline] (9.248 s) : 0, 9248418
Agent [candidate] (1.17 s) : 0, 1169936
Total [candidate] (9.288 s) : 0, 9288261
section iast_TELEMETRY_OFF
Agent [baseline] (1.157 s) : 0, 1157141
Total [baseline] (9.257 s) : 0, 9257163
Agent [candidate] (1.152 s) : 0, 1152172
Total [candidate] (9.279 s) : 0, 9279313
gantt
title insecure-bank - break down per module: candidate=1.26.0-SNAPSHOT~a6bef34154, baseline=1.26.0-SNAPSHOT~21e5b464db
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (648.386 ms) : 0, 648386
BytebuddyAgent [candidate] (648.97 ms) : 0, 648970
GlobalTracer [baseline] (308.015 ms) : 0, 308015
GlobalTracer [candidate] (308.854 ms) : 0, 308854
AppSec [baseline] (48.408 ms) : 0, 48408
AppSec [candidate] (48.897 ms) : 0, 48897
Remote Config [baseline] (674.112 µs) : 0, 674
Remote Config [candidate] (677.712 µs) : 0, 678
Telemetry [baseline] (7.138 ms) : 0, 7138
Telemetry [candidate] (7.147 ms) : 0, 7147
section iast
BytebuddyAgent [baseline] (765.091 ms) : 0, 765091
BytebuddyAgent [candidate] (772.153 ms) : 0, 772153
GlobalTracer [baseline] (283.967 ms) : 0, 283967
GlobalTracer [candidate] (287.185 ms) : 0, 287185
AppSec [baseline] (46.278 ms) : 0, 46278
AppSec [candidate] (46.794 ms) : 0, 46794
IAST [baseline] (20.787 ms) : 0, 20787
IAST [candidate] (20.435 ms) : 0, 20435
Remote Config [baseline] (611.624 µs) : 0, 612
Remote Config [candidate] (610.178 µs) : 0, 610
Telemetry [baseline] (6.579 ms) : 0, 6579
Telemetry [candidate] (8.127 ms) : 0, 8127
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (763.718 ms) : 0, 763718
BytebuddyAgent [candidate] (758.395 ms) : 0, 758395
GlobalTracer [baseline] (285.159 ms) : 0, 285159
GlobalTracer [candidate] (285.666 ms) : 0, 285666
AppSec [baseline] (46.215 ms) : 0, 46215
AppSec [candidate] (46.968 ms) : 0, 46968
IAST [baseline] (18.964 ms) : 0, 18964
IAST [candidate] (19.811 ms) : 0, 19811
Remote Config [baseline] (633.683 µs) : 0, 634
Remote Config [candidate] (610.409 µs) : 0, 610
Telemetry [baseline] (7.932 ms) : 0, 7932
Telemetry [candidate] (6.478 ms) : 0, 6478
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.26.0-SNAPSHOT~a6bef34154, baseline=1.26.0-SNAPSHOT~21e5b464db
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.043 s) : 0, 1043089
Total [baseline] (9.376 s) : 0, 9376097
Agent [candidate] (1.042 s) : 0, 1041503
Total [candidate] (9.352 s) : 0, 9352207
section appsec
Agent [baseline] (1.137 s) : 0, 1137001
Total [baseline] (9.446 s) : 0, 9445826
Agent [candidate] (1.132 s) : 0, 1132035
Total [candidate] (9.387 s) : 0, 9386814
section iast
Agent [baseline] (1.157 s) : 0, 1157245
Total [baseline] (9.522 s) : 0, 9521835
Agent [candidate] (1.16 s) : 0, 1160417
Total [candidate] (9.565 s) : 0, 9564885
section profiling
Agent [baseline] (1.238 s) : 0, 1237782
Total [baseline] (9.589 s) : 0, 9588586
Agent [candidate] (1.228 s) : 0, 1227974
Total [candidate] (9.625 s) : 0, 9624938
gantt
title petclinic - break down per module: candidate=1.26.0-SNAPSHOT~a6bef34154, baseline=1.26.0-SNAPSHOT~21e5b464db
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (645.18 ms) : 0, 645180
BytebuddyAgent [candidate] (644.669 ms) : 0, 644669
GlobalTracer [baseline] (307.516 ms) : 0, 307516
GlobalTracer [candidate] (306.35 ms) : 0, 306350
AppSec [baseline] (48.351 ms) : 0, 48351
AppSec [candidate] (48.452 ms) : 0, 48452
Remote Config [baseline] (676.818 µs) : 0, 677
Remote Config [candidate] (677.667 µs) : 0, 678
Telemetry [baseline] (7.211 ms) : 0, 7211
Telemetry [candidate] (7.162 ms) : 0, 7162
section appsec
BytebuddyAgent [baseline] (648.299 ms) : 0, 648299
BytebuddyAgent [candidate] (646.035 ms) : 0, 646035
GlobalTracer [baseline] (307.793 ms) : 0, 307793
GlobalTracer [candidate] (307.013 ms) : 0, 307013
AppSec [baseline] (137.575 ms) : 0, 137575
AppSec [candidate] (136.771 ms) : 0, 136771
Remote Config [baseline] (642.969 µs) : 0, 643
Remote Config [candidate] (644.399 µs) : 0, 644
Telemetry [baseline] (8.224 ms) : 0, 8224
Telemetry [candidate] (7.419 ms) : 0, 7419
section iast
BytebuddyAgent [baseline] (765.004 ms) : 0, 765004
BytebuddyAgent [candidate] (766.587 ms) : 0, 766587
GlobalTracer [baseline] (284.395 ms) : 0, 284395
GlobalTracer [candidate] (285.15 ms) : 0, 285150
AppSec [baseline] (46.275 ms) : 0, 46275
AppSec [candidate] (46.38 ms) : 0, 46380
Remote Config [baseline] (589.498 µs) : 0, 589
Remote Config [candidate] (602.936 µs) : 0, 603
Telemetry [baseline] (8.014 ms) : 0, 8014
Telemetry [candidate] (8.813 ms) : 0, 8813
IAST [baseline] (18.776 ms) : 0, 18776
IAST [candidate] (18.691 ms) : 0, 18691
section profiling
ProfilingAgent [baseline] (88.497 ms) : 0, 88497
ProfilingAgent [candidate] (88.118 ms) : 0, 88118
BytebuddyAgent [baseline] (659.287 ms) : 0, 659287
BytebuddyAgent [candidate] (654.079 ms) : 0, 654079
GlobalTracer [baseline] (378.907 ms) : 0, 378907
GlobalTracer [candidate] (375.749 ms) : 0, 375749
AppSec [baseline] (48.622 ms) : 0, 48622
AppSec [candidate] (48.16 ms) : 0, 48160
Remote Config [baseline] (699.592 µs) : 0, 700
Remote Config [candidate] (693.375 µs) : 0, 693
Telemetry [baseline] (7.436 ms) : 0, 7436
Telemetry [candidate] (7.312 ms) : 0, 7312
Profiling [baseline] (88.522 ms) : 0, 88522
Profiling [candidate] (88.146 ms) : 0, 88146
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 12 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.26.0-SNAPSHOT~a6bef34154, baseline=1.26.0-SNAPSHOT~21e5b464db
dateFormat X
axisFormat %s
section baseline
no_agent (371.024 µs) : 350, 392
. : milestone, 371,
iast (473.013 µs) : 452, 494
. : milestone, 473,
iast_FULL (533.342 µs) : 513, 554
. : milestone, 533,
iast_INACTIVE (449.597 µs) : 428, 471
. : milestone, 450,
iast_TELEMETRY_OFF (468.297 µs) : 448, 489
. : milestone, 468,
tracing (437.279 µs) : 417, 457
. : milestone, 437,
section candidate
no_agent (361.078 µs) : 341, 381
. : milestone, 361,
iast (467.537 µs) : 447, 488
. : milestone, 468,
iast_FULL (537.777 µs) : 517, 558
. : milestone, 538,
iast_INACTIVE (446.037 µs) : 426, 467
. : milestone, 446,
iast_TELEMETRY_OFF (465.685 µs) : 445, 486
. : milestone, 466,
tracing (431.818 µs) : 412, 452
. : milestone, 432,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.26.0-SNAPSHOT~a6bef34154, baseline=1.26.0-SNAPSHOT~21e5b464db
dateFormat X
axisFormat %s
section baseline
no_agent (1.342 ms) : 1323, 1361
. : milestone, 1342,
appsec (1.767 ms) : 1742, 1792
. : milestone, 1767,
iast (1.533 ms) : 1509, 1557
. : milestone, 1533,
profiling (1.497 ms) : 1472, 1523
. : milestone, 1497,
tracing (1.492 ms) : 1468, 1517
. : milestone, 1492,
section candidate
no_agent (1.344 ms) : 1325, 1363
. : milestone, 1344,
appsec (1.734 ms) : 1708, 1760
. : milestone, 1734,
iast (1.516 ms) : 1492, 1540
. : milestone, 1516,
profiling (1.504 ms) : 1479, 1529
. : milestone, 1504,
tracing (1.498 ms) : 1473, 1523
. : milestone, 1498,
|
e979df0 to
8c7aa48
Compare
PerfectSlayer
left a comment
There was a problem hiding this comment.
Hey 👋
Just some minor comments
8c7aa48 to
e4112f9
Compare
Thanks for the review I applied the suggestions. There are some muzzle failures I should have also resolved (linked to missing extra dependencies). The customer already tested a CI build on real conditions and seems work as expected. Could you please have another look? thanks |
I am said customer and am happy to help with any additional testing if you'd like. |
90336da to
a6bef34
Compare
There was a problem hiding this comment.
As part of refactoring the build I'd like to make it easier to share utilities based on libraries like the servlet-api. And ideally do this in a way such that the right utility is chosen at advice insertion time, which would reduce the need for method handles.
mcculls
left a comment
There was a problem hiding this comment.
The use of method handles here to handle javax.servet vs jakarta.servlet deployments is acceptable for the short-term. In the long-term I hope to make improvements to the build which would allow us to remove these.
a6bef34 to
fba3fe1
Compare
…ace/instrumentation/cxf/ServletHelper.java Co-authored-by: Stuart McCulloch <[email protected]>
What Does This Do
When async response is suspended, on CXF jax-rs, the subsequent invoke methods (response resume, exception mappers) are not propagating at least the root servlet span.
This PR is fixing this
Motivation
Additional Notes
Jira ticket: APMS-10975