-
Notifications
You must be signed in to change notification settings - Fork 305
Store the http.route tag value inside the appsec request context in Play #8991
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: malvarez/vertx-http-route
Are you sure you want to change the base?
Store the http.route tag value inside the appsec request context in Play #8991
Conversation
e06c22a
to
e5e0581
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 2 performance improvements and 1 performance regressions! Performance is the same for 40 metrics, 10 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~5ae3d4881d, baseline=1.50.0-SNAPSHOT~2f4c864fa4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.032 s) : 0, 1032473
Total [baseline] (10.613 s) : 0, 10612661
Agent [candidate] (1.03 s) : 0, 1029561
Total [candidate] (10.653 s) : 0, 10652718
section appsec
Agent [baseline] (1.179 s) : 0, 1178742
Total [baseline] (10.754 s) : 0, 10754147
Agent [candidate] (1.182 s) : 0, 1182443
Total [candidate] (10.745 s) : 0, 10745041
section iast
Agent [baseline] (1.155 s) : 0, 1154629
Total [baseline] (10.942 s) : 0, 10941523
Agent [candidate] (1.156 s) : 0, 1156456
Total [candidate] (10.848 s) : 0, 10848264
section profiling
Agent [baseline] (1.267 s) : 0, 1266918
Total [baseline] (10.989 s) : 0, 10989222
Agent [candidate] (1.284 s) : 0, 1284460
Total [candidate] (11.029 s) : 0, 11029232
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~5ae3d4881d, baseline=1.50.0-SNAPSHOT~2f4c864fa4
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (690.415 ms) : 0, 690415
BytebuddyAgent [candidate] (684.348 ms) : 0, 684348
GlobalTracer [baseline] (242.894 ms) : 0, 242894
GlobalTracer [candidate] (241.629 ms) : 0, 241629
AppSec [baseline] (58.791 ms) : 0, 58791
AppSec [candidate] (60.771 ms) : 0, 60771
Debugger [baseline] (6.947 ms) : 0, 6947
Debugger [candidate] (7.737 ms) : 0, 7737
Remote Config [baseline] (747.745 µs) : 0, 748
Remote Config [candidate] (692.609 µs) : 0, 693
Telemetry [baseline] (9.028 ms) : 0, 9028
Telemetry [candidate] (10.969 ms) : 0, 10969
section appsec
BytebuddyAgent [baseline] (708.205 ms) : 0, 708205
BytebuddyAgent [candidate] (708.715 ms) : 0, 708715
GlobalTracer [baseline] (234.909 ms) : 0, 234909
GlobalTracer [candidate] (235.416 ms) : 0, 235416
AppSec [baseline] (176.455 ms) : 0, 176455
AppSec [candidate] (179.366 ms) : 0, 179366
Debugger [baseline] (5.955 ms) : 0, 5955
Debugger [candidate] (5.86 ms) : 0, 5860
Remote Config [baseline] (623.794 µs) : 0, 624
Remote Config [candidate] (610.35 µs) : 0, 610
Telemetry [baseline] (7.31 ms) : 0, 7310
Telemetry [candidate] (7.231 ms) : 0, 7231
IAST [baseline] (21.797 ms) : 0, 21797
IAST [candidate] (21.759 ms) : 0, 21759
section iast
BytebuddyAgent [baseline] (805.542 ms) : 0, 805542
BytebuddyAgent [candidate] (804.781 ms) : 0, 804781
GlobalTracer [baseline] (231.854 ms) : 0, 231854
GlobalTracer [candidate] (231.466 ms) : 0, 231466
AppSec [baseline] (51.329 ms) : 0, 51329
AppSec [candidate] (54.363 ms) : 0, 54363
Debugger [baseline] (5.97 ms) : 0, 5970
Debugger [candidate] (6.096 ms) : 0, 6096
Remote Config [baseline] (600.016 µs) : 0, 600
Remote Config [candidate] (594.393 µs) : 0, 594
Telemetry [baseline] (7.972 ms) : 0, 7972
Telemetry [candidate] (8.039 ms) : 0, 8039
IAST [baseline] (27.81 ms) : 0, 27810
IAST [candidate] (26.942 ms) : 0, 26942
section profiling
ProfilingAgent [baseline] (103.112 ms) : 0, 103112
ProfilingAgent [candidate] (107.733 ms) : 0, 107733
BytebuddyAgent [baseline] (675.665 ms) : 0, 675665
BytebuddyAgent [candidate] (681.538 ms) : 0, 681538
GlobalTracer [baseline] (360.806 ms) : 0, 360806
GlobalTracer [candidate] (363.289 ms) : 0, 363289
AppSec [baseline] (61.478 ms) : 0, 61478
AppSec [candidate] (65.448 ms) : 0, 65448
Debugger [baseline] (6.116 ms) : 0, 6116
Debugger [candidate] (6.283 ms) : 0, 6283
Remote Config [baseline] (659.625 µs) : 0, 660
Remote Config [candidate] (660.343 µs) : 0, 660
Telemetry [baseline] (8.2 ms) : 0, 8200
Telemetry [candidate] (8.237 ms) : 0, 8237
Profiling [baseline] (103.135 ms) : 0, 103135
Profiling [candidate] (107.758 ms) : 0, 107758
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~5ae3d4881d, baseline=1.50.0-SNAPSHOT~2f4c864fa4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.032 s) : 0, 1031920
Total [baseline] (8.558 s) : 0, 8557807
Agent [candidate] (1.038 s) : 0, 1038035
Total [candidate] (8.585 s) : 0, 8585230
section iast
Agent [baseline] (1.154 s) : 0, 1154496
Total [baseline] (9.234 s) : 0, 9233659
Agent [candidate] (1.163 s) : 0, 1162888
Total [candidate] (9.239 s) : 0, 9239348
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~5ae3d4881d, baseline=1.50.0-SNAPSHOT~2f4c864fa4
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (689.267 ms) : 0, 689267
BytebuddyAgent [candidate] (690.087 ms) : 0, 690087
GlobalTracer [baseline] (242.713 ms) : 0, 242713
GlobalTracer [candidate] (243.511 ms) : 0, 243511
AppSec [baseline] (56.635 ms) : 0, 56635
AppSec [candidate] (63.154 ms) : 0, 63154
Debugger [baseline] (7.58 ms) : 0, 7580
Debugger [candidate] (6.194 ms) : 0, 6194
Remote Config [baseline] (745.729 µs) : 0, 746
Remote Config [candidate] (678.676 µs) : 0, 679
Telemetry [baseline] (11.352 ms) : 0, 11352
Telemetry [candidate] (10.817 ms) : 0, 10817
section iast
BytebuddyAgent [baseline] (804.523 ms) : 0, 804523
BytebuddyAgent [candidate] (809.164 ms) : 0, 809164
GlobalTracer [baseline] (232.375 ms) : 0, 232375
GlobalTracer [candidate] (232.205 ms) : 0, 232205
AppSec [baseline] (50.767 ms) : 0, 50767
AppSec [candidate] (56.849 ms) : 0, 56849
Debugger [baseline] (6.001 ms) : 0, 6001
Debugger [candidate] (6.125 ms) : 0, 6125
Remote Config [baseline] (608.16 µs) : 0, 608
Remote Config [candidate] (607.05 µs) : 0, 607
Telemetry [baseline] (8.046 ms) : 0, 8046
Telemetry [candidate] (8.031 ms) : 0, 8031
IAST [baseline] (28.66 ms) : 0, 28660
IAST [candidate] (26.332 ms) : 0, 26332
LoadParameters
See matching parameters
SummaryFound 6 performance improvements and 1 performance regressions! Performance is the same for 0 metrics, 11 unstable metrics.
Dacapo |
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.
The change looks OK. However this is a breaking change since the route will change the resource hence the RED metrics. Please do not forget to mention in the release note. You can also leave a notice in the PR that, to disable this behaviour, the user can disable the route based resource naming.
5097a43
to
f980f9c
Compare
Thanks for the review @amarziali, I did update the PR so we don´t break any customer. The change is not clean as before but it works fine for us. Thanks again! |
956faea
to
0078896
Compare
9b5f0d7
to
ad0bc38
Compare
a9e3f59
to
ad782b6
Compare
What Does This Do
Store the
http.route
tag value inside the appsec request context in Play framework instrumentationMotivation
AppSec API protection requires the
http.route
span tag to be set on the local root span so it can be used for its sampling decision. Since Play does not use the local root span for thehttp.route
we have to store it in the appsec request context before the sampling decision is made.Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: APPSEC-56869