Skip to content

Baggage E2E "working" #8699

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

Closed
wants to merge 18 commits into from
Closed

Baggage E2E "working" #8699

wants to merge 18 commits into from

Conversation

mhlidd
Copy link
Contributor

@mhlidd mhlidd commented Apr 15, 2025

What Does This Do

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@mhlidd mhlidd added the tag: do not merge Do not merge changes label Apr 15, 2025
@pr-commenter
Copy link

pr-commenter bot commented Apr 15, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/enable_baggage_end_to_end
git_commit_date 1746187873 1746205389
git_commit_sha 9f65194 882611b
release_version 1.49.0-SNAPSHOT~9f6519428f 1.49.0-SNAPSHOT~882611bdc7
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1746208118 1746208118
ci_job_id 922010313 922010313
ci_pipeline_id 63993739 63993739
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-aupi7m---project-304-concurrent-0-lswghaj4 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-aupi7m---project-304-concurrent-0-lswghaj4 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 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 67 metrics, 4 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.49.0-SNAPSHOT~882611bdc7, baseline=1.49.0-SNAPSHOT~9f6519428f

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.014 s) : 0, 1014113
Total [baseline] (10.48 s) : 0, 10480324
Agent [candidate] (1.015 s) : 0, 1014565
Total [candidate] (10.595 s) : 0, 10595071
section appsec
Agent [baseline] (1.155 s) : 0, 1154737
Total [baseline] (10.711 s) : 0, 10711015
Agent [candidate] (1.155 s) : 0, 1155312
Total [candidate] (10.685 s) : 0, 10685448
section iast
Agent [baseline] (1.136 s) : 0, 1136195
Total [baseline] (10.851 s) : 0, 10850994
Agent [candidate] (1.138 s) : 0, 1137696
Total [candidate] (10.877 s) : 0, 10876962
section profiling
Agent [baseline] (1.258 s) : 0, 1257872
Total [baseline] (10.829 s) : 0, 10828965
Agent [candidate] (1.259 s) : 0, 1259325
Total [candidate] (10.834 s) : 0, 10834111
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.014 s -
Agent appsec 1.155 s 140.624 ms (13.9%)
Agent iast 1.136 s 122.082 ms (12.0%)
Agent profiling 1.258 s 243.759 ms (24.0%)
Total tracing 10.48 s -
Total appsec 10.711 s 230.691 ms (2.2%)
Total iast 10.851 s 370.67 ms (3.5%)
Total profiling 10.829 s 348.641 ms (3.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.015 s -
Agent appsec 1.155 s 140.747 ms (13.9%)
Agent iast 1.138 s 123.131 ms (12.1%)
Agent profiling 1.259 s 244.76 ms (24.1%)
Total tracing 10.595 s -
Total appsec 10.685 s 90.377 ms (0.9%)
Total iast 10.877 s 281.892 ms (2.7%)
Total profiling 10.834 s 239.04 ms (2.3%)
gantt
    title petclinic - break down per module: candidate=1.49.0-SNAPSHOT~882611bdc7, baseline=1.49.0-SNAPSHOT~9f6519428f

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (675.747 ms) : 0, 675747
BytebuddyAgent [candidate] (676.498 ms) : 0, 676498
GlobalTracer [baseline] (241.766 ms) : 0, 241766
GlobalTracer [candidate] (241.607 ms) : 0, 241607
AppSec [baseline] (55.151 ms) : 0, 55151
AppSec [candidate] (55.081 ms) : 0, 55081
Debugger [baseline] (6.225 ms) : 0, 6225
Debugger [candidate] (6.198 ms) : 0, 6198
Remote Config [baseline] (716.729 µs) : 0, 717
Remote Config [candidate] (711.206 µs) : 0, 711
Telemetry [baseline] (10.929 ms) : 0, 10929
Telemetry [candidate] (10.842 ms) : 0, 10842
section appsec
BytebuddyAgent [baseline] (692.248 ms) : 0, 692248
BytebuddyAgent [candidate] (691.749 ms) : 0, 691749
GlobalTracer [baseline] (237.831 ms) : 0, 237831
GlobalTracer [candidate] (238.52 ms) : 0, 238520
IAST [baseline] (22.183 ms) : 0, 22183
IAST [candidate] (21.787 ms) : 0, 21787
AppSec [baseline] (175.246 ms) : 0, 175246
AppSec [candidate] (175.524 ms) : 0, 175524
Debugger [baseline] (5.884 ms) : 0, 5884
Debugger [candidate] (5.918 ms) : 0, 5918
Remote Config [baseline] (633.225 µs) : 0, 633
Remote Config [candidate] (643.565 µs) : 0, 644
Telemetry [baseline] (8.202 ms) : 0, 8202
Telemetry [candidate] (8.536 ms) : 0, 8536
section iast
BytebuddyAgent [baseline] (789.205 ms) : 0, 789205
BytebuddyAgent [candidate] (790.069 ms) : 0, 790069
GlobalTracer [baseline] (230.14 ms) : 0, 230140
GlobalTracer [candidate] (230.58 ms) : 0, 230580
IAST [baseline] (22.696 ms) : 0, 22696
IAST [candidate] (22.803 ms) : 0, 22803
AppSec [baseline] (56.355 ms) : 0, 56355
AppSec [candidate] (56.344 ms) : 0, 56344
Debugger [baseline] (5.879 ms) : 0, 5879
Debugger [candidate] (5.963 ms) : 0, 5963
Remote Config [baseline] (582.979 µs) : 0, 583
Remote Config [candidate] (609.313 µs) : 0, 609
Telemetry [baseline] (7.916 ms) : 0, 7916
Telemetry [candidate] (7.897 ms) : 0, 7897
section profiling
BytebuddyAgent [baseline] (662.316 ms) : 0, 662316
BytebuddyAgent [candidate] (663.354 ms) : 0, 663354
GlobalTracer [baseline] (378.832 ms) : 0, 378832
GlobalTracer [candidate] (380.486 ms) : 0, 380486
AppSec [baseline] (55.027 ms) : 0, 55027
AppSec [candidate] (54.149 ms) : 0, 54149
Debugger [baseline] (6.193 ms) : 0, 6193
Debugger [candidate] (6.178 ms) : 0, 6178
Remote Config [baseline] (695.339 µs) : 0, 695
Remote Config [candidate] (655.173 µs) : 0, 655
Telemetry [baseline] (8.192 ms) : 0, 8192
Telemetry [candidate] (8.156 ms) : 0, 8156
ProfilingAgent [baseline] (96.518 ms) : 0, 96518
ProfilingAgent [candidate] (96.16 ms) : 0, 96160
Profiling [baseline] (96.543 ms) : 0, 96543
Profiling [candidate] (96.184 ms) : 0, 96184
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.49.0-SNAPSHOT~882611bdc7, baseline=1.49.0-SNAPSHOT~9f6519428f

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.008 s) : 0, 1007983
Total [baseline] (8.661 s) : 0, 8661262
Agent [candidate] (1.013 s) : 0, 1013284
Total [candidate] (8.637 s) : 0, 8637384
section iast
Agent [baseline] (1.144 s) : 0, 1144073
Total [baseline] (9.257 s) : 0, 9256703
Agent [candidate] (1.137 s) : 0, 1136756
Total [candidate] (9.243 s) : 0, 9242823
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.144 s) : 0, 1144071
Total [baseline] (9.27 s) : 0, 9269713
Agent [candidate] (1.137 s) : 0, 1136681
Total [candidate] (9.177 s) : 0, 9177224
section iast_TELEMETRY_OFF
Agent [baseline] (1.132 s) : 0, 1132147
Total [baseline] (9.207 s) : 0, 9207126
Agent [candidate] (1.135 s) : 0, 1134867
Total [candidate] (9.236 s) : 0, 9235715
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.008 s -
Agent iast 1.144 s 136.09 ms (13.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.144 s 136.088 ms (13.5%)
Agent iast_TELEMETRY_OFF 1.132 s 124.163 ms (12.3%)
Total tracing 8.661 s -
Total iast 9.257 s 595.441 ms (6.9%)
Total iast_HARDCODED_SECRET_DISABLED 9.27 s 608.451 ms (7.0%)
Total iast_TELEMETRY_OFF 9.207 s 545.865 ms (6.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.013 s -
Agent iast 1.137 s 123.472 ms (12.2%)
Agent iast_HARDCODED_SECRET_DISABLED 1.137 s 123.398 ms (12.2%)
Agent iast_TELEMETRY_OFF 1.135 s 121.583 ms (12.0%)
Total tracing 8.637 s -
Total iast 9.243 s 605.439 ms (7.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.177 s 539.84 ms (6.3%)
Total iast_TELEMETRY_OFF 9.236 s 598.331 ms (6.9%)
gantt
    title insecure-bank - break down per module: candidate=1.49.0-SNAPSHOT~882611bdc7, baseline=1.49.0-SNAPSHOT~9f6519428f

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (672.012 ms) : 0, 672012
BytebuddyAgent [candidate] (674.705 ms) : 0, 674705
GlobalTracer [baseline] (239.611 ms) : 0, 239611
GlobalTracer [candidate] (241.125 ms) : 0, 241125
AppSec [baseline] (54.45 ms) : 0, 54450
AppSec [candidate] (54.775 ms) : 0, 54775
Debugger [baseline] (6.858 ms) : 0, 6858
Debugger [candidate] (6.91 ms) : 0, 6910
Remote Config [baseline] (714.888 µs) : 0, 715
Remote Config [candidate] (718.724 µs) : 0, 719
Telemetry [baseline] (10.736 ms) : 0, 10736
Telemetry [candidate] (11.43 ms) : 0, 11430
section iast
BytebuddyAgent [baseline] (796.151 ms) : 0, 796151
BytebuddyAgent [candidate] (789.275 ms) : 0, 789275
GlobalTracer [baseline] (230.104 ms) : 0, 230104
GlobalTracer [candidate] (230.248 ms) : 0, 230248
IAST [baseline] (22.714 ms) : 0, 22714
IAST [candidate] (22.891 ms) : 0, 22891
AppSec [baseline] (56.86 ms) : 0, 56860
AppSec [candidate] (56.524 ms) : 0, 56524
Debugger [baseline] (5.994 ms) : 0, 5994
Debugger [candidate] (5.942 ms) : 0, 5942
Remote Config [baseline] (607.393 µs) : 0, 607
Remote Config [candidate] (599.686 µs) : 0, 600
Telemetry [baseline] (8.11 ms) : 0, 8110
Telemetry [candidate] (7.941 ms) : 0, 7941
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (792.426 ms) : 0, 792426
BytebuddyAgent [candidate] (790.126 ms) : 0, 790126
GlobalTracer [baseline] (232.804 ms) : 0, 232804
GlobalTracer [candidate] (229.888 ms) : 0, 229888
IAST [baseline] (23.247 ms) : 0, 23247
IAST [candidate] (22.766 ms) : 0, 22766
AppSec [baseline] (57.176 ms) : 0, 57176
AppSec [candidate] (56.21 ms) : 0, 56210
Debugger [baseline] (6.068 ms) : 0, 6068
Debugger [candidate] (5.837 ms) : 0, 5837
Remote Config [baseline] (611.314 µs) : 0, 611
Remote Config [candidate] (582.197 µs) : 0, 582
Telemetry [baseline] (8.126 ms) : 0, 8126
Telemetry [candidate] (7.865 ms) : 0, 7865
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (785.889 ms) : 0, 785889
BytebuddyAgent [candidate] (788.175 ms) : 0, 788175
GlobalTracer [baseline] (229.849 ms) : 0, 229849
GlobalTracer [candidate] (230.352 ms) : 0, 230352
IAST [baseline] (22.283 ms) : 0, 22283
IAST [candidate] (22.297 ms) : 0, 22297
AppSec [baseline] (56.498 ms) : 0, 56498
AppSec [candidate] (56.287 ms) : 0, 56287
Debugger [baseline] (5.904 ms) : 0, 5904
Debugger [candidate] (5.941 ms) : 0, 5941
Remote Config [baseline] (602.937 µs) : 0, 603
Remote Config [candidate] (602.265 µs) : 0, 602
Telemetry [baseline] (7.768 ms) : 0, 7768
Telemetry [candidate] (7.822 ms) : 0, 7822
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-05-02T17:20:51 2025-05-02T17:28:37
git_branch master mhlidd/enable_baggage_end_to_end
git_commit_date 1746187873 1746205389
git_commit_sha 9f65194 882611b
release_version 1.49.0-SNAPSHOT~9f6519428f 1.49.0-SNAPSHOT~882611bdc7
start_time 2025-05-02T17:20:37 2025-05-02T17:28:23
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1746207316 1746207316
ci_job_id 922010314 922010314
ci_pipeline_id 63993739 63993739
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-aupi7m---project-304-concurrent-1-kr5by8w5 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-aupi7m---project-304-concurrent-1-kr5by8w5 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 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.49.0-SNAPSHOT~882611bdc7, baseline=1.49.0-SNAPSHOT~9f6519428f
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.366 ms) : 1346, 1385
.   : milestone, 1366,
appsec (1.751 ms) : 1728, 1775
.   : milestone, 1751,
appsec_no_iast (1.747 ms) : 1723, 1771
.   : milestone, 1747,
code_origins (1.67 ms) : 1643, 1697
.   : milestone, 1670,
iast (1.54 ms) : 1516, 1565
.   : milestone, 1540,
profiling (1.529 ms) : 1505, 1552
.   : milestone, 1529,
tracing (1.522 ms) : 1497, 1547
.   : milestone, 1522,
section candidate
no_agent (1.352 ms) : 1333, 1372
.   : milestone, 1352,
appsec (1.731 ms) : 1708, 1754
.   : milestone, 1731,
appsec_no_iast (1.739 ms) : 1715, 1763
.   : milestone, 1739,
code_origins (1.676 ms) : 1649, 1703
.   : milestone, 1676,
iast (1.522 ms) : 1499, 1545
.   : milestone, 1522,
profiling (1.528 ms) : 1505, 1551
.   : milestone, 1528,
tracing (1.501 ms) : 1476, 1525
.   : milestone, 1501,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.366 ms [1.346 ms, 1.385 ms] -
appsec 1.751 ms [1.728 ms, 1.775 ms] 385.837 µs (28.3%)
appsec_no_iast 1.747 ms [1.723 ms, 1.771 ms] 380.901 µs (27.9%)
code_origins 1.67 ms [1.643 ms, 1.697 ms] 304.745 µs (22.3%)
iast 1.54 ms [1.516 ms, 1.565 ms] 174.672 µs (12.8%)
profiling 1.529 ms [1.505 ms, 1.552 ms] 163.192 µs (11.9%)
tracing 1.522 ms [1.497 ms, 1.547 ms] 156.254 µs (11.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.352 ms [1.333 ms, 1.372 ms] -
appsec 1.731 ms [1.708 ms, 1.754 ms] 378.927 µs (28.0%)
appsec_no_iast 1.739 ms [1.715 ms, 1.763 ms] 386.843 µs (28.6%)
code_origins 1.676 ms [1.649 ms, 1.703 ms] 323.457 µs (23.9%)
iast 1.522 ms [1.499 ms, 1.545 ms] 169.553 µs (12.5%)
profiling 1.528 ms [1.505 ms, 1.551 ms] 175.69 µs (13.0%)
tracing 1.501 ms [1.476 ms, 1.525 ms] 148.415 µs (11.0%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~882611bdc7, baseline=1.49.0-SNAPSHOT~9f6519428f
    dateFormat X
    axisFormat %s
section baseline
no_agent (384.279 µs) : 364, 404
.   : milestone, 384,
iast (528.554 µs) : 506, 552
.   : milestone, 529,
iast_FULL (741.249 µs) : 718, 765
.   : milestone, 741,
iast_GLOBAL (575.266 µs) : 552, 598
.   : milestone, 575,
iast_HARDCODED_SECRET_DISABLED (524.471 µs) : 501, 547
.   : milestone, 524,
iast_INACTIVE (470.224 µs) : 448, 493
.   : milestone, 470,
iast_TELEMETRY_OFF (509.894 µs) : 487, 533
.   : milestone, 510,
tracing (473.293 µs) : 451, 496
.   : milestone, 473,
section candidate
no_agent (393.018 µs) : 373, 413
.   : milestone, 393,
iast (523.894 µs) : 500, 547
.   : milestone, 524,
iast_FULL (741.594 µs) : 718, 765
.   : milestone, 742,
iast_GLOBAL (572.231 µs) : 549, 596
.   : milestone, 572,
iast_HARDCODED_SECRET_DISABLED (528.892 µs) : 507, 551
.   : milestone, 529,
iast_INACTIVE (474.987 µs) : 452, 498
.   : milestone, 475,
iast_TELEMETRY_OFF (521.655 µs) : 499, 545
.   : milestone, 522,
tracing (464.393 µs) : 443, 486
.   : milestone, 464,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 384.279 µs [364.176 µs, 404.383 µs] -
iast 528.554 µs [505.507 µs, 551.601 µs] 144.275 µs (37.5%)
iast_FULL 741.249 µs [717.718 µs, 764.779 µs] 356.969 µs (92.9%)
iast_GLOBAL 575.266 µs [552.316 µs, 598.216 µs] 190.987 µs (49.7%)
iast_HARDCODED_SECRET_DISABLED 524.471 µs [501.452 µs, 547.49 µs] 140.191 µs (36.5%)
iast_INACTIVE 470.224 µs [447.773 µs, 492.674 µs] 85.944 µs (22.4%)
iast_TELEMETRY_OFF 509.894 µs [486.655 µs, 533.133 µs] 125.615 µs (32.7%)
tracing 473.293 µs [450.573 µs, 496.012 µs] 89.013 µs (23.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 393.018 µs [372.591 µs, 413.445 µs] -
iast 523.894 µs [500.465 µs, 547.323 µs] 130.876 µs (33.3%)
iast_FULL 741.594 µs [718.385 µs, 764.804 µs] 348.576 µs (88.7%)
iast_GLOBAL 572.231 µs [548.545 µs, 595.917 µs] 179.213 µs (45.6%)
iast_HARDCODED_SECRET_DISABLED 528.892 µs [506.546 µs, 551.238 µs] 135.874 µs (34.6%)
iast_INACTIVE 474.987 µs [451.985 µs, 497.99 µs] 81.97 µs (20.9%)
iast_TELEMETRY_OFF 521.655 µs [498.66 µs, 544.651 µs] 128.637 µs (32.7%)
tracing 464.393 µs [442.619 µs, 486.167 µs] 71.375 µs (18.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/enable_baggage_end_to_end
git_commit_date 1746187873 1746205389
git_commit_sha 9f65194 882611b
release_version 1.49.0-SNAPSHOT~9f6519428f 1.49.0-SNAPSHOT~882611bdc7
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1746207789 1746207789
ci_job_id 922010315 922010315
ci_pipeline_id 63993739 63993739
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-aupi7m---project-304-concurrent-2-ttcpfy0l 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-aupi7m---project-304-concurrent-2-ttcpfy0l 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 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.49.0-SNAPSHOT~882611bdc7, baseline=1.49.0-SNAPSHOT~9f6519428f
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.054 s) : 15054000, 15054000
.   : milestone, 15054000,
appsec (15.028 s) : 15028000, 15028000
.   : milestone, 15028000,
iast (19.136 s) : 19136000, 19136000
.   : milestone, 19136000,
iast_GLOBAL (18.196 s) : 18196000, 18196000
.   : milestone, 18196000,
profiling (15.007 s) : 15007000, 15007000
.   : milestone, 15007000,
tracing (15.067 s) : 15067000, 15067000
.   : milestone, 15067000,
section candidate
no_agent (14.972 s) : 14972000, 14972000
.   : milestone, 14972000,
appsec (15.044 s) : 15044000, 15044000
.   : milestone, 15044000,
iast (18.457 s) : 18457000, 18457000
.   : milestone, 18457000,
iast_GLOBAL (18.128 s) : 18128000, 18128000
.   : milestone, 18128000,
profiling (14.987 s) : 14987000, 14987000
.   : milestone, 14987000,
tracing (15.054 s) : 15054000, 15054000
.   : milestone, 15054000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.054 s [15.054 s, 15.054 s] -
appsec 15.028 s [15.028 s, 15.028 s] -26.0 ms (-0.2%)
iast 19.136 s [19.136 s, 19.136 s] 4.082 s (27.1%)
iast_GLOBAL 18.196 s [18.196 s, 18.196 s] 3.142 s (20.9%)
profiling 15.007 s [15.007 s, 15.007 s] -47.0 ms (-0.3%)
tracing 15.067 s [15.067 s, 15.067 s] 13.0 ms (0.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.972 s [14.972 s, 14.972 s] -
appsec 15.044 s [15.044 s, 15.044 s] 72.0 ms (0.5%)
iast 18.457 s [18.457 s, 18.457 s] 3.485 s (23.3%)
iast_GLOBAL 18.128 s [18.128 s, 18.128 s] 3.156 s (21.1%)
profiling 14.987 s [14.987 s, 14.987 s] 15.0 ms (0.1%)
tracing 15.054 s [15.054 s, 15.054 s] 82.0 ms (0.5%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.49.0-SNAPSHOT~882611bdc7, baseline=1.49.0-SNAPSHOT~9f6519428f
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.469 ms) : 1458, 1481
.   : milestone, 1469,
appsec (2.37 ms) : 2323, 2417
.   : milestone, 2370,
iast (2.156 ms) : 2097, 2216
.   : milestone, 2156,
iast_GLOBAL (2.198 ms) : 2138, 2258
.   : milestone, 2198,
profiling (2.003 ms) : 1956, 2050
.   : milestone, 2003,
tracing (1.99 ms) : 1944, 2036
.   : milestone, 1990,
section candidate
no_agent (1.471 ms) : 1460, 1483
.   : milestone, 1471,
appsec (2.37 ms) : 2323, 2417
.   : milestone, 2370,
iast (2.154 ms) : 2094, 2213
.   : milestone, 2154,
iast_GLOBAL (2.199 ms) : 2140, 2259
.   : milestone, 2199,
profiling (2.014 ms) : 1966, 2062
.   : milestone, 2014,
tracing (1.971 ms) : 1925, 2016
.   : milestone, 1971,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.469 ms [1.458 ms, 1.481 ms] -
appsec 2.37 ms [2.323 ms, 2.417 ms] 900.281 µs (61.3%)
iast 2.156 ms [2.097 ms, 2.216 ms] 686.98 µs (46.8%)
iast_GLOBAL 2.198 ms [2.138 ms, 2.258 ms] 728.511 µs (49.6%)
profiling 2.003 ms [1.956 ms, 2.05 ms] 533.644 µs (36.3%)
tracing 1.99 ms [1.944 ms, 2.036 ms] 520.331 µs (35.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.46 ms, 1.483 ms] -
appsec 2.37 ms [2.323 ms, 2.417 ms] 899.12 µs (61.1%)
iast 2.154 ms [2.094 ms, 2.213 ms] 682.476 µs (46.4%)
iast_GLOBAL 2.199 ms [2.14 ms, 2.259 ms] 728.298 µs (49.5%)
profiling 2.014 ms [1.966 ms, 2.062 ms] 542.858 µs (36.9%)
tracing 1.971 ms [1.925 ms, 2.016 ms] 499.746 µs (34.0%)

@pr-commenter
Copy link

pr-commenter bot commented Apr 16, 2025

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/enable_baggage_end_to_end
git_commit_date 1746034824 1746205389
git_commit_sha b445667 882611b
See matching parameters
Baseline Candidate
ci_job_date 1746206875 1746206875
ci_job_id 922010317 922010317
ci_pipeline_id 63993739 63993739
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

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

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaProduceBenchmark.benchProduce same

@pr-commenter
Copy link

pr-commenter bot commented Apr 16, 2025

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/enable_baggage_end_to_end
git_commit_date 1746034824 1746205389
git_commit_sha b445667 882611b
See matching parameters
Baseline Candidate
ci_job_date 1746206923 1746206923
ci_job_id 922010318 922010318
ci_pipeline_id 63993739 63993739
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

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

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaConsumerBenchmark.benchConsume unsure
[-15432.611op/s; -2219.348op/s] or [-4.777%; -0.687%]
scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume same

@mhlidd mhlidd force-pushed the mhlidd/enable_baggage_end_to_end branch from f3af363 to 7b258fc Compare May 1, 2025 19:19
@PerfectSlayer PerfectSlayer requested a review from Copilot May 5, 2025 07:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates context propagation throughout various instrumentation modules to utilize the new datadog.context API. In particular, the changes replace direct span propagation with Context.current().with(span) (or similar calls via Java8BytecodeBridge) and adjust extraction methods accordingly.

  • Updated Axis2, AWS SQS/SNS, AWS SDK, EventBridge, Armeria gRPC, Apache HTTPClient/HTTPAsyncClient, and Akka HTTP instrumentation to use the new context propagation style.
  • Removed obsolete AgentPropagation extraction methods and modified context injection calls across multiple modules to enhance consistency.

Reviewed Changes

Copilot reviewed 90 out of 90 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
dd-java-agent/instrumentation/axis-2/AxisTransportInstrumentation.java Switching injection to use Context.current().with(span) for header propagation.
dd-java-agent/instrumentation/aws-java-sqs-2.0/TracingIterator.java Updates context extraction and span activation in AWS SQS 2.0 instrumentation.
dd-java-agent/instrumentation/aws-java-sqs-2.0/SqsInterceptor.java Modified context propagation to include new Context API.
dd-java-agent/instrumentation/aws-java-sqs-1.0/TracingIterator.java Similar context extraction modifications for AWS SQS 1.0 instrumentation.
dd-java-agent/instrumentation/aws-java-sns-2.0/SnsInterceptor.java Updated injection to use Context.current().with(span) in SNS 2.0.
dd-java-agent/instrumentation/aws-java-sns-1.0/SnsInterceptor.java Implemented the new context based propagation for SNS 1.0.
dd-java-agent/instrumentation/aws-java-sdk-2.2/TracingExecutionInterceptor.java Changed propagation to use Java8BytecodeBridge.getCurrentContext().with(span) for AWS SDK 2.2.
dd-java-agent/instrumentation/aws-java-sdk-1.11.0/TracingRequestHandler.java Updated context propagation and error handling in AWS SDK 1.11.0 instrumentation.
dd-java-agent/instrumentation/aws-java-eventbridge-2.0/EventBridgeInterceptor.java Updated context injection using datadog.context API.
dd-java-agent/instrumentation/armeria-grpc/server/TracingServerInterceptor.java Switched to new context extraction and scope activation using Context.with(span).attach().
dd-java-agent/instrumentation/armeria-grpc/client/ClientCallImplInstrumentation.java Updated context injection in client instrumentation for Armeria gRPC.
dd-java-agent/instrumentation/apache-httpclient-5/* & apache-httpclient-4/* Updated HTTP client instrumentation to inject context using the new API calls.
dd-java-agent/instrumentation/apache-httpasyncclient-4/DelegatingRequestProducer.java Applied similar context propagation changes for async HTTP instrumentation.
dd-java-agent/instrumentation/akka-http/* Updated both Akka HTTP 10.6 and 10.0 instrumentation to use Context-based context propagation.
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpServerDecorator.java Replaced deprecated extraction with Propagators.defaultPropagator().extract() using Java8BytecodeBridge.getRootContext().
Comments suppressed due to low confidence (1)

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpServerDecorator.java:129

  • [nitpick] Consider verifying if using Java8BytecodeBridge.getRootContext() here is consistent with other modules that use Context.current(), to maintain a uniform context base across the codebase.
return Propagators.defaultPropagator().extract(Java8BytecodeBridge.getRootContext(), carrier, getter);

@@ -85,7 +93,7 @@ public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(
DECORATE.onCall(span, call);

final ServerCall.Listener<ReqT> result;
try (AgentScope scope = activateSpan(span)) {
try (AgentScope scope = (AgentScope) extractedContext.with(span).attach()) {
Copy link
Preview

Copilot AI May 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Casting the result of attach() to AgentScope may be risky if the context API changes. Consider using a dedicated method for obtaining an AgentScope directly to avoid potential ClassCastExceptions.

Suggested change
try (AgentScope scope = (AgentScope) extractedContext.with(span).attach()) {
try (AgentScope scope = getAgentScopeFromContext(extractedContext, span)) {

Copilot uses AI. Check for mistakes.

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.

General

Left few comments about root vs curent as base context for extraction. This will change the context tracking behavior.

HttpServerDecor should move away from spanContext to context. It will help getting thing smoother. (if not completely smooth, I might consider providing a method to retrieve a span context context but I would prefer waiting for decorator refactoring first)

Also, avoid initializing a context variable to null, set it to root instead. Context API should provide a certain level of null safety, so better leverage it!

Context API

It feels like the byte code helper might be a bit more concise for readability concern.

DSM

About DSM, it's pretty annoying that most of the injection points create a dumb DataStreamsContext dsmContext = DataStreamsContext.fromTags(CLIENT_PATHWAY_EDGE_TAGS);, then we have to create another context from, and most of the time, it will be dropped by the DSM propagator if the span has no DSM context or DSM is disabled.
It's really sub-optimal 😭

DECORATE.afterStart(span);
DECORATE.onRequest(span, request, request, extractedContext);
DECORATE.onRequest(span, request, request, extractedSpanContext);
Copy link
Contributor

Choose a reason for hiding this comment

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

It feels like HttpServerDecorator (DECORATE here) should migrate from AgentSpan.Context to Context.
This should greatly simplify the related instrumentation calls.

@@ -84,7 +85,7 @@ public AmazonWebServiceRequest beforeMarshalling(AmazonWebServiceRequest request
private Context newContext(AmazonWebServiceRequest request, String queueUrl) {
AgentSpan span = newSpan(request);
DataStreamsContext dsmContext = DataStreamsContext.fromTags(getTags(queueUrl));
return span.with(dsmContext);
return Java8BytecodeBridge.getCurrentContext().with(span).with(dsmContext);
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't SqsInterceptor it's own class and not injected?
Did you observe bytecode issue when using direct calls to the context API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I did? I don't remember tbh but I can locally revert and see what happens

// This span is finished when Request.recycle() is called by RequestInstrumentation.
DECORATE.afterStart(span);

req.setAttribute(DD_SPAN_ATTRIBUTE, span);
req.setAttribute(CorrelationIdentifier.getTraceIdKey(), GlobalTracer.get().getTraceId());
req.setAttribute(CorrelationIdentifier.getSpanIdKey(), GlobalTracer.get().getSpanId());
return scope;
return (AgentScope) extractedContext.with(span).attach();
Copy link
Contributor

Choose a reason for hiding this comment

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

Same about changing type to AutoClosable

@@ -294,7 +295,9 @@ public void setProduceCheckpoint(

DataStreamsContext dsmContext = fromTags(sortedTags);
this.propagator.inject(
span.with(dsmContext), carrier, DataStreamsContextCarrierAdapter.INSTANCE);
Context.current().with(span).with(dsmContext),
Copy link
Contributor

Choose a reason for hiding this comment

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

You should update the activeSpan() call above to get current context instead,
Then check for active span,
Then inject as is with DSM context.

@@ -486,7 +487,8 @@ public <C> void inject(final SpanContext spanContext, final Format<C> format, fi
if (carrier instanceof TextMap) {
final AgentSpanContext context = converter.toContext(spanContext);
AgentSpan span = fromSpanContext(context);
defaultPropagator().inject(span, (TextMap) carrier, TextMapSetter.INSTANCE);
defaultPropagator()
.inject(Context.current().with(span), (TextMap) carrier, TextMapSetter.INSTANCE);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think with should inject current here. Better stick with the provided arguments only.

@@ -2369,11 +2369,13 @@ public boolean isTracePropagationExtractFirst() {
}

public boolean isBaggageExtract() {
return tracePropagationStylesToExtract.contains(TracePropagationStyle.BAGGAGE);
return tracePropagationStylesToExtract.contains(TracePropagationStyle.BAGGAGE)
Copy link
Contributor

Choose a reason for hiding this comment

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

You may switch the test (the equality before). It will get evaluated first and is cheaper than the contains test.

}

public boolean isBaggageInject() {
return tracePropagationStylesToInject.contains(TracePropagationStyle.BAGGAGE);
return tracePropagationStylesToInject.contains(TracePropagationStyle.BAGGAGE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same perf related comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: do not merge Do not merge changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants