Skip to content

Migrate zio instrumentation to new Context API #8527

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

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

mcculls
Copy link
Contributor

@mcculls mcculls commented Mar 8, 2025

Additional Notes

Tests are expected to fail while the scope manager has not yet been replaced.

That's why the target of this PR is the project/context feature branch.

Contributor Checklist

Jira ticket: APMAPI-963

@mcculls mcculls added inst: others All other instrumentations tag: no release notes Changes to exclude from release notes type: refactoring labels Mar 8, 2025
@pr-commenter
Copy link

pr-commenter bot commented Mar 8, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/use-context-in-zio-fibers
git_commit_date 1741423605 1741471904
git_commit_sha 04b1afd 61a3d40
release_version 1.48.0-SNAPSHOT~04b1afde28 1.48.0-SNAPSHOT~61a3d403b4
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1741475118 1741475118
ci_job_id 839246275 839246275
ci_pipeline_id 58202042 58202042
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-2wkmbgws-project-304-concurrent-0-9lt2dyez 6.8.0-1023-aws #25~22.04.1-Ubuntu SMP Tue Jan 28 12:51:22 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-2wkmbgws-project-304-concurrent-0-9lt2dyez 6.8.0-1023-aws #25~22.04.1-Ubuntu SMP Tue Jan 28 12:51:22 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 59 metrics, 4 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.48.0-SNAPSHOT~61a3d403b4, baseline=1.48.0-SNAPSHOT~04b1afde28

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.041 s) : 0, 1041058
Total [baseline] (10.455 s) : 0, 10455104
Agent [candidate] (1.041 s) : 0, 1040630
Total [candidate] (10.479 s) : 0, 10479252
section appsec
Agent [baseline] (1.191 s) : 0, 1190657
Total [baseline] (10.776 s) : 0, 10776042
Agent [candidate] (1.184 s) : 0, 1184141
Total [candidate] (10.809 s) : 0, 10809354
section iast
Agent [baseline] (1.171 s) : 0, 1171214
Total [baseline] (11.036 s) : 0, 11036092
Agent [candidate] (1.182 s) : 0, 1181503
Total [candidate] (10.994 s) : 0, 10994369
section profiling
Agent [baseline] (1.258 s) : 0, 1258484
Total [baseline] (10.917 s) : 0, 10916566
Agent [candidate] (1.269 s) : 0, 1268958
Total [candidate] (10.911 s) : 0, 10911352
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.041 s -
Agent appsec 1.191 s 149.599 ms (14.4%)
Agent iast 1.171 s 130.155 ms (12.5%)
Agent profiling 1.258 s 217.426 ms (20.9%)
Total tracing 10.455 s -
Total appsec 10.776 s 320.938 ms (3.1%)
Total iast 11.036 s 580.988 ms (5.6%)
Total profiling 10.917 s 461.463 ms (4.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.041 s -
Agent appsec 1.184 s 143.511 ms (13.8%)
Agent iast 1.182 s 140.873 ms (13.5%)
Agent profiling 1.269 s 228.328 ms (21.9%)
Total tracing 10.479 s -
Total appsec 10.809 s 330.102 ms (3.2%)
Total iast 10.994 s 515.118 ms (4.9%)
Total profiling 10.911 s 432.101 ms (4.1%)
gantt
    title petclinic - break down per module: candidate=1.48.0-SNAPSHOT~61a3d403b4, baseline=1.48.0-SNAPSHOT~04b1afde28

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (718.052 ms) : 0, 718052
BytebuddyAgent [candidate] (718.703 ms) : 0, 718703
GlobalTracer [baseline] (240.063 ms) : 0, 240063
GlobalTracer [candidate] (240.227 ms) : 0, 240227
AppSec [baseline] (55.285 ms) : 0, 55285
AppSec [candidate] (55.402 ms) : 0, 55402
Remote Config [baseline] (685.578 µs) : 0, 686
Remote Config [candidate] (688.305 µs) : 0, 688
Telemetry [baseline] (12.041 ms) : 0, 12041
Telemetry [candidate] (10.632 ms) : 0, 10632
section appsec
BytebuddyAgent [baseline] (740.777 ms) : 0, 740777
BytebuddyAgent [candidate] (735.798 ms) : 0, 735798
GlobalTracer [baseline] (237.956 ms) : 0, 237956
GlobalTracer [candidate] (236.905 ms) : 0, 236905
IAST [baseline] (21.602 ms) : 0, 21602
IAST [candidate] (21.621 ms) : 0, 21621
AppSec [baseline] (177.079 ms) : 0, 177079
AppSec [candidate] (176.711 ms) : 0, 176711
Remote Config [baseline] (661.467 µs) : 0, 661
Remote Config [candidate] (651.762 µs) : 0, 652
Telemetry [baseline] (8.316 ms) : 0, 8316
Telemetry [candidate] (8.312 ms) : 0, 8312
section iast
BytebuddyAgent [baseline] (837.16 ms) : 0, 837160
BytebuddyAgent [candidate] (845.359 ms) : 0, 845359
GlobalTracer [baseline] (230.775 ms) : 0, 230775
GlobalTracer [candidate] (232.127 ms) : 0, 232127
IAST [baseline] (23.474 ms) : 0, 23474
IAST [candidate] (22.919 ms) : 0, 22919
AppSec [baseline] (55.672 ms) : 0, 55672
AppSec [candidate] (56.797 ms) : 0, 56797
Remote Config [baseline] (598.928 µs) : 0, 599
Remote Config [candidate] (611.456 µs) : 0, 611
Telemetry [baseline] (8.615 ms) : 0, 8615
Telemetry [candidate] (8.573 ms) : 0, 8573
section profiling
BytebuddyAgent [baseline] (709.527 ms) : 0, 709527
BytebuddyAgent [candidate] (715.098 ms) : 0, 715098
GlobalTracer [baseline] (348.68 ms) : 0, 348680
GlobalTracer [candidate] (352.106 ms) : 0, 352106
AppSec [baseline] (54.736 ms) : 0, 54736
AppSec [candidate] (54.523 ms) : 0, 54523
Remote Config [baseline] (668.757 µs) : 0, 669
Remote Config [candidate] (665.973 µs) : 0, 666
Telemetry [baseline] (8.906 ms) : 0, 8906
Telemetry [candidate] (8.991 ms) : 0, 8991
ProfilingAgent [baseline] (95.517 ms) : 0, 95517
ProfilingAgent [candidate] (96.715 ms) : 0, 96715
Profiling [baseline] (95.541 ms) : 0, 95541
Profiling [candidate] (96.742 ms) : 0, 96742
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.48.0-SNAPSHOT~61a3d403b4, baseline=1.48.0-SNAPSHOT~04b1afde28

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.04 s) : 0, 1039726
Total [baseline] (8.665 s) : 0, 8664680
Agent [candidate] (1.043 s) : 0, 1043269
Total [candidate] (8.668 s) : 0, 8667510
section iast
Agent [baseline] (1.17 s) : 0, 1169941
Total [baseline] (9.3 s) : 0, 9299916
Agent [candidate] (1.177 s) : 0, 1177259
Total [candidate] (9.252 s) : 0, 9252269
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.18 s) : 0, 1180274
Total [baseline] (9.252 s) : 0, 9252316
Agent [candidate] (1.173 s) : 0, 1172622
Total [candidate] (9.276 s) : 0, 9276324
section iast_TELEMETRY_OFF
Agent [baseline] (1.178 s) : 0, 1177551
Total [baseline] (9.287 s) : 0, 9287354
Agent [candidate] (1.168 s) : 0, 1168377
Total [candidate] (9.222 s) : 0, 9222169
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.04 s -
Agent iast 1.17 s 130.215 ms (12.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.18 s 140.548 ms (13.5%)
Agent iast_TELEMETRY_OFF 1.178 s 137.825 ms (13.3%)
Total tracing 8.665 s -
Total iast 9.3 s 635.236 ms (7.3%)
Total iast_HARDCODED_SECRET_DISABLED 9.252 s 587.636 ms (6.8%)
Total iast_TELEMETRY_OFF 9.287 s 622.674 ms (7.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.043 s -
Agent iast 1.177 s 133.989 ms (12.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.173 s 129.353 ms (12.4%)
Agent iast_TELEMETRY_OFF 1.168 s 125.107 ms (12.0%)
Total tracing 8.668 s -
Total iast 9.252 s 584.759 ms (6.7%)
Total iast_HARDCODED_SECRET_DISABLED 9.276 s 608.814 ms (7.0%)
Total iast_TELEMETRY_OFF 9.222 s 554.659 ms (6.4%)
gantt
    title insecure-bank - break down per module: candidate=1.48.0-SNAPSHOT~61a3d403b4, baseline=1.48.0-SNAPSHOT~04b1afde28

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (719.717 ms) : 0, 719717
BytebuddyAgent [candidate] (719.726 ms) : 0, 719726
GlobalTracer [baseline] (239.602 ms) : 0, 239602
GlobalTracer [candidate] (240.338 ms) : 0, 240338
AppSec [baseline] (55.352 ms) : 0, 55352
AppSec [candidate] (55.39 ms) : 0, 55390
Remote Config [baseline] (686.526 µs) : 0, 687
Remote Config [candidate] (709.7 µs) : 0, 710
Telemetry [baseline] (9.277 ms) : 0, 9277
Telemetry [candidate] (12.082 ms) : 0, 12082
section iast
BytebuddyAgent [baseline] (836.016 ms) : 0, 836016
BytebuddyAgent [candidate] (841.239 ms) : 0, 841239
GlobalTracer [baseline] (230.114 ms) : 0, 230114
GlobalTracer [candidate] (231.768 ms) : 0, 231768
IAST [baseline] (22.741 ms) : 0, 22741
IAST [candidate] (23.001 ms) : 0, 23001
AppSec [baseline] (56.789 ms) : 0, 56789
AppSec [candidate] (56.823 ms) : 0, 56823
Remote Config [baseline] (604.994 µs) : 0, 605
Remote Config [candidate] (612.968 µs) : 0, 613
Telemetry [baseline] (8.701 ms) : 0, 8701
Telemetry [candidate] (8.816 ms) : 0, 8816
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (843.174 ms) : 0, 843174
BytebuddyAgent [candidate] (837.615 ms) : 0, 837615
GlobalTracer [baseline] (231.81 ms) : 0, 231810
GlobalTracer [candidate] (231.094 ms) : 0, 231094
IAST [baseline] (23.302 ms) : 0, 23302
IAST [candidate] (22.823 ms) : 0, 22823
AppSec [baseline] (57.446 ms) : 0, 57446
AppSec [candidate] (56.659 ms) : 0, 56659
Remote Config [baseline] (629.963 µs) : 0, 630
Remote Config [candidate] (616.898 µs) : 0, 617
Telemetry [baseline] (8.85 ms) : 0, 8850
Telemetry [candidate] (8.766 ms) : 0, 8766
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (841.194 ms) : 0, 841194
BytebuddyAgent [candidate] (834.259 ms) : 0, 834259
GlobalTracer [baseline] (231.929 ms) : 0, 231929
GlobalTracer [candidate] (230.557 ms) : 0, 230557
IAST [baseline] (22.781 ms) : 0, 22781
IAST [candidate] (22.392 ms) : 0, 22392
AppSec [baseline] (57.2 ms) : 0, 57200
AppSec [candidate] (56.923 ms) : 0, 56923
Remote Config [baseline] (623.6 µs) : 0, 624
Remote Config [candidate] (615.462 µs) : 0, 615
Telemetry [baseline] (8.749 ms) : 0, 8749
Telemetry [candidate] (8.66 ms) : 0, 8660
Loading

Load

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/use-context-in-zio-fibers
git_commit_date 1741423605 1741471904
git_commit_sha 04b1afd 61a3d40
release_version 1.48.0-SNAPSHOT~04b1afde28 1.48.0-SNAPSHOT~61a3d403b4
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1741474672 1741474672
ci_job_id 839246277 839246277
ci_pipeline_id 58202042 58202042
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-2wkmbgws-project-304-concurrent-2-9jmzpam2 6.8.0-1023-aws #25~22.04.1-Ubuntu SMP Tue Jan 28 12:51:22 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-2wkmbgws-project-304-concurrent-2-9jmzpam2 6.8.0-1023-aws #25~22.04.1-Ubuntu SMP Tue Jan 28 12:51:22 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~61a3d403b4, baseline=1.48.0-SNAPSHOT~04b1afde28
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.718 s) : 14718000, 14718000
.   : milestone, 14718000,
appsec (15.034 s) : 15034000, 15034000
.   : milestone, 15034000,
iast (18.731 s) : 18731000, 18731000
.   : milestone, 18731000,
iast_GLOBAL (18.221 s) : 18221000, 18221000
.   : milestone, 18221000,
profiling (15.128 s) : 15128000, 15128000
.   : milestone, 15128000,
tracing (14.905 s) : 14905000, 14905000
.   : milestone, 14905000,
section candidate
no_agent (14.772 s) : 14772000, 14772000
.   : milestone, 14772000,
appsec (14.997 s) : 14997000, 14997000
.   : milestone, 14997000,
iast (18.489 s) : 18489000, 18489000
.   : milestone, 18489000,
iast_GLOBAL (17.731 s) : 17731000, 17731000
.   : milestone, 17731000,
profiling (15.179 s) : 15179000, 15179000
.   : milestone, 15179000,
tracing (14.999 s) : 14999000, 14999000
.   : milestone, 14999000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.718 s [14.718 s, 14.718 s] -
appsec 15.034 s [15.034 s, 15.034 s] 316.0 ms (2.1%)
iast 18.731 s [18.731 s, 18.731 s] 4.013 s (27.3%)
iast_GLOBAL 18.221 s [18.221 s, 18.221 s] 3.503 s (23.8%)
profiling 15.128 s [15.128 s, 15.128 s] 410.0 ms (2.8%)
tracing 14.905 s [14.905 s, 14.905 s] 187.0 ms (1.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.772 s [14.772 s, 14.772 s] -
appsec 14.997 s [14.997 s, 14.997 s] 225.0 ms (1.5%)
iast 18.489 s [18.489 s, 18.489 s] 3.717 s (25.2%)
iast_GLOBAL 17.731 s [17.731 s, 17.731 s] 2.959 s (20.0%)
profiling 15.179 s [15.179 s, 15.179 s] 407.0 ms (2.8%)
tracing 14.999 s [14.999 s, 14.999 s] 227.0 ms (1.5%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~61a3d403b4, baseline=1.48.0-SNAPSHOT~04b1afde28
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.48 ms) : 1468, 1491
.   : milestone, 1480,
appsec (2.355 ms) : 2312, 2398
.   : milestone, 2355,
iast (2.117 ms) : 2062, 2172
.   : milestone, 2117,
iast_GLOBAL (2.161 ms) : 2106, 2216
.   : milestone, 2161,
profiling (1.991 ms) : 1946, 2036
.   : milestone, 1991,
tracing (1.96 ms) : 1917, 2002
.   : milestone, 1960,
section candidate
no_agent (1.482 ms) : 1470, 1494
.   : milestone, 1482,
appsec (2.354 ms) : 2310, 2397
.   : milestone, 2354,
iast (2.125 ms) : 2070, 2180
.   : milestone, 2125,
iast_GLOBAL (2.174 ms) : 2118, 2229
.   : milestone, 2174,
profiling (1.975 ms) : 1932, 2019
.   : milestone, 1975,
tracing (1.962 ms) : 1920, 2004
.   : milestone, 1962,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.48 ms [1.468 ms, 1.491 ms] -
appsec 2.355 ms [2.312 ms, 2.398 ms] 875.316 µs (59.2%)
iast 2.117 ms [2.062 ms, 2.172 ms] 637.013 µs (43.1%)
iast_GLOBAL 2.161 ms [2.106 ms, 2.216 ms] 681.506 µs (46.1%)
profiling 1.991 ms [1.946 ms, 2.036 ms] 511.453 µs (34.6%)
tracing 1.96 ms [1.917 ms, 2.002 ms] 479.964 µs (32.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.482 ms [1.47 ms, 1.494 ms] -
appsec 2.354 ms [2.31 ms, 2.397 ms] 871.764 µs (58.8%)
iast 2.125 ms [2.07 ms, 2.18 ms] 642.709 µs (43.4%)
iast_GLOBAL 2.174 ms [2.118 ms, 2.229 ms] 691.538 µs (46.7%)
profiling 1.975 ms [1.932 ms, 2.019 ms] 493.311 µs (33.3%)
tracing 1.962 ms [1.92 ms, 2.004 ms] 479.85 µs (32.4%)

@mcculls mcculls requested a review from PerfectSlayer March 9, 2025 22:26
Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

A bit hard to review the change without running them but it looks good to be merged into project branch! 👍

@mcculls mcculls marked this pull request as ready for review March 10, 2025 12:34
@mcculls mcculls requested a review from a team as a code owner March 10, 2025 12:34
@mcculls mcculls merged commit c39723a into project/context Mar 10, 2025
202 of 211 checks passed
@mcculls mcculls deleted the mcculls/use-context-in-zio-fibers branch March 10, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: others All other instrumentations 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.

2 participants