-
Notifications
You must be signed in to change notification settings - Fork 318
Document when we manage a span's lifecycle without scopes #8628
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
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.48.0-SNAPSHOT~e5c06b3c50, baseline=1.48.0-SNAPSHOT~473081b27a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.048 s) : 0, 1048312
Total [baseline] (10.454 s) : 0, 10454165
Agent [candidate] (1.048 s) : 0, 1047629
Total [candidate] (10.483 s) : 0, 10483185
section appsec
Agent [baseline] (1.192 s) : 0, 1192494
Total [baseline] (10.764 s) : 0, 10764269
Agent [candidate] (1.192 s) : 0, 1191987
Total [candidate] (10.783 s) : 0, 10782779
section iast
Agent [baseline] (1.178 s) : 0, 1177859
Total [baseline] (10.995 s) : 0, 10995051
Agent [candidate] (1.186 s) : 0, 1186048
Total [candidate] (11.062 s) : 0, 11062203
section profiling
Agent [baseline] (1.274 s) : 0, 1274195
Total [baseline] (10.859 s) : 0, 10858840
Agent [candidate] (1.285 s) : 0, 1284815
Total [candidate] (10.891 s) : 0, 10891267
gantt
title petclinic - break down per module: candidate=1.48.0-SNAPSHOT~e5c06b3c50, baseline=1.48.0-SNAPSHOT~473081b27a
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (720.092 ms) : 0, 720092
BytebuddyAgent [candidate] (719.539 ms) : 0, 719539
GlobalTracer [baseline] (239.997 ms) : 0, 239997
GlobalTracer [candidate] (240.625 ms) : 0, 240625
AppSec [baseline] (54.884 ms) : 0, 54884
AppSec [candidate] (54.925 ms) : 0, 54925
Debugger [baseline] (5.831 ms) : 0, 5831
Debugger [candidate] (4.397 ms) : 0, 4397
Remote Config [baseline] (714.942 µs) : 0, 715
Remote Config [candidate] (702.531 µs) : 0, 703
Telemetry [baseline] (10.739 ms) : 0, 10739
Telemetry [candidate] (11.399 ms) : 0, 11399
section appsec
BytebuddyAgent [baseline] (738.203 ms) : 0, 738203
BytebuddyAgent [candidate] (737.949 ms) : 0, 737949
GlobalTracer [baseline] (237.165 ms) : 0, 237165
GlobalTracer [candidate] (237.503 ms) : 0, 237503
AppSec [baseline] (176.508 ms) : 0, 176508
AppSec [candidate] (176.585 ms) : 0, 176585
Debugger [baseline] (4.276 ms) : 0, 4276
Debugger [candidate] (4.293 ms) : 0, 4293
Remote Config [baseline] (647.248 µs) : 0, 647
Remote Config [candidate] (652.835 µs) : 0, 653
Telemetry [baseline] (8.922 ms) : 0, 8922
Telemetry [candidate] (8.199 ms) : 0, 8199
IAST [baseline] (21.343 ms) : 0, 21343
IAST [candidate] (21.475 ms) : 0, 21475
section iast
BytebuddyAgent [baseline] (838.703 ms) : 0, 838703
BytebuddyAgent [candidate] (846.141 ms) : 0, 846141
GlobalTracer [baseline] (230.55 ms) : 0, 230550
GlobalTracer [candidate] (231.54 ms) : 0, 231540
AppSec [baseline] (56.219 ms) : 0, 56219
AppSec [candidate] (55.791 ms) : 0, 55791
Debugger [baseline] (4.189 ms) : 0, 4189
Debugger [candidate] (4.167 ms) : 0, 4167
Remote Config [baseline] (597.106 µs) : 0, 597
Remote Config [candidate] (622.572 µs) : 0, 623
Telemetry [baseline] (8.767 ms) : 0, 8767
Telemetry [candidate] (8.836 ms) : 0, 8836
IAST [baseline] (22.875 ms) : 0, 22875
IAST [candidate] (22.95 ms) : 0, 22950
section profiling
BytebuddyAgent [baseline] (711.401 ms) : 0, 711401
BytebuddyAgent [candidate] (717.037 ms) : 0, 717037
GlobalTracer [baseline] (350.904 ms) : 0, 350904
GlobalTracer [candidate] (353.887 ms) : 0, 353887
AppSec [baseline] (54.526 ms) : 0, 54526
AppSec [candidate] (54.203 ms) : 0, 54203
Debugger [baseline] (4.271 ms) : 0, 4271
Debugger [candidate] (4.316 ms) : 0, 4316
Remote Config [baseline] (704.181 µs) : 0, 704
Remote Config [candidate] (731.934 µs) : 0, 732
Telemetry [baseline] (8.835 ms) : 0, 8835
Telemetry [candidate] (8.958 ms) : 0, 8958
ProfilingAgent [baseline] (101.828 ms) : 0, 101828
ProfilingAgent [candidate] (103.429 ms) : 0, 103429
Profiling [baseline] (101.853 ms) : 0, 101853
Profiling [candidate] (103.592 ms) : 0, 103592
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.48.0-SNAPSHOT~e5c06b3c50, baseline=1.48.0-SNAPSHOT~473081b27a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1064081
Total [baseline] (8.724 s) : 0, 8724418
Agent [candidate] (1.045 s) : 0, 1045048
Total [candidate] (8.675 s) : 0, 8675407
section iast
Agent [baseline] (1.176 s) : 0, 1175608
Total [baseline] (9.274 s) : 0, 9273913
Agent [candidate] (1.181 s) : 0, 1180935
Total [candidate] (9.254 s) : 0, 9254003
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.18 s) : 0, 1180269
Total [baseline] (9.22 s) : 0, 9219805
Agent [candidate] (1.181 s) : 0, 1180704
Total [candidate] (9.258 s) : 0, 9257865
section iast_TELEMETRY_OFF
Agent [baseline] (1.174 s) : 0, 1174169
Total [baseline] (9.236 s) : 0, 9236469
Agent [candidate] (1.175 s) : 0, 1174565
Total [candidate] (9.28 s) : 0, 9280205
gantt
title insecure-bank - break down per module: candidate=1.48.0-SNAPSHOT~e5c06b3c50, baseline=1.48.0-SNAPSHOT~473081b27a
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (728.991 ms) : 0, 728991
BytebuddyAgent [candidate] (716.345 ms) : 0, 716345
GlobalTracer [baseline] (243.214 ms) : 0, 243214
GlobalTracer [candidate] (238.647 ms) : 0, 238647
AppSec [baseline] (55.207 ms) : 0, 55207
AppSec [candidate] (54.611 ms) : 0, 54611
Debugger [baseline] (5.973 ms) : 0, 5973
Debugger [candidate] (4.362 ms) : 0, 4362
Remote Config [baseline] (725.389 µs) : 0, 725
Remote Config [candidate] (704.51 µs) : 0, 705
Telemetry [baseline] (13.697 ms) : 0, 13697
Telemetry [candidate] (14.414 ms) : 0, 14414
section iast
BytebuddyAgent [baseline] (837.439 ms) : 0, 837439
BytebuddyAgent [candidate] (839.535 ms) : 0, 839535
GlobalTracer [baseline] (229.992 ms) : 0, 229992
GlobalTracer [candidate] (232.024 ms) : 0, 232024
IAST [baseline] (22.792 ms) : 0, 22792
IAST [candidate] (22.992 ms) : 0, 22992
AppSec [baseline] (55.901 ms) : 0, 55901
AppSec [candidate] (56.722 ms) : 0, 56722
Debugger [baseline] (4.152 ms) : 0, 4152
Debugger [candidate] (4.211 ms) : 0, 4211
Remote Config [baseline] (611.08 µs) : 0, 611
Remote Config [candidate] (629.692 µs) : 0, 630
Telemetry [baseline] (8.722 ms) : 0, 8722
Telemetry [candidate] (8.85 ms) : 0, 8850
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (839.156 ms) : 0, 839156
BytebuddyAgent [candidate] (839.682 ms) : 0, 839682
GlobalTracer [baseline] (231.784 ms) : 0, 231784
GlobalTracer [candidate] (231.944 ms) : 0, 231944
IAST [baseline] (23.258 ms) : 0, 23258
IAST [candidate] (22.911 ms) : 0, 22911
AppSec [baseline] (56.496 ms) : 0, 56496
AppSec [candidate] (56.594 ms) : 0, 56594
Debugger [baseline] (4.192 ms) : 0, 4192
Debugger [candidate] (4.161 ms) : 0, 4161
Remote Config [baseline] (601.909 µs) : 0, 602
Remote Config [candidate] (594.98 µs) : 0, 595
Telemetry [baseline] (8.77 ms) : 0, 8770
Telemetry [candidate] (8.787 ms) : 0, 8787
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (836.23 ms) : 0, 836230
BytebuddyAgent [candidate] (835.871 ms) : 0, 835871
GlobalTracer [baseline] (230.223 ms) : 0, 230223
GlobalTracer [candidate] (230.202 ms) : 0, 230202
IAST [baseline] (22.292 ms) : 0, 22292
IAST [candidate] (22.481 ms) : 0, 22481
AppSec [baseline] (56.05 ms) : 0, 56050
AppSec [candidate] (56.55 ms) : 0, 56550
Debugger [baseline] (4.115 ms) : 0, 4115
Debugger [candidate] (4.153 ms) : 0, 4153
Remote Config [baseline] (599.016 µs) : 0, 599
Remote Config [candidate] (607.914 µs) : 0, 608
Telemetry [baseline] (8.639 ms) : 0, 8639
Telemetry [candidate] (8.671 ms) : 0, 8671
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 14 metrics, 16 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~e5c06b3c50, baseline=1.48.0-SNAPSHOT~473081b27a
dateFormat X
axisFormat %s
section baseline
no_agent (379.894 µs) : 360, 400
. : milestone, 380,
iast (521.727 µs) : 500, 544
. : milestone, 522,
iast_FULL (735.246 µs) : 713, 757
. : milestone, 735,
iast_GLOBAL (561.232 µs) : 540, 583
. : milestone, 561,
iast_HARDCODED_SECRET_DISABLED (516.312 µs) : 495, 538
. : milestone, 516,
iast_INACTIVE (468.811 µs) : 447, 491
. : milestone, 469,
iast_TELEMETRY_OFF (508.143 µs) : 486, 530
. : milestone, 508,
tracing (461.125 µs) : 440, 483
. : milestone, 461,
section candidate
no_agent (384.177 µs) : 365, 404
. : milestone, 384,
iast (525.548 µs) : 503, 548
. : milestone, 526,
iast_FULL (736.921 µs) : 715, 759
. : milestone, 737,
iast_GLOBAL (576.352 µs) : 553, 600
. : milestone, 576,
iast_HARDCODED_SECRET_DISABLED (517.706 µs) : 496, 540
. : milestone, 518,
iast_INACTIVE (476.998 µs) : 455, 498
. : milestone, 477,
iast_TELEMETRY_OFF (507.197 µs) : 484, 530
. : milestone, 507,
tracing (464.231 µs) : 443, 485
. : milestone, 464,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~e5c06b3c50, baseline=1.48.0-SNAPSHOT~473081b27a
dateFormat X
axisFormat %s
section baseline
no_agent (1.355 ms) : 1336, 1375
. : milestone, 1355,
appsec (1.729 ms) : 1705, 1753
. : milestone, 1729,
appsec_no_iast (1.739 ms) : 1716, 1762
. : milestone, 1739,
code_origins (1.688 ms) : 1662, 1714
. : milestone, 1688,
iast (1.514 ms) : 1489, 1538
. : milestone, 1514,
profiling (1.538 ms) : 1515, 1561
. : milestone, 1538,
tracing (1.498 ms) : 1474, 1522
. : milestone, 1498,
section candidate
no_agent (1.368 ms) : 1348, 1387
. : milestone, 1368,
appsec (1.735 ms) : 1712, 1759
. : milestone, 1735,
appsec_no_iast (1.725 ms) : 1702, 1749
. : milestone, 1725,
code_origins (1.699 ms) : 1672, 1725
. : milestone, 1699,
iast (1.522 ms) : 1498, 1546
. : milestone, 1522,
profiling (1.526 ms) : 1502, 1549
. : milestone, 1526,
tracing (1.484 ms) : 1459, 1509
. : milestone, 1484,
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.48.0-SNAPSHOT~e5c06b3c50, baseline=1.48.0-SNAPSHOT~473081b27a
dateFormat X
axisFormat %s
section baseline
no_agent (14.883 s) : 14883000, 14883000
. : milestone, 14883000,
appsec (15.096 s) : 15096000, 15096000
. : milestone, 15096000,
iast (18.532 s) : 18532000, 18532000
. : milestone, 18532000,
iast_GLOBAL (18.272 s) : 18272000, 18272000
. : milestone, 18272000,
profiling (14.984 s) : 14984000, 14984000
. : milestone, 14984000,
tracing (14.946 s) : 14946000, 14946000
. : milestone, 14946000,
section candidate
no_agent (15.226 s) : 15226000, 15226000
. : milestone, 15226000,
appsec (15.086 s) : 15086000, 15086000
. : milestone, 15086000,
iast (19.097 s) : 19097000, 19097000
. : milestone, 19097000,
iast_GLOBAL (18.065 s) : 18065000, 18065000
. : milestone, 18065000,
profiling (15.6 s) : 15600000, 15600000
. : milestone, 15600000,
tracing (15.101 s) : 15101000, 15101000
. : milestone, 15101000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~e5c06b3c50, baseline=1.48.0-SNAPSHOT~473081b27a
dateFormat X
axisFormat %s
section baseline
no_agent (1.475 ms) : 1464, 1487
. : milestone, 1475,
appsec (2.336 ms) : 2293, 2380
. : milestone, 2336,
iast (2.119 ms) : 2064, 2174
. : milestone, 2119,
iast_GLOBAL (2.163 ms) : 2107, 2219
. : milestone, 2163,
profiling (1.965 ms) : 1921, 2009
. : milestone, 1965,
tracing (1.943 ms) : 1901, 1985
. : milestone, 1943,
section candidate
no_agent (1.475 ms) : 1464, 1487
. : milestone, 1475,
appsec (2.347 ms) : 2303, 2391
. : milestone, 2347,
iast (2.124 ms) : 2068, 2180
. : milestone, 2124,
iast_GLOBAL (2.173 ms) : 2116, 2229
. : milestone, 2173,
profiling (1.981 ms) : 1936, 2026
. : milestone, 1981,
tracing (1.952 ms) : 1910, 1995
. : milestone, 1952,
|
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.
lgtm for IDM
| scope.close(); | ||
| } else { | ||
| closeActive(); | ||
| // span was already active, scope will be closed by HandlerInstrumentation |
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.
All span activation in the undertow instrumentation uses scopes which are balanced across method entry/exit, so there's no need for activateSpanWithoutScope. Therefore this use of closeActive() is likewise not necessary and can be removed.
a75a152 to
dbabf9b
Compare
There are a few instrumentations where the instrumented code does not align with scopes. In such situations the span is activated, but the scope is thrown away. The span is then closed in another section of code using 'closeActive()'. This PR adds a 'activateSpanWithoutScope(span)' method to self-document this behaviour and explicitly tie it to the use of 'closeActive()'.
dbabf9b to
7453192
Compare
What Does This Do
This PR adds an
activateSpanWithoutScope(span)method to self-document this behaviour and explicitly tie it to the use ofcloseActive().Motivation
There are a few instrumentations where the instrumented code does not align with scopes. In such situations the span is activated, but the scope is thrown away. The span is then closed in another section of code using
closeActive().Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: APMAPI-960