Skip to content

Migrating all HttpServer Instrumentations to Extract full Context #8820

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 42 commits into from
May 24, 2025

Conversation

mhlidd
Copy link
Contributor

@mhlidd mhlidd commented May 13, 2025

What Does This Do

Migrate all Http Server Instrumentations to extract full Context. This PR adds functions in HttpServerDecorator.java to use a full Context in all instrumentation decorator calls. Additionally, it replaces the usage of activateSpan and AgentScope to Context.attach() and ContextScope to allow the scopeStack to track full Context rather than just SpanContexts.

Once merged, a follow-up PR will be opened to remove all Http Server decorator calls that were based upon Span Contexts. The new Context-based decorator functions will be used instead.

This PR enables full W3C Baggage extraction for all Http Server instrumentations.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@pr-commenter
Copy link

pr-commenter bot commented May 13, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/migrate_http_server_instrumentations
git_commit_date 1746789389 1748068217
git_commit_sha ad6d5fe 4a2be23
release_version 1.50.0-SNAPSHOT~ad6d5fef42 1.50.0-SNAPSHOT~4a2be2397b
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1748070641 1748070641
ci_job_id 953222480 953222480
ci_pipeline_id 66044893 66044893
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-8t2n4jps-project-304-concurrent-0-eflra092 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-8t2n4jps-project-304-concurrent-0-eflra092 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

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

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:petclinic:profiling:ProfilingAgent better
[-7.762ms; -2.730ms] or [-7.097%; -2.496%]
104.126ms 109.372ms
scenario:startup:petclinic:profiling:GlobalTracer better
[-20.552ms; -16.833ms] or [-5.428%; -4.446%]
359.942ms 378.635ms
scenario:startup:petclinic:profiling:AppSec worse
[+6.141ms; +9.374ms] or [+11.313%; +17.270%]
62.037ms 54.279ms
scenario:startup:petclinic:profiling:Profiling better
[-7.764ms; -2.731ms] or [-7.097%; -2.496%]
104.150ms 109.397ms
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~4a2be2397b, baseline=1.50.0-SNAPSHOT~ad6d5fef42

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.027 s) : 0, 1026647
Total [baseline] (10.623 s) : 0, 10623000
Agent [candidate] (1.02 s) : 0, 1020202
Total [candidate] (10.503 s) : 0, 10503020
section appsec
Agent [baseline] (1.162 s) : 0, 1162079
Total [baseline] (10.712 s) : 0, 10711539
Agent [candidate] (1.16 s) : 0, 1160134
Total [candidate] (10.653 s) : 0, 10652845
section iast
Agent [baseline] (1.149 s) : 0, 1148516
Total [baseline] (10.835 s) : 0, 10835411
Agent [candidate] (1.151 s) : 0, 1151500
Total [candidate] (10.887 s) : 0, 10887296
section profiling
Agent [baseline] (1.281 s) : 0, 1281457
Total [baseline] (10.909 s) : 0, 10908989
Agent [candidate] (1.266 s) : 0, 1265953
Total [candidate] (10.874 s) : 0, 10873614
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.027 s -
Agent appsec 1.162 s 135.432 ms (13.2%)
Agent iast 1.149 s 121.869 ms (11.9%)
Agent profiling 1.281 s 254.81 ms (24.8%)
Total tracing 10.623 s -
Total appsec 10.712 s 88.539 ms (0.8%)
Total iast 10.835 s 212.411 ms (2.0%)
Total profiling 10.909 s 285.989 ms (2.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.02 s -
Agent appsec 1.16 s 139.932 ms (13.7%)
Agent iast 1.151 s 131.298 ms (12.9%)
Agent profiling 1.266 s 245.751 ms (24.1%)
Total tracing 10.503 s -
Total appsec 10.653 s 149.826 ms (1.4%)
Total iast 10.887 s 384.276 ms (3.7%)
Total profiling 10.874 s 370.594 ms (3.5%)
gantt
    title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~4a2be2397b, baseline=1.50.0-SNAPSHOT~ad6d5fef42

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.639 ms) : 0, 687639
BytebuddyAgent [candidate] (683.219 ms) : 0, 683219
GlobalTracer [baseline] (241.059 ms) : 0, 241059
GlobalTracer [candidate] (240.28 ms) : 0, 240280
AppSec [baseline] (54.793 ms) : 0, 54793
AppSec [candidate] (54.485 ms) : 0, 54485
Debugger [baseline] (9.042 ms) : 0, 9042
Debugger [candidate] (8.269 ms) : 0, 8269
Remote Config [baseline] (695.895 µs) : 0, 696
Remote Config [candidate] (692.714 µs) : 0, 693
Telemetry [baseline] (9.817 ms) : 0, 9817
Telemetry [candidate] (9.694 ms) : 0, 9694
section appsec
BytebuddyAgent [baseline] (700.596 ms) : 0, 700596
BytebuddyAgent [candidate] (699.673 ms) : 0, 699673
GlobalTracer [baseline] (237.167 ms) : 0, 237167
GlobalTracer [candidate] (236.581 ms) : 0, 236581
AppSec [baseline] (175.883 ms) : 0, 175883
AppSec [candidate] (175.251 ms) : 0, 175251
Debugger [baseline] (5.971 ms) : 0, 5971
Debugger [candidate] (5.924 ms) : 0, 5924
Remote Config [baseline] (617.716 µs) : 0, 618
Remote Config [candidate] (611.89 µs) : 0, 612
Telemetry [baseline] (7.431 ms) : 0, 7431
Telemetry [candidate] (7.705 ms) : 0, 7705
IAST [baseline] (21.839 ms) : 0, 21839
IAST [candidate] (21.655 ms) : 0, 21655
section iast
BytebuddyAgent [baseline] (802.039 ms) : 0, 802039
BytebuddyAgent [candidate] (803.626 ms) : 0, 803626
GlobalTracer [baseline] (230.109 ms) : 0, 230109
GlobalTracer [candidate] (231.175 ms) : 0, 231175
AppSec [baseline] (49.418 ms) : 0, 49418
AppSec [candidate] (51.24 ms) : 0, 51240
Debugger [baseline] (5.857 ms) : 0, 5857
Debugger [candidate] (5.878 ms) : 0, 5878
Remote Config [baseline] (588.337 µs) : 0, 588
Remote Config [candidate] (592.576 µs) : 0, 593
Telemetry [baseline] (7.814 ms) : 0, 7814
Telemetry [candidate] (7.882 ms) : 0, 7882
IAST [baseline] (29.2 ms) : 0, 29200
IAST [candidate] (27.578 ms) : 0, 27578
section profiling
BytebuddyAgent [baseline] (673.669 ms) : 0, 673669
BytebuddyAgent [candidate] (673.845 ms) : 0, 673845
GlobalTracer [baseline] (378.635 ms) : 0, 378635
GlobalTracer [candidate] (359.942 ms) : 0, 359942
AppSec [baseline] (54.279 ms) : 0, 54279
AppSec [candidate] (62.037 ms) : 0, 62037
Debugger [baseline] (6.166 ms) : 0, 6166
Debugger [candidate] (6.265 ms) : 0, 6265
Remote Config [baseline] (662.293 µs) : 0, 662
Remote Config [candidate] (654.618 µs) : 0, 655
Telemetry [baseline] (8.105 ms) : 0, 8105
Telemetry [candidate] (8.261 ms) : 0, 8261
ProfilingAgent [baseline] (109.372 ms) : 0, 109372
ProfilingAgent [candidate] (104.126 ms) : 0, 104126
Profiling [baseline] (109.397 ms) : 0, 109397
Profiling [candidate] (104.15 ms) : 0, 104150
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~4a2be2397b, baseline=1.50.0-SNAPSHOT~ad6d5fef42

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.034 s) : 0, 1034145
Total [baseline] (8.683 s) : 0, 8682503
Agent [candidate] (1.023 s) : 0, 1022998
Total [candidate] (8.667 s) : 0, 8666767
section iast
Agent [baseline] (1.152 s) : 0, 1152279
Total [baseline] (9.241 s) : 0, 9241057
Agent [candidate] (1.158 s) : 0, 1158404
Total [candidate] (9.221 s) : 0, 9221104
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.146 s) : 0, 1145595
Total [baseline] (9.188 s) : 0, 9187541
Agent [candidate] (1.155 s) : 0, 1154730
Total [candidate] (9.22 s) : 0, 9219689
section iast_TELEMETRY_OFF
Agent [baseline] (1.145 s) : 0, 1145056
Total [baseline] (9.206 s) : 0, 9206115
Agent [candidate] (1.146 s) : 0, 1146181
Total [candidate] (9.212 s) : 0, 9212379
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.034 s -
Agent iast 1.152 s 118.133 ms (11.4%)
Agent iast_HARDCODED_SECRET_DISABLED 1.146 s 111.45 ms (10.8%)
Agent iast_TELEMETRY_OFF 1.145 s 110.911 ms (10.7%)
Total tracing 8.683 s -
Total iast 9.241 s 558.554 ms (6.4%)
Total iast_HARDCODED_SECRET_DISABLED 9.188 s 505.038 ms (5.8%)
Total iast_TELEMETRY_OFF 9.206 s 523.612 ms (6.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.023 s -
Agent iast 1.158 s 135.406 ms (13.2%)
Agent iast_HARDCODED_SECRET_DISABLED 1.155 s 131.731 ms (12.9%)
Agent iast_TELEMETRY_OFF 1.146 s 123.183 ms (12.0%)
Total tracing 8.667 s -
Total iast 9.221 s 554.338 ms (6.4%)
Total iast_HARDCODED_SECRET_DISABLED 9.22 s 552.922 ms (6.4%)
Total iast_TELEMETRY_OFF 9.212 s 545.612 ms (6.3%)
gantt
    title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~4a2be2397b, baseline=1.50.0-SNAPSHOT~ad6d5fef42

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (691.463 ms) : 0, 691463
BytebuddyAgent [candidate] (682.788 ms) : 0, 682788
GlobalTracer [baseline] (242.589 ms) : 0, 242589
GlobalTracer [candidate] (240.52 ms) : 0, 240520
AppSec [baseline] (54.941 ms) : 0, 54941
AppSec [candidate] (54.501 ms) : 0, 54501
Debugger [baseline] (11.764 ms) : 0, 11764
Debugger [candidate] (11.231 ms) : 0, 11231
Remote Config [baseline] (677.295 µs) : 0, 677
Remote Config [candidate] (711.871 µs) : 0, 712
Telemetry [baseline] (8.836 ms) : 0, 8836
Telemetry [candidate] (8.985 ms) : 0, 8985
section iast
BytebuddyAgent [baseline] (803.586 ms) : 0, 803586
BytebuddyAgent [candidate] (809.276 ms) : 0, 809276
GlobalTracer [baseline] (231.395 ms) : 0, 231395
GlobalTracer [candidate] (232.386 ms) : 0, 232386
IAST [baseline] (27.698 ms) : 0, 27698
IAST [candidate] (29.269 ms) : 0, 29269
AppSec [baseline] (51.427 ms) : 0, 51427
AppSec [candidate] (49.463 ms) : 0, 49463
Debugger [baseline] (5.992 ms) : 0, 5992
Debugger [candidate] (5.897 ms) : 0, 5897
Remote Config [baseline] (605.247 µs) : 0, 605
Remote Config [candidate] (578.943 µs) : 0, 579
Telemetry [baseline] (7.979 ms) : 0, 7979
Telemetry [candidate] (7.907 ms) : 0, 7907
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (799.72 ms) : 0, 799720
BytebuddyAgent [candidate] (806.776 ms) : 0, 806776
GlobalTracer [baseline] (229.49 ms) : 0, 229490
GlobalTracer [candidate] (231.128 ms) : 0, 231128
IAST [baseline] (30.06 ms) : 0, 30060
IAST [candidate] (29.173 ms) : 0, 29173
AppSec [baseline] (48.498 ms) : 0, 48498
AppSec [candidate] (49.594 ms) : 0, 49594
Debugger [baseline] (5.914 ms) : 0, 5914
Debugger [candidate] (5.911 ms) : 0, 5911
Remote Config [baseline] (593.696 µs) : 0, 594
Remote Config [candidate] (597.038 µs) : 0, 597
Telemetry [baseline] (7.906 ms) : 0, 7906
Telemetry [candidate] (7.892 ms) : 0, 7892
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (798.988 ms) : 0, 798988
BytebuddyAgent [candidate] (799.463 ms) : 0, 799463
GlobalTracer [baseline] (230.432 ms) : 0, 230432
GlobalTracer [candidate] (230.51 ms) : 0, 230510
IAST [baseline] (22.979 ms) : 0, 22979
IAST [candidate] (23.074 ms) : 0, 23074
AppSec [baseline] (54.748 ms) : 0, 54748
AppSec [candidate] (55.251 ms) : 0, 55251
Debugger [baseline] (5.974 ms) : 0, 5974
Debugger [candidate] (5.974 ms) : 0, 5974
Remote Config [baseline] (593.944 µs) : 0, 594
Remote Config [candidate] (601.174 µs) : 0, 601
Telemetry [baseline] (7.793 ms) : 0, 7793
Telemetry [candidate] (7.82 ms) : 0, 7820
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-05-24T06:40:55 2025-05-24T06:48:38
git_branch master mhlidd/migrate_http_server_instrumentations
git_commit_date 1746789389 1748068217
git_commit_sha ad6d5fe 4a2be23
release_version 1.50.0-SNAPSHOT~ad6d5fef42 1.50.0-SNAPSHOT~4a2be2397b
start_time 2025-05-24T06:40:41 2025-05-24T06:48:24
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1748069717 1748069717
ci_job_id 953222481 953222481
ci_pipeline_id 66044893 66044893
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-qshkhgbg-project-304-concurrent-0-seqy5h2u 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-qshkhgbg-project-304-concurrent-0-seqy5h2u 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 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 12 metrics, 18 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~4a2be2397b, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.357 ms) : 1338, 1377
.   : milestone, 1357,
appsec (1.728 ms) : 1705, 1752
.   : milestone, 1728,
appsec_no_iast (1.73 ms) : 1706, 1754
.   : milestone, 1730,
code_origins (1.657 ms) : 1629, 1684
.   : milestone, 1657,
iast (1.508 ms) : 1483, 1532
.   : milestone, 1508,
profiling (1.522 ms) : 1498, 1545
.   : milestone, 1522,
tracing (1.494 ms) : 1469, 1518
.   : milestone, 1494,
section candidate
no_agent (1.38 ms) : 1360, 1399
.   : milestone, 1380,
appsec (1.75 ms) : 1726, 1773
.   : milestone, 1750,
appsec_no_iast (1.727 ms) : 1704, 1750
.   : milestone, 1727,
code_origins (1.669 ms) : 1642, 1696
.   : milestone, 1669,
iast (1.518 ms) : 1494, 1542
.   : milestone, 1518,
profiling (1.508 ms) : 1484, 1531
.   : milestone, 1508,
tracing (1.492 ms) : 1466, 1517
.   : milestone, 1492,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.357 ms [1.338 ms, 1.377 ms] -
appsec 1.728 ms [1.705 ms, 1.752 ms] 371.096 µs (27.3%)
appsec_no_iast 1.73 ms [1.706 ms, 1.754 ms] 372.695 µs (27.5%)
code_origins 1.657 ms [1.629 ms, 1.684 ms] 299.308 µs (22.1%)
iast 1.508 ms [1.483 ms, 1.532 ms] 150.307 µs (11.1%)
profiling 1.522 ms [1.498 ms, 1.545 ms] 164.297 µs (12.1%)
tracing 1.494 ms [1.469 ms, 1.518 ms] 136.219 µs (10.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.38 ms [1.36 ms, 1.399 ms] -
appsec 1.75 ms [1.726 ms, 1.773 ms] 369.861 µs (26.8%)
appsec_no_iast 1.727 ms [1.704 ms, 1.75 ms] 347.331 µs (25.2%)
code_origins 1.669 ms [1.642 ms, 1.696 ms] 289.024 µs (20.9%)
iast 1.518 ms [1.494 ms, 1.542 ms] 137.971 µs (10.0%)
profiling 1.508 ms [1.484 ms, 1.531 ms] 127.741 µs (9.3%)
tracing 1.492 ms [1.466 ms, 1.517 ms] 111.689 µs (8.1%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~4a2be2397b, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (380.041 µs) : 360, 400
.   : milestone, 380,
iast (518.505 µs) : 496, 541
.   : milestone, 519,
iast_FULL (729.925 µs) : 708, 752
.   : milestone, 730,
iast_GLOBAL (560.679 µs) : 538, 583
.   : milestone, 561,
iast_HARDCODED_SECRET_DISABLED (506.728 µs) : 485, 528
.   : milestone, 507,
iast_INACTIVE (466.269 µs) : 444, 489
.   : milestone, 466,
iast_TELEMETRY_OFF (521.08 µs) : 498, 544
.   : milestone, 521,
tracing (452.288 µs) : 430, 474
.   : milestone, 452,
section candidate
no_agent (380.429 µs) : 361, 400
.   : milestone, 380,
iast (516.282 µs) : 495, 538
.   : milestone, 516,
iast_FULL (735.782 µs) : 714, 758
.   : milestone, 736,
iast_GLOBAL (567.315 µs) : 545, 590
.   : milestone, 567,
iast_HARDCODED_SECRET_DISABLED (529.771 µs) : 506, 553
.   : milestone, 530,
iast_INACTIVE (464.704 µs) : 442, 487
.   : milestone, 465,
iast_TELEMETRY_OFF (500.944 µs) : 478, 524
.   : milestone, 501,
tracing (457.071 µs) : 435, 479
.   : milestone, 457,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 380.041 µs [360.385 µs, 399.697 µs] -
iast 518.505 µs [496.458 µs, 540.552 µs] 138.464 µs (36.4%)
iast_FULL 729.925 µs [708.083 µs, 751.767 µs] 349.884 µs (92.1%)
iast_GLOBAL 560.679 µs [538.458 µs, 582.9 µs] 180.638 µs (47.5%)
iast_HARDCODED_SECRET_DISABLED 506.728 µs [485.41 µs, 528.045 µs] 126.687 µs (33.3%)
iast_INACTIVE 466.269 µs [443.682 µs, 488.855 µs] 86.228 µs (22.7%)
iast_TELEMETRY_OFF 521.08 µs [498.114 µs, 544.047 µs] 141.04 µs (37.1%)
tracing 452.288 µs [430.481 µs, 474.094 µs] 72.247 µs (19.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 380.429 µs [360.704 µs, 400.154 µs] -
iast 516.282 µs [494.59 µs, 537.974 µs] 135.853 µs (35.7%)
iast_FULL 735.782 µs [713.899 µs, 757.664 µs] 355.352 µs (93.4%)
iast_GLOBAL 567.315 µs [545.038 µs, 589.592 µs] 186.886 µs (49.1%)
iast_HARDCODED_SECRET_DISABLED 529.771 µs [506.442 µs, 553.1 µs] 149.342 µs (39.3%)
iast_INACTIVE 464.704 µs [442.163 µs, 487.246 µs] 84.275 µs (22.2%)
iast_TELEMETRY_OFF 500.944 µs [477.861 µs, 524.027 µs] 120.515 µs (31.7%)
tracing 457.071 µs [435.17 µs, 478.973 µs] 76.642 µs (20.1%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/migrate_http_server_instrumentations
git_commit_date 1746789389 1748068217
git_commit_sha ad6d5fe 4a2be23
release_version 1.50.0-SNAPSHOT~ad6d5fef42 1.50.0-SNAPSHOT~4a2be2397b
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1748070250 1748070250
ci_job_id 953222482 953222482
ci_pipeline_id 66044893 66044893
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-mtj9syws-project-304-concurrent-0-3qtpqsgu 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-mtj9syws-project-304-concurrent-0-3qtpqsgu 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 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 11 metrics, 1 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~4a2be2397b, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.481 ms) : 1470, 1493
.   : milestone, 1481,
appsec (2.409 ms) : 2361, 2458
.   : milestone, 2409,
iast (2.187 ms) : 2126, 2248
.   : milestone, 2187,
iast_GLOBAL (2.229 ms) : 2167, 2290
.   : milestone, 2229,
profiling (2.514 ms) : 2330, 2698
.   : milestone, 2514,
tracing (2.018 ms) : 1971, 2066
.   : milestone, 2018,
section candidate
no_agent (1.482 ms) : 1471, 1494
.   : milestone, 1482,
appsec (2.412 ms) : 2363, 2461
.   : milestone, 2412,
iast (2.198 ms) : 2136, 2260
.   : milestone, 2198,
iast_GLOBAL (2.232 ms) : 2170, 2293
.   : milestone, 2232,
profiling (2.035 ms) : 1986, 2084
.   : milestone, 2035,
tracing (2.03 ms) : 1982, 2078
.   : milestone, 2030,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.481 ms [1.47 ms, 1.493 ms] -
appsec 2.409 ms [2.361 ms, 2.458 ms] 927.752 µs (62.6%)
iast 2.187 ms [2.126 ms, 2.248 ms] 705.588 µs (47.6%)
iast_GLOBAL 2.229 ms [2.167 ms, 2.29 ms] 747.154 µs (50.4%)
profiling 2.514 ms [2.33 ms, 2.698 ms] 1.032 ms (69.7%)
tracing 2.018 ms [1.971 ms, 2.066 ms] 536.954 µs (36.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.482 ms [1.471 ms, 1.494 ms] -
appsec 2.412 ms [2.363 ms, 2.461 ms] 929.732 µs (62.7%)
iast 2.198 ms [2.136 ms, 2.26 ms] 715.444 µs (48.3%)
iast_GLOBAL 2.232 ms [2.17 ms, 2.293 ms] 749.357 µs (50.5%)
profiling 2.035 ms [1.986 ms, 2.084 ms] 552.611 µs (37.3%)
tracing 2.03 ms [1.982 ms, 2.078 ms] 547.819 µs (37.0%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~4a2be2397b, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.487 s) : 15487000, 15487000
.   : milestone, 15487000,
appsec (15.182 s) : 15182000, 15182000
.   : milestone, 15182000,
iast (18.5 s) : 18500000, 18500000
.   : milestone, 18500000,
iast_GLOBAL (18.22 s) : 18220000, 18220000
.   : milestone, 18220000,
profiling (14.808 s) : 14808000, 14808000
.   : milestone, 14808000,
tracing (15.031 s) : 15031000, 15031000
.   : milestone, 15031000,
section candidate
no_agent (14.786 s) : 14786000, 14786000
.   : milestone, 14786000,
appsec (15.189 s) : 15189000, 15189000
.   : milestone, 15189000,
iast (19.266 s) : 19266000, 19266000
.   : milestone, 19266000,
iast_GLOBAL (18.063 s) : 18063000, 18063000
.   : milestone, 18063000,
profiling (14.95 s) : 14950000, 14950000
.   : milestone, 14950000,
tracing (14.765 s) : 14765000, 14765000
.   : milestone, 14765000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.487 s [15.487 s, 15.487 s] -
appsec 15.182 s [15.182 s, 15.182 s] -305.0 ms (-2.0%)
iast 18.5 s [18.5 s, 18.5 s] 3.013 s (19.5%)
iast_GLOBAL 18.22 s [18.22 s, 18.22 s] 2.733 s (17.6%)
profiling 14.808 s [14.808 s, 14.808 s] -679.0 ms (-4.4%)
tracing 15.031 s [15.031 s, 15.031 s] -456.0 ms (-2.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.786 s [14.786 s, 14.786 s] -
appsec 15.189 s [15.189 s, 15.189 s] 403.0 ms (2.7%)
iast 19.266 s [19.266 s, 19.266 s] 4.48 s (30.3%)
iast_GLOBAL 18.063 s [18.063 s, 18.063 s] 3.277 s (22.2%)
profiling 14.95 s [14.95 s, 14.95 s] 164.0 ms (1.1%)
tracing 14.765 s [14.765 s, 14.765 s] -21.0 ms (-0.1%)

@mhlidd mhlidd changed the title updating akkahttp Migrating all HttpServer Instrumentations to use Context and ContextScope May 13, 2025
@mhlidd mhlidd changed the base branch from mhlidd/migrate_tomcat_okhttp to master May 14, 2025 14:11
@mhlidd mhlidd changed the title Migrating all HttpServer Instrumentations to use Context and ContextScope Migrating all HttpServer Instrumentations to Extract full Context May 15, 2025
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.

Forgot to submit my comment 😅

@mhlidd mhlidd force-pushed the mhlidd/migrate_http_server_instrumentations branch from 2a6d442 to 4e94f29 Compare May 16, 2025 13:41
@mhlidd mhlidd marked this pull request as ready for review May 21, 2025 09:21
@mhlidd mhlidd requested review from a team as code owners May 21, 2025 09:21
@mhlidd mhlidd requested a review from PerfectSlayer May 21, 2025 09:21
Copy link
Contributor

github-actions bot commented May 21, 2025

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

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.

I will have a look more in depth by the end of the week

@mhlidd mhlidd requested a review from PerfectSlayer May 22, 2025 09:43
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.

Looking good! So far I only found a possible NPE to fix before merging 😅

@@ -111,14 +111,15 @@ public void onDownstreamFinish() throws Exception {
@Override
public void onPush() throws Exception {
final HttpResponse response = grab(responseInlet);
final AgentScope scope = scopes.poll();
final ContextScope scope = scopes.poll();
AgentSpan span = AgentSpan.fromContext(scope.context());
Copy link
Contributor

Choose a reason for hiding this comment

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

scope can be null and this will cause an NPE

@PerfectSlayer PerfectSlayer enabled auto-merge (squash) May 23, 2025 15:57
@PerfectSlayer PerfectSlayer merged commit 50ad603 into master May 24, 2025
519 of 523 checks passed
@PerfectSlayer PerfectSlayer deleted the mhlidd/migrate_http_server_instrumentations branch May 24, 2025 08:35
@github-actions github-actions bot added this to the 1.50.0 milestone May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants