Skip to content

Conversation

@mcculls
Copy link
Contributor

@mcculls mcculls commented Mar 27, 2025

What Does This Do

This PR adds an activateSpanWithoutScope(span) method to self-document this behaviour and explicitly tie it to the use of closeActive().

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

Jira ticket: APMAPI-960

@mcculls mcculls added comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring labels Mar 27, 2025
@pr-commenter
Copy link

pr-commenter bot commented Mar 27, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/activateSpanWithoutScope
git_commit_date 1743115570 1743116598
git_commit_sha 473081b e5c06b3
release_version 1.48.0-SNAPSHOT~473081b27a 1.48.0-SNAPSHOT~e5c06b3c50
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1743119570 1743119570
ci_job_id 869168869 869168869
ci_pipeline_id 60270512 60270512
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-xjcpkyqs-project-304-concurrent-1-r9kniiod 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-xjcpkyqs-project-304-concurrent-1-r9kniiod 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics.

Startup time reports for petclinic
gantt
    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
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.048 s -
Agent appsec 1.192 s 144.182 ms (13.8%)
Agent iast 1.178 s 129.547 ms (12.4%)
Agent profiling 1.274 s 225.883 ms (21.5%)
Total tracing 10.454 s -
Total appsec 10.764 s 310.104 ms (3.0%)
Total iast 10.995 s 540.887 ms (5.2%)
Total profiling 10.859 s 404.675 ms (3.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.048 s -
Agent appsec 1.192 s 144.358 ms (13.8%)
Agent iast 1.186 s 138.419 ms (13.2%)
Agent profiling 1.285 s 237.186 ms (22.6%)
Total tracing 10.483 s -
Total appsec 10.783 s 299.595 ms (2.9%)
Total iast 11.062 s 579.018 ms (5.5%)
Total profiling 10.891 s 408.083 ms (3.9%)
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
Loading
Startup time reports for insecure-bank
gantt
    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
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent iast 1.176 s 111.527 ms (10.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.18 s 116.188 ms (10.9%)
Agent iast_TELEMETRY_OFF 1.174 s 110.088 ms (10.3%)
Total tracing 8.724 s -
Total iast 9.274 s 549.495 ms (6.3%)
Total iast_HARDCODED_SECRET_DISABLED 9.22 s 495.387 ms (5.7%)
Total iast_TELEMETRY_OFF 9.236 s 512.05 ms (5.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.045 s -
Agent iast 1.181 s 135.887 ms (13.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.181 s 135.656 ms (13.0%)
Agent iast_TELEMETRY_OFF 1.175 s 129.517 ms (12.4%)
Total tracing 8.675 s -
Total iast 9.254 s 578.596 ms (6.7%)
Total iast_HARDCODED_SECRET_DISABLED 9.258 s 582.458 ms (6.7%)
Total iast_TELEMETRY_OFF 9.28 s 604.798 ms (7.0%)
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
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-03-27T23:23:11 2025-03-27T23:30:56
git_branch master mcculls/activateSpanWithoutScope
git_commit_date 1743115570 1743116598
git_commit_sha 473081b e5c06b3
release_version 1.48.0-SNAPSHOT~473081b27a 1.48.0-SNAPSHOT~e5c06b3c50
start_time 2025-03-27T23:22:57 2025-03-27T23:30:41
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1743118654 1743118654
ci_job_id 869168870 869168870
ci_pipeline_id 60270512 60270512
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-xjcpkyqs-project-304-concurrent-2-ibphyzho 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-xjcpkyqs-project-304-concurrent-2-ibphyzho 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 14 metrics, 16 unstable metrics.

Request duration reports for insecure-bank
gantt
    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,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 379.894 µs [360.043 µs, 399.745 µs] -
iast 521.727 µs [499.641 µs, 543.812 µs] 141.833 µs (37.3%)
iast_FULL 735.246 µs [713.429 µs, 757.064 µs] 355.353 µs (93.5%)
iast_GLOBAL 561.232 µs [539.549 µs, 582.916 µs] 181.339 µs (47.7%)
iast_HARDCODED_SECRET_DISABLED 516.312 µs [494.559 µs, 538.064 µs] 136.418 µs (35.9%)
iast_INACTIVE 468.811 µs [447.007 µs, 490.614 µs] 88.917 µs (23.4%)
iast_TELEMETRY_OFF 508.143 µs [486.258 µs, 530.027 µs] 128.249 µs (33.8%)
tracing 461.125 µs [439.561 µs, 482.69 µs] 81.232 µs (21.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 384.177 µs [364.719 µs, 403.635 µs] -
iast 525.548 µs [503.229 µs, 547.867 µs] 141.372 µs (36.8%)
iast_FULL 736.921 µs [714.816 µs, 759.027 µs] 352.745 µs (91.8%)
iast_GLOBAL 576.352 µs [552.827 µs, 599.877 µs] 192.175 µs (50.0%)
iast_HARDCODED_SECRET_DISABLED 517.706 µs [495.586 µs, 539.826 µs] 133.529 µs (34.8%)
iast_INACTIVE 476.998 µs [455.496 µs, 498.5 µs] 92.822 µs (24.2%)
iast_TELEMETRY_OFF 507.197 µs [484.297 µs, 530.097 µs] 123.02 µs (32.0%)
tracing 464.231 µs [443.429 µs, 485.033 µs] 80.054 µs (20.8%)
Request duration reports for petclinic
gantt
    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,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.355 ms [1.336 ms, 1.375 ms] -
appsec 1.729 ms [1.705 ms, 1.753 ms] 374.024 µs (27.6%)
appsec_no_iast 1.739 ms [1.716 ms, 1.762 ms] 383.677 µs (28.3%)
code_origins 1.688 ms [1.662 ms, 1.714 ms] 332.898 µs (24.6%)
iast 1.514 ms [1.489 ms, 1.538 ms] 158.345 µs (11.7%)
profiling 1.538 ms [1.515 ms, 1.561 ms] 182.621 µs (13.5%)
tracing 1.498 ms [1.474 ms, 1.522 ms] 142.661 µs (10.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.368 ms [1.348 ms, 1.387 ms] -
appsec 1.735 ms [1.712 ms, 1.759 ms] 367.422 µs (26.9%)
appsec_no_iast 1.725 ms [1.702 ms, 1.749 ms] 357.489 µs (26.1%)
code_origins 1.699 ms [1.672 ms, 1.725 ms] 331.045 µs (24.2%)
iast 1.522 ms [1.498 ms, 1.546 ms] 154.155 µs (11.3%)
profiling 1.526 ms [1.502 ms, 1.549 ms] 157.884 µs (11.5%)
tracing 1.484 ms [1.459 ms, 1.509 ms] 116.462 µs (8.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/activateSpanWithoutScope
git_commit_date 1743115570 1743116598
git_commit_sha 473081b e5c06b3
release_version 1.48.0-SNAPSHOT~473081b27a 1.48.0-SNAPSHOT~e5c06b3c50
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1743119157 1743119157
ci_job_id 869168871 869168871
ci_pipeline_id 60270512 60270512
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-vapngg-f-project-304-concurrent-0-5hdmp1x8 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-vapngg-f-project-304-concurrent-0-5hdmp1x8 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for biojava
gantt
    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,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.883 s [14.883 s, 14.883 s] -
appsec 15.096 s [15.096 s, 15.096 s] 213.0 ms (1.4%)
iast 18.532 s [18.532 s, 18.532 s] 3.649 s (24.5%)
iast_GLOBAL 18.272 s [18.272 s, 18.272 s] 3.389 s (22.8%)
profiling 14.984 s [14.984 s, 14.984 s] 101.0 ms (0.7%)
tracing 14.946 s [14.946 s, 14.946 s] 63.0 ms (0.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.226 s [15.226 s, 15.226 s] -
appsec 15.086 s [15.086 s, 15.086 s] -140.0 ms (-0.9%)
iast 19.097 s [19.097 s, 19.097 s] 3.871 s (25.4%)
iast_GLOBAL 18.065 s [18.065 s, 18.065 s] 2.839 s (18.6%)
profiling 15.6 s [15.6 s, 15.6 s] 374.0 ms (2.5%)
tracing 15.101 s [15.101 s, 15.101 s] -125.0 ms (-0.8%)
Execution time for tomcat
gantt
    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,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.464 ms, 1.487 ms] -
appsec 2.336 ms [2.293 ms, 2.38 ms] 860.802 µs (58.3%)
iast 2.119 ms [2.064 ms, 2.174 ms] 643.496 µs (43.6%)
iast_GLOBAL 2.163 ms [2.107 ms, 2.219 ms] 687.314 µs (46.6%)
profiling 1.965 ms [1.921 ms, 2.009 ms] 489.551 µs (33.2%)
tracing 1.943 ms [1.901 ms, 1.985 ms] 467.745 µs (31.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.464 ms, 1.487 ms] -
appsec 2.347 ms [2.303 ms, 2.391 ms] 871.7 µs (59.1%)
iast 2.124 ms [2.068 ms, 2.18 ms] 648.469 µs (43.9%)
iast_GLOBAL 2.173 ms [2.116 ms, 2.229 ms] 697.163 µs (47.2%)
profiling 1.981 ms [1.936 ms, 2.026 ms] 505.854 µs (34.3%)
tracing 1.952 ms [1.91 ms, 1.995 ms] 476.566 µs (32.3%)

@mcculls mcculls marked this pull request as ready for review March 27, 2025 15:52
@mcculls mcculls requested review from a team as code owners March 27, 2025 15:52
Copy link
Contributor

@amarziali amarziali left a 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
Copy link
Contributor Author

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.

@mcculls mcculls added tag: no release notes Changes to exclude from release notes and removed tag: no release notes Changes to exclude from release notes labels Mar 27, 2025
@mcculls mcculls enabled auto-merge (squash) March 27, 2025 17:04
@mcculls mcculls added tag: no release notes Changes to exclude from release notes and removed tag: no release notes Changes to exclude from release notes labels Mar 27, 2025
@mcculls mcculls force-pushed the mcculls/activateSpanWithoutScope branch from a75a152 to dbabf9b Compare March 27, 2025 17:07
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()'.
@mcculls mcculls force-pushed the mcculls/activateSpanWithoutScope branch from dbabf9b to 7453192 Compare March 27, 2025 17:08
@mcculls mcculls disabled auto-merge March 27, 2025 18:13
@mcculls mcculls merged commit 4a5461c into master Mar 28, 2025
263 of 267 checks passed
@mcculls mcculls deleted the mcculls/activateSpanWithoutScope branch March 28, 2025 00:29
@github-actions github-actions bot added this to the 1.48.0 milestone Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants