Skip to content
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

Temporary bridge between contexts and spans/scopes #8636

Merged
merged 2 commits into from
Mar 31, 2025

Conversation

mcculls
Copy link
Contributor

@mcculls mcculls commented Mar 28, 2025

What Does This Do

Use the existing scope manager to track contexts rather than spans in its scopes.

Motivation

Spans are now primordial contexts, so this is not a huge leap. It also means we can bring over other changes from the project/context branch ahead of the wider replacement of the scope manager.

Migration of continuations to continue contexts rather than spans will be addressed in a follow-up PR.

Contributor Checklist

Jira ticket: APMAPI-960

@mcculls mcculls added tag: do not merge Do not merge changes comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring labels Mar 28, 2025
@pr-commenter
Copy link

pr-commenter bot commented Mar 28, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/context-scope-bridge
git_commit_date 1743424027 1743424240
git_commit_sha bfdfd2b 4d4a759
release_version 1.48.0-SNAPSHOT~bfdfd2bcad 1.48.0-SNAPSHOT~4d4a759c4b
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1743427266 1743427266
ci_job_id 872262082 872262082
ci_pipeline_id 60501043 60501043
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-ylcbzox4-project-304-concurrent-5-h746ycg9 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-ylcbzox4-project-304-concurrent-5-h746ycg9 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 69 metrics, 2 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.48.0-SNAPSHOT~4d4a759c4b, baseline=1.48.0-SNAPSHOT~bfdfd2bcad

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.059 s) : 0, 1058721
Total [baseline] (10.457 s) : 0, 10456875
Agent [candidate] (1.059 s) : 0, 1059020
Total [candidate] (10.439 s) : 0, 10439271
section appsec
Agent [baseline] (1.191 s) : 0, 1190866
Total [baseline] (10.739 s) : 0, 10738630
Agent [candidate] (1.199 s) : 0, 1198886
Total [candidate] (10.782 s) : 0, 10781513
section iast
Agent [baseline] (1.19 s) : 0, 1190341
Total [baseline] (11.02 s) : 0, 11019749
Agent [candidate] (1.179 s) : 0, 1178926
Total [candidate] (11.033 s) : 0, 11033100
section profiling
Agent [baseline] (1.284 s) : 0, 1284218
Total [baseline] (10.873 s) : 0, 10873431
Agent [candidate] (1.276 s) : 0, 1275939
Total [candidate] (10.88 s) : 0, 10880458
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent appsec 1.191 s 132.145 ms (12.5%)
Agent iast 1.19 s 131.62 ms (12.4%)
Agent profiling 1.284 s 225.496 ms (21.3%)
Total tracing 10.457 s -
Total appsec 10.739 s 281.755 ms (2.7%)
Total iast 11.02 s 562.874 ms (5.4%)
Total profiling 10.873 s 416.557 ms (4.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent appsec 1.199 s 139.867 ms (13.2%)
Agent iast 1.179 s 119.906 ms (11.3%)
Agent profiling 1.276 s 216.92 ms (20.5%)
Total tracing 10.439 s -
Total appsec 10.782 s 342.242 ms (3.3%)
Total iast 11.033 s 593.83 ms (5.7%)
Total profiling 10.88 s 441.187 ms (4.2%)
gantt
    title petclinic - break down per module: candidate=1.48.0-SNAPSHOT~4d4a759c4b, baseline=1.48.0-SNAPSHOT~bfdfd2bcad

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (723.584 ms) : 0, 723584
BytebuddyAgent [candidate] (723.312 ms) : 0, 723312
GlobalTracer [baseline] (240.165 ms) : 0, 240165
GlobalTracer [candidate] (240.989 ms) : 0, 240989
AppSec [baseline] (54.929 ms) : 0, 54929
AppSec [candidate] (54.716 ms) : 0, 54716
Debugger [baseline] (4.513 ms) : 0, 4513
Debugger [candidate] (4.489 ms) : 0, 4489
Remote Config [baseline] (688.54 µs) : 0, 689
Remote Config [candidate] (695.019 µs) : 0, 695
Telemetry [baseline] (14.088 ms) : 0, 14088
Telemetry [candidate] (13.535 ms) : 0, 13535
section appsec
BytebuddyAgent [baseline] (735.496 ms) : 0, 735496
BytebuddyAgent [candidate] (740.981 ms) : 0, 740981
GlobalTracer [baseline] (234.742 ms) : 0, 234742
GlobalTracer [candidate] (236.862 ms) : 0, 236862
AppSec [baseline] (176.19 ms) : 0, 176190
AppSec [candidate] (176.574 ms) : 0, 176574
Debugger [baseline] (4.263 ms) : 0, 4263
Debugger [candidate] (4.262 ms) : 0, 4262
Remote Config [baseline] (639.841 µs) : 0, 640
Remote Config [candidate] (647.212 µs) : 0, 647
Telemetry [baseline] (8.207 ms) : 0, 8207
Telemetry [candidate] (8.209 ms) : 0, 8209
IAST [baseline] (21.569 ms) : 0, 21569
IAST [candidate] (21.727 ms) : 0, 21727
section iast
BytebuddyAgent [baseline] (847.994 ms) : 0, 847994
BytebuddyAgent [candidate] (836.907 ms) : 0, 836907
GlobalTracer [baseline] (229.415 ms) : 0, 229415
GlobalTracer [candidate] (229.733 ms) : 0, 229733
AppSec [baseline] (55.666 ms) : 0, 55666
AppSec [candidate] (55.738 ms) : 0, 55738
Debugger [baseline] (4.173 ms) : 0, 4173
Debugger [candidate] (4.146 ms) : 0, 4146
Remote Config [baseline] (614.371 µs) : 0, 614
Remote Config [candidate] (604.357 µs) : 0, 604
Telemetry [baseline] (8.86 ms) : 0, 8860
Telemetry [candidate] (8.753 ms) : 0, 8753
IAST [baseline] (22.941 ms) : 0, 22941
IAST [candidate] (22.61 ms) : 0, 22610
section profiling
BytebuddyAgent [baseline] (716.113 ms) : 0, 716113
BytebuddyAgent [candidate] (711.211 ms) : 0, 711211
GlobalTracer [baseline] (350.181 ms) : 0, 350181
GlobalTracer [candidate] (349.348 ms) : 0, 349348
AppSec [baseline] (54.59 ms) : 0, 54590
AppSec [candidate] (53.487 ms) : 0, 53487
Debugger [baseline] (4.386 ms) : 0, 4386
Debugger [candidate] (4.305 ms) : 0, 4305
Remote Config [baseline] (715.021 µs) : 0, 715
Remote Config [candidate] (695.047 µs) : 0, 695
Telemetry [baseline] (9.087 ms) : 0, 9087
Telemetry [candidate] (8.964 ms) : 0, 8964
ProfilingAgent [baseline] (103.022 ms) : 0, 103022
ProfilingAgent [candidate] (102.138 ms) : 0, 102138
Profiling [baseline] (103.05 ms) : 0, 103050
Profiling [candidate] (102.163 ms) : 0, 102163
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.48.0-SNAPSHOT~4d4a759c4b, baseline=1.48.0-SNAPSHOT~bfdfd2bcad

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.052 s) : 0, 1052021
Total [baseline] (8.712 s) : 0, 8711511
Agent [candidate] (1.051 s) : 0, 1050918
Total [candidate] (8.663 s) : 0, 8662938
section iast
Agent [baseline] (1.178 s) : 0, 1178107
Total [baseline] (9.23 s) : 0, 9229766
Agent [candidate] (1.183 s) : 0, 1183483
Total [candidate] (9.302 s) : 0, 9301981
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.177 s) : 0, 1176628
Total [baseline] (9.191 s) : 0, 9191374
Agent [candidate] (1.184 s) : 0, 1183872
Total [candidate] (9.254 s) : 0, 9254374
section iast_TELEMETRY_OFF
Agent [baseline] (1.171 s) : 0, 1171288
Total [baseline] (9.205 s) : 0, 9205180
Agent [candidate] (1.184 s) : 0, 1183942
Total [candidate] (9.271 s) : 0, 9270828
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.052 s -
Agent iast 1.178 s 126.086 ms (12.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.177 s 124.608 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.171 s 119.267 ms (11.3%)
Total tracing 8.712 s -
Total iast 9.23 s 518.255 ms (5.9%)
Total iast_HARDCODED_SECRET_DISABLED 9.191 s 479.863 ms (5.5%)
Total iast_TELEMETRY_OFF 9.205 s 493.669 ms (5.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.051 s -
Agent iast 1.183 s 132.565 ms (12.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.184 s 132.954 ms (12.7%)
Agent iast_TELEMETRY_OFF 1.184 s 133.024 ms (12.7%)
Total tracing 8.663 s -
Total iast 9.302 s 639.043 ms (7.4%)
Total iast_HARDCODED_SECRET_DISABLED 9.254 s 591.436 ms (6.8%)
Total iast_TELEMETRY_OFF 9.271 s 607.89 ms (7.0%)
gantt
    title insecure-bank - break down per module: candidate=1.48.0-SNAPSHOT~4d4a759c4b, baseline=1.48.0-SNAPSHOT~bfdfd2bcad

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (718.58 ms) : 0, 718580
BytebuddyAgent [candidate] (717.56 ms) : 0, 717560
GlobalTracer [baseline] (239.648 ms) : 0, 239648
GlobalTracer [candidate] (239.637 ms) : 0, 239637
AppSec [baseline] (55.252 ms) : 0, 55252
AppSec [candidate] (54.417 ms) : 0, 54417
Debugger [baseline] (4.488 ms) : 0, 4488
Debugger [candidate] (4.452 ms) : 0, 4452
Remote Config [baseline] (699.882 µs) : 0, 700
Remote Config [candidate] (691.907 µs) : 0, 692
Telemetry [baseline] (12.738 ms) : 0, 12738
Telemetry [candidate] (13.638 ms) : 0, 13638
section iast
BytebuddyAgent [baseline] (836.789 ms) : 0, 836789
BytebuddyAgent [candidate] (839.395 ms) : 0, 839395
GlobalTracer [baseline] (228.718 ms) : 0, 228718
GlobalTracer [candidate] (231.141 ms) : 0, 231141
IAST [baseline] (22.771 ms) : 0, 22771
IAST [candidate] (22.954 ms) : 0, 22954
AppSec [baseline] (55.723 ms) : 0, 55723
AppSec [candidate] (55.798 ms) : 0, 55798
Debugger [baseline] (4.205 ms) : 0, 4205
Debugger [candidate] (4.206 ms) : 0, 4206
Remote Config [baseline] (615.49 µs) : 0, 615
Remote Config [candidate] (618.821 µs) : 0, 619
Telemetry [baseline] (8.852 ms) : 0, 8852
Telemetry [candidate] (8.918 ms) : 0, 8918
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (835.523 ms) : 0, 835523
BytebuddyAgent [candidate] (841.37 ms) : 0, 841370
GlobalTracer [baseline] (228.548 ms) : 0, 228548
GlobalTracer [candidate] (229.707 ms) : 0, 229707
IAST [baseline] (22.734 ms) : 0, 22734
IAST [candidate] (22.779 ms) : 0, 22779
AppSec [baseline] (55.771 ms) : 0, 55771
AppSec [candidate] (55.789 ms) : 0, 55789
Debugger [baseline] (4.151 ms) : 0, 4151
Debugger [candidate] (4.205 ms) : 0, 4205
Remote Config [baseline] (600.913 µs) : 0, 601
Remote Config [candidate] (612.905 µs) : 0, 613
Telemetry [baseline] (8.901 ms) : 0, 8901
Telemetry [candidate] (8.864 ms) : 0, 8864
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (831.658 ms) : 0, 831658
BytebuddyAgent [candidate] (840.566 ms) : 0, 840566
GlobalTracer [baseline] (227.842 ms) : 0, 227842
GlobalTracer [candidate] (230.478 ms) : 0, 230478
IAST [baseline] (22.247 ms) : 0, 22247
IAST [candidate] (22.695 ms) : 0, 22695
AppSec [baseline] (55.854 ms) : 0, 55854
AppSec [candidate] (56.074 ms) : 0, 56074
Debugger [baseline] (4.135 ms) : 0, 4135
Debugger [candidate] (4.216 ms) : 0, 4216
Remote Config [baseline] (603.083 µs) : 0, 603
Remote Config [candidate] (617.723 µs) : 0, 618
Telemetry [baseline] (8.612 ms) : 0, 8612
Telemetry [candidate] (8.745 ms) : 0, 8745
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-03-31T12:51:20 2025-03-31T12:59:05
git_branch master mcculls/context-scope-bridge
git_commit_date 1743424027 1743424240
git_commit_sha bfdfd2b 4d4a759
release_version 1.48.0-SNAPSHOT~bfdfd2bcad 1.48.0-SNAPSHOT~4d4a759c4b
start_time 2025-03-31T12:51:06 2025-03-31T12:58:51
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1743426344 1743426344
ci_job_id 872262084 872262084
ci_pipeline_id 60501043 60501043
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-rewukxas-project-304-concurrent-0-a4w20rut 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-rewukxas-project-304-concurrent-0-a4w20rut 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 petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~4d4a759c4b, baseline=1.48.0-SNAPSHOT~bfdfd2bcad
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.368 ms) : 1349, 1388
.   : milestone, 1368,
appsec (1.737 ms) : 1713, 1760
.   : milestone, 1737,
appsec_no_iast (1.735 ms) : 1709, 1760
.   : milestone, 1735,
code_origins (1.687 ms) : 1660, 1714
.   : milestone, 1687,
iast (1.499 ms) : 1475, 1524
.   : milestone, 1499,
profiling (1.524 ms) : 1501, 1547
.   : milestone, 1524,
tracing (1.515 ms) : 1491, 1539
.   : milestone, 1515,
section candidate
no_agent (1.378 ms) : 1357, 1398
.   : milestone, 1378,
appsec (1.733 ms) : 1709, 1757
.   : milestone, 1733,
appsec_no_iast (1.723 ms) : 1697, 1748
.   : milestone, 1723,
code_origins (1.688 ms) : 1661, 1716
.   : milestone, 1688,
iast (1.53 ms) : 1505, 1555
.   : milestone, 1530,
profiling (1.522 ms) : 1499, 1546
.   : milestone, 1522,
tracing (1.5 ms) : 1475, 1525
.   : milestone, 1500,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.368 ms [1.349 ms, 1.388 ms] -
appsec 1.737 ms [1.713 ms, 1.76 ms] 368.179 µs (26.9%)
appsec_no_iast 1.735 ms [1.709 ms, 1.76 ms] 366.313 µs (26.8%)
code_origins 1.687 ms [1.66 ms, 1.714 ms] 318.649 µs (23.3%)
iast 1.499 ms [1.475 ms, 1.524 ms] 131.1 µs (9.6%)
profiling 1.524 ms [1.501 ms, 1.547 ms] 155.53 µs (11.4%)
tracing 1.515 ms [1.491 ms, 1.539 ms] 146.647 µs (10.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.378 ms [1.357 ms, 1.398 ms] -
appsec 1.733 ms [1.709 ms, 1.757 ms] 355.253 µs (25.8%)
appsec_no_iast 1.723 ms [1.697 ms, 1.748 ms] 344.803 µs (25.0%)
code_origins 1.688 ms [1.661 ms, 1.716 ms] 310.751 µs (22.6%)
iast 1.53 ms [1.505 ms, 1.555 ms] 152.352 µs (11.1%)
profiling 1.522 ms [1.499 ms, 1.546 ms] 144.503 µs (10.5%)
tracing 1.5 ms [1.475 ms, 1.525 ms] 122.13 µs (8.9%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~4d4a759c4b, baseline=1.48.0-SNAPSHOT~bfdfd2bcad
    dateFormat X
    axisFormat %s
section baseline
no_agent (380.082 µs) : 359, 401
.   : milestone, 380,
iast (516.718 µs) : 495, 539
.   : milestone, 517,
iast_FULL (731.735 µs) : 710, 754
.   : milestone, 732,
iast_GLOBAL (569.403 µs) : 546, 593
.   : milestone, 569,
iast_HARDCODED_SECRET_DISABLED (517.208 µs) : 496, 539
.   : milestone, 517,
iast_INACTIVE (476.809 µs) : 455, 499
.   : milestone, 477,
iast_TELEMETRY_OFF (503.271 µs) : 481, 525
.   : milestone, 503,
tracing (461.293 µs) : 441, 482
.   : milestone, 461,
section candidate
no_agent (385.849 µs) : 366, 406
.   : milestone, 386,
iast (520.303 µs) : 498, 543
.   : milestone, 520,
iast_FULL (734.241 µs) : 712, 756
.   : milestone, 734,
iast_GLOBAL (562.226 µs) : 540, 584
.   : milestone, 562,
iast_HARDCODED_SECRET_DISABLED (510.827 µs) : 489, 533
.   : milestone, 511,
iast_INACTIVE (468.309 µs) : 447, 490
.   : milestone, 468,
iast_TELEMETRY_OFF (499.496 µs) : 478, 521
.   : milestone, 499,
tracing (458.729 µs) : 437, 480
.   : milestone, 459,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 380.082 µs [359.393 µs, 400.77 µs] -
iast 516.718 µs [494.603 µs, 538.832 µs] 136.636 µs (35.9%)
iast_FULL 731.735 µs [709.851 µs, 753.619 µs] 351.653 µs (92.5%)
iast_GLOBAL 569.403 µs [546.252 µs, 592.554 µs] 189.321 µs (49.8%)
iast_HARDCODED_SECRET_DISABLED 517.208 µs [495.52 µs, 538.896 µs] 137.126 µs (36.1%)
iast_INACTIVE 476.809 µs [455.049 µs, 498.569 µs] 96.728 µs (25.4%)
iast_TELEMETRY_OFF 503.271 µs [481.045 µs, 525.497 µs] 123.189 µs (32.4%)
tracing 461.293 µs [440.513 µs, 482.073 µs] 81.212 µs (21.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 385.849 µs [366.131 µs, 405.567 µs] -
iast 520.303 µs [498.098 µs, 542.508 µs] 134.454 µs (34.8%)
iast_FULL 734.241 µs [712.056 µs, 756.427 µs] 348.392 µs (90.3%)
iast_GLOBAL 562.226 µs [540.162 µs, 584.29 µs] 176.377 µs (45.7%)
iast_HARDCODED_SECRET_DISABLED 510.827 µs [489.107 µs, 532.548 µs] 124.978 µs (32.4%)
iast_INACTIVE 468.309 µs [446.525 µs, 490.093 µs] 82.46 µs (21.4%)
iast_TELEMETRY_OFF 499.496 µs [477.971 µs, 521.021 µs] 113.647 µs (29.5%)
tracing 458.729 µs [437.425 µs, 480.033 µs] 72.88 µs (18.9%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/context-scope-bridge
git_commit_date 1743424027 1743424240
git_commit_sha bfdfd2b 4d4a759
release_version 1.48.0-SNAPSHOT~bfdfd2bcad 1.48.0-SNAPSHOT~4d4a759c4b
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1743426849 1743426849
ci_job_id 872262086 872262086
ci_pipeline_id 60501043 60501043
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-ylcbzox4-project-304-concurrent-6-ea5tuynq 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-ylcbzox4-project-304-concurrent-6-ea5tuynq 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~4d4a759c4b, baseline=1.48.0-SNAPSHOT~bfdfd2bcad
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.929 s) : 14929000, 14929000
.   : milestone, 14929000,
appsec (14.597 s) : 14597000, 14597000
.   : milestone, 14597000,
iast (18.868 s) : 18868000, 18868000
.   : milestone, 18868000,
iast_GLOBAL (18.186 s) : 18186000, 18186000
.   : milestone, 18186000,
profiling (15.29 s) : 15290000, 15290000
.   : milestone, 15290000,
tracing (15.036 s) : 15036000, 15036000
.   : milestone, 15036000,
section candidate
no_agent (14.997 s) : 14997000, 14997000
.   : milestone, 14997000,
appsec (15.121 s) : 15121000, 15121000
.   : milestone, 15121000,
iast (19.042 s) : 19042000, 19042000
.   : milestone, 19042000,
iast_GLOBAL (17.38 s) : 17380000, 17380000
.   : milestone, 17380000,
profiling (15.119 s) : 15119000, 15119000
.   : milestone, 15119000,
tracing (15.477 s) : 15477000, 15477000
.   : milestone, 15477000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.929 s [14.929 s, 14.929 s] -
appsec 14.597 s [14.597 s, 14.597 s] -332.0 ms (-2.2%)
iast 18.868 s [18.868 s, 18.868 s] 3.939 s (26.4%)
iast_GLOBAL 18.186 s [18.186 s, 18.186 s] 3.257 s (21.8%)
profiling 15.29 s [15.29 s, 15.29 s] 361.0 ms (2.4%)
tracing 15.036 s [15.036 s, 15.036 s] 107.0 ms (0.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.997 s [14.997 s, 14.997 s] -
appsec 15.121 s [15.121 s, 15.121 s] 124.0 ms (0.8%)
iast 19.042 s [19.042 s, 19.042 s] 4.045 s (27.0%)
iast_GLOBAL 17.38 s [17.38 s, 17.38 s] 2.383 s (15.9%)
profiling 15.119 s [15.119 s, 15.119 s] 122.0 ms (0.8%)
tracing 15.477 s [15.477 s, 15.477 s] 480.0 ms (3.2%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~4d4a759c4b, baseline=1.48.0-SNAPSHOT~bfdfd2bcad
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
.   : milestone, 1473,
appsec (2.345 ms) : 2301, 2389
.   : milestone, 2345,
iast (2.123 ms) : 2067, 2178
.   : milestone, 2123,
iast_GLOBAL (2.163 ms) : 2108, 2219
.   : milestone, 2163,
profiling (1.978 ms) : 1934, 2021
.   : milestone, 1978,
tracing (1.958 ms) : 1915, 2000
.   : milestone, 1958,
section candidate
no_agent (1.483 ms) : 1471, 1494
.   : milestone, 1483,
appsec (2.355 ms) : 2311, 2398
.   : milestone, 2355,
iast (2.123 ms) : 2068, 2179
.   : milestone, 2123,
iast_GLOBAL (2.169 ms) : 2113, 2225
.   : milestone, 2169,
profiling (2.01 ms) : 1964, 2055
.   : milestone, 2010,
tracing (1.962 ms) : 1919, 2005
.   : milestone, 1962,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.473 ms [1.461 ms, 1.484 ms] -
appsec 2.345 ms [2.301 ms, 2.389 ms] 872.388 µs (59.2%)
iast 2.123 ms [2.067 ms, 2.178 ms] 649.941 µs (44.1%)
iast_GLOBAL 2.163 ms [2.108 ms, 2.219 ms] 690.266 µs (46.9%)
profiling 1.978 ms [1.934 ms, 2.021 ms] 504.678 µs (34.3%)
tracing 1.958 ms [1.915 ms, 2.0 ms] 484.743 µs (32.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.483 ms [1.471 ms, 1.494 ms] -
appsec 2.355 ms [2.311 ms, 2.398 ms] 871.916 µs (58.8%)
iast 2.123 ms [2.068 ms, 2.179 ms] 640.731 µs (43.2%)
iast_GLOBAL 2.169 ms [2.113 ms, 2.225 ms] 686.354 µs (46.3%)
profiling 2.01 ms [1.964 ms, 2.055 ms] 526.99 µs (35.5%)
tracing 1.962 ms [1.919 ms, 2.005 ms] 479.037 µs (32.3%)

@mcculls mcculls force-pushed the mcculls/context-scope-bridge branch 3 times, most recently from 6c1c815 to a374998 Compare March 31, 2025 12:26
@mcculls mcculls removed the tag: do not merge Do not merge changes label Mar 31, 2025
@mcculls mcculls force-pushed the mcculls/context-scope-bridge branch from a374998 to 4d4a759 Compare March 31, 2025 12:30
@mcculls mcculls marked this pull request as ready for review March 31, 2025 13:15
@mcculls mcculls requested a review from a team as a code owner March 31, 2025 13:15
@mcculls mcculls requested a review from smola March 31, 2025 13:15
@mcculls mcculls changed the title WIP: Temporary bridge between contexts and spans/scopes Temporary bridge between contexts and spans/scopes Mar 31, 2025
@mcculls mcculls requested review from amarziali and mhlidd March 31, 2025 13:16
Copy link
Collaborator

@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.

looks ok from my understanding

@mcculls mcculls merged commit d08dc3a into master Mar 31, 2025
255 checks passed
@mcculls mcculls deleted the mcculls/context-scope-bridge branch March 31, 2025 15:13
@github-actions github-actions bot added this to the 1.48.0 milestone Mar 31, 2025
@@ -145,7 +152,7 @@ public final void setAsyncPropagation(final boolean value) {

@Override
public final String toString() {
return super.toString() + "->" + span;
return super.toString() + "->" + context;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we dump only span() here instead of full context?


@Override
public Context swap(Context context) {
throw new UnsupportedOperationException("Not yet implemented");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to throw an UnsupportedOperation from the scope manager in master? What about if someone start using the ContextManager API in an instrumentation? 😬

@@ -210,6 +210,6 @@ default <T> T get(@Nonnull ContextKey<T> key) {

@Override
default <T> Context with(@Nonnull ContextKey<T> key, @Nullable T value) {
return Context.root().with(SPAN_KEY, this, key, value);
return SPAN_KEY == key ? (Context) value : Context.root().with(SPAN_KEY, this, key, value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting optimization! 👍

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