Skip to content

Migrating all HttpClient Instrumentations to Inject Full Context #8826

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 15 commits into from
May 21, 2025

Conversation

mhlidd
Copy link
Contributor

@mhlidd mhlidd commented May 14, 2025

What Does This Do

Migrates all Http Client Instrumentations to inject full context through the use of Context.current() rather than only injecting span contexts. This also leads to support of W3C Baggage injection for all Http Client instrumentations.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@pr-commenter
Copy link

pr-commenter bot commented May 14, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/migrate_http_client_instrumentations
git_commit_date 1747808555 1747814017
git_commit_sha 0f42e0a 71fe387
release_version 1.50.0-SNAPSHOT~0f42e0a463 1.50.0-SNAPSHOT~71fe387010
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1747816509 1747816509
ci_job_id 947297925 947297925
ci_pipeline_id 65688916 65688916
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-uajn3adf-project-304-concurrent-0-ft7xk5g2 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-uajn3adf-project-304-concurrent-0-ft7xk5g2 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 0 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 15 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~71fe387010, baseline=1.50.0-SNAPSHOT~0f42e0a463

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.027 s) : 0, 1026897
Total [baseline] (10.472 s) : 0, 10471527
Agent [candidate] (1.023 s) : 0, 1023446
Total [candidate] (10.532 s) : 0, 10531861
section appsec
Agent [baseline] (1.163 s) : 0, 1162728
Total [baseline] (10.72 s) : 0, 10720038
Agent [candidate] (1.163 s) : 0, 1163473
Total [candidate] (10.72 s) : 0, 10719996
section iast
Agent [baseline] (1.151 s) : 0, 1151125
Total [baseline] (10.913 s) : 0, 10912754
Agent [candidate] (1.169 s) : 0, 1168931
Total [candidate] (10.94 s) : 0, 10940451
section profiling
Agent [baseline] (1.276 s) : 0, 1275664
Total [baseline] (10.85 s) : 0, 10849754
Agent [candidate] (1.277 s) : 0, 1277057
Total [candidate] (10.861 s) : 0, 10860952
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.027 s -
Agent appsec 1.163 s 135.831 ms (13.2%)
Agent iast 1.151 s 124.228 ms (12.1%)
Agent profiling 1.276 s 248.766 ms (24.2%)
Total tracing 10.472 s -
Total appsec 10.72 s 248.511 ms (2.4%)
Total iast 10.913 s 441.227 ms (4.2%)
Total profiling 10.85 s 378.227 ms (3.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.023 s -
Agent appsec 1.163 s 140.027 ms (13.7%)
Agent iast 1.169 s 145.485 ms (14.2%)
Agent profiling 1.277 s 253.611 ms (24.8%)
Total tracing 10.532 s -
Total appsec 10.72 s 188.135 ms (1.8%)
Total iast 10.94 s 408.591 ms (3.9%)
Total profiling 10.861 s 329.091 ms (3.1%)
gantt
    title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~71fe387010, baseline=1.50.0-SNAPSHOT~0f42e0a463

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.696 ms) : 0, 687696
BytebuddyAgent [candidate] (683.864 ms) : 0, 683864
GlobalTracer [baseline] (241.937 ms) : 0, 241937
GlobalTracer [candidate] (240.982 ms) : 0, 240982
AppSec [baseline] (54.753 ms) : 0, 54753
AppSec [candidate] (54.578 ms) : 0, 54578
Debugger [baseline] (8.355 ms) : 0, 8355
Debugger [candidate] (9.929 ms) : 0, 9929
Remote Config [baseline] (707.597 µs) : 0, 708
Remote Config [candidate] (701.803 µs) : 0, 702
Telemetry [baseline] (9.787 ms) : 0, 9787
Telemetry [candidate] (9.8 ms) : 0, 9800
section appsec
BytebuddyAgent [baseline] (701.564 ms) : 0, 701564
BytebuddyAgent [candidate] (702.228 ms) : 0, 702228
GlobalTracer [baseline] (237.246 ms) : 0, 237246
GlobalTracer [candidate] (236.901 ms) : 0, 236901
IAST [baseline] (21.698 ms) : 0, 21698
IAST [candidate] (21.593 ms) : 0, 21593
AppSec [baseline] (175.115 ms) : 0, 175115
AppSec [candidate] (175.212 ms) : 0, 175212
Debugger [baseline] (5.975 ms) : 0, 5975
Debugger [candidate] (5.98 ms) : 0, 5980
Remote Config [baseline] (636.286 µs) : 0, 636
Remote Config [candidate] (646.516 µs) : 0, 647
Telemetry [baseline] (7.81 ms) : 0, 7810
Telemetry [candidate] (8.172 ms) : 0, 8172
section iast
BytebuddyAgent [baseline] (803.256 ms) : 0, 803256
BytebuddyAgent [candidate] (816.833 ms) : 0, 816833
GlobalTracer [baseline] (230.96 ms) : 0, 230960
GlobalTracer [candidate] (233.689 ms) : 0, 233689
IAST [baseline] (29.436 ms) : 0, 29436
IAST [candidate] (28.103 ms) : 0, 28103
AppSec [baseline] (49.502 ms) : 0, 49502
AppSec [candidate] (51.838 ms) : 0, 51838
Debugger [baseline] (5.915 ms) : 0, 5915
Debugger [candidate] (5.973 ms) : 0, 5973
Remote Config [baseline] (597.327 µs) : 0, 597
Remote Config [candidate] (614.943 µs) : 0, 615
Telemetry [baseline] (7.937 ms) : 0, 7937
Telemetry [candidate] (8.059 ms) : 0, 8059
section profiling
BytebuddyAgent [baseline] (671.467 ms) : 0, 671467
BytebuddyAgent [candidate] (672.824 ms) : 0, 672824
GlobalTracer [baseline] (374.007 ms) : 0, 374007
GlobalTracer [candidate] (374.316 ms) : 0, 374316
AppSec [baseline] (61.857 ms) : 0, 61857
AppSec [candidate] (61.655 ms) : 0, 61655
Debugger [baseline] (6.253 ms) : 0, 6253
Debugger [candidate] (6.246 ms) : 0, 6246
Remote Config [baseline] (674.121 µs) : 0, 674
Remote Config [candidate] (648.995 µs) : 0, 649
Telemetry [baseline] (8.318 ms) : 0, 8318
Telemetry [candidate] (8.117 ms) : 0, 8117
ProfilingAgent [baseline] (102.416 ms) : 0, 102416
ProfilingAgent [candidate] (102.454 ms) : 0, 102454
Profiling [baseline] (102.44 ms) : 0, 102440
Profiling [candidate] (102.479 ms) : 0, 102479
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~71fe387010, baseline=1.50.0-SNAPSHOT~0f42e0a463

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.024 s) : 0, 1024183
Total [baseline] (8.666 s) : 0, 8665895
Agent [candidate] (1.029 s) : 0, 1029394
Total [candidate] (8.673 s) : 0, 8672975
section iast
Agent [baseline] (1.158 s) : 0, 1157735
Total [baseline] (9.262 s) : 0, 9261728
Agent [candidate] (1.15 s) : 0, 1149570
Total [candidate] (9.221 s) : 0, 9220839
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.152 s) : 0, 1152215
Total [baseline] (9.203 s) : 0, 9203120
Agent [candidate] (1.152 s) : 0, 1152368
Total [candidate] (9.23 s) : 0, 9230197
section iast_TELEMETRY_OFF
Agent [baseline] (1.153 s) : 0, 1152797
Total [baseline] (9.257 s) : 0, 9256851
Agent [candidate] (1.154 s) : 0, 1154167
Total [candidate] (9.286 s) : 0, 9285694
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.024 s -
Agent iast 1.158 s 133.552 ms (13.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.152 s 128.032 ms (12.5%)
Agent iast_TELEMETRY_OFF 1.153 s 128.614 ms (12.6%)
Total tracing 8.666 s -
Total iast 9.262 s 595.832 ms (6.9%)
Total iast_HARDCODED_SECRET_DISABLED 9.203 s 537.225 ms (6.2%)
Total iast_TELEMETRY_OFF 9.257 s 590.956 ms (6.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.029 s -
Agent iast 1.15 s 120.176 ms (11.7%)
Agent iast_HARDCODED_SECRET_DISABLED 1.152 s 122.974 ms (11.9%)
Agent iast_TELEMETRY_OFF 1.154 s 124.773 ms (12.1%)
Total tracing 8.673 s -
Total iast 9.221 s 547.863 ms (6.3%)
Total iast_HARDCODED_SECRET_DISABLED 9.23 s 557.222 ms (6.4%)
Total iast_TELEMETRY_OFF 9.286 s 612.718 ms (7.1%)
gantt
    title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~71fe387010, baseline=1.50.0-SNAPSHOT~0f42e0a463

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (684.439 ms) : 0, 684439
BytebuddyAgent [candidate] (687.796 ms) : 0, 687796
GlobalTracer [baseline] (240.315 ms) : 0, 240315
GlobalTracer [candidate] (241.969 ms) : 0, 241969
AppSec [baseline] (55.295 ms) : 0, 55295
AppSec [candidate] (55.578 ms) : 0, 55578
Debugger [baseline] (9.033 ms) : 0, 9033
Debugger [candidate] (9.879 ms) : 0, 9879
Remote Config [baseline] (712.972 µs) : 0, 713
Remote Config [candidate] (705.722 µs) : 0, 706
Telemetry [baseline] (10.795 ms) : 0, 10795
Telemetry [candidate] (9.769 ms) : 0, 9769
section iast
BytebuddyAgent [baseline] (808.394 ms) : 0, 808394
BytebuddyAgent [candidate] (802.311 ms) : 0, 802311
GlobalTracer [baseline] (232.14 ms) : 0, 232140
GlobalTracer [candidate] (230.879 ms) : 0, 230879
IAST [baseline] (29.428 ms) : 0, 29428
IAST [candidate] (29.954 ms) : 0, 29954
AppSec [baseline] (49.575 ms) : 0, 49575
AppSec [candidate] (48.531 ms) : 0, 48531
Debugger [baseline] (5.982 ms) : 0, 5982
Debugger [candidate] (5.902 ms) : 0, 5902
Remote Config [baseline] (596.183 µs) : 0, 596
Remote Config [candidate] (609.116 µs) : 0, 609
Telemetry [baseline] (7.948 ms) : 0, 7948
Telemetry [candidate] (7.88 ms) : 0, 7880
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (803.33 ms) : 0, 803330
BytebuddyAgent [candidate] (804.284 ms) : 0, 804284
GlobalTracer [baseline] (231.828 ms) : 0, 231828
GlobalTracer [candidate] (231.233 ms) : 0, 231233
IAST [baseline] (29.313 ms) : 0, 29313
IAST [candidate] (29.203 ms) : 0, 29203
AppSec [baseline] (49.625 ms) : 0, 49625
AppSec [candidate] (49.467 ms) : 0, 49467
Debugger [baseline] (5.976 ms) : 0, 5976
Debugger [candidate] (5.985 ms) : 0, 5985
Remote Config [baseline] (602.152 µs) : 0, 602
Remote Config [candidate] (610.293 µs) : 0, 610
Telemetry [baseline] (7.941 ms) : 0, 7941
Telemetry [candidate] (7.979 ms) : 0, 7979
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (805.441 ms) : 0, 805441
BytebuddyAgent [candidate] (804.074 ms) : 0, 804074
GlobalTracer [baseline] (231.193 ms) : 0, 231193
GlobalTracer [candidate] (233.035 ms) : 0, 233035
IAST [baseline] (24.137 ms) : 0, 24137
IAST [candidate] (22.68 ms) : 0, 22680
AppSec [baseline] (54.119 ms) : 0, 54119
AppSec [candidate] (56.237 ms) : 0, 56237
Debugger [baseline] (5.908 ms) : 0, 5908
Debugger [candidate] (5.988 ms) : 0, 5988
Remote Config [baseline] (595.08 µs) : 0, 595
Remote Config [candidate] (610.249 µs) : 0, 610
Telemetry [baseline] (7.748 ms) : 0, 7748
Telemetry [candidate] (7.855 ms) : 0, 7855
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-05-21T08:05:42 2025-05-21T08:13:27
git_branch master mhlidd/migrate_http_client_instrumentations
git_commit_date 1747808555 1747814017
git_commit_sha 0f42e0a 71fe387
release_version 1.50.0-SNAPSHOT~0f42e0a463 1.50.0-SNAPSHOT~71fe387010
start_time 2025-05-21T08:05:28 2025-05-21T08:13:13
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1747815607 1747815607
ci_job_id 947297926 947297926
ci_pipeline_id 65688916 65688916
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-gw8ctn4h-project-304-concurrent-0-6u9h2729 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-gw8ctn4h-project-304-concurrent-0-6u9h2729 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 insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~71fe387010, baseline=1.50.0-SNAPSHOT~0f42e0a463
    dateFormat X
    axisFormat %s
section baseline
no_agent (383.533 µs) : 364, 404
.   : milestone, 384,
iast (524.49 µs) : 502, 547
.   : milestone, 524,
iast_FULL (733.36 µs) : 712, 755
.   : milestone, 733,
iast_GLOBAL (563.931 µs) : 542, 586
.   : milestone, 564,
iast_HARDCODED_SECRET_DISABLED (522.034 µs) : 499, 545
.   : milestone, 522,
iast_INACTIVE (468.628 µs) : 446, 491
.   : milestone, 469,
iast_TELEMETRY_OFF (519.148 µs) : 496, 542
.   : milestone, 519,
tracing (459.392 µs) : 438, 481
.   : milestone, 459,
section candidate
no_agent (384.68 µs) : 365, 404
.   : milestone, 385,
iast (534.194 µs) : 510, 558
.   : milestone, 534,
iast_FULL (733.492 µs) : 712, 755
.   : milestone, 733,
iast_GLOBAL (567.708 µs) : 546, 589
.   : milestone, 568,
iast_HARDCODED_SECRET_DISABLED (515.033 µs) : 492, 538
.   : milestone, 515,
iast_INACTIVE (466.371 µs) : 444, 489
.   : milestone, 466,
iast_TELEMETRY_OFF (519.417 µs) : 496, 543
.   : milestone, 519,
tracing (457.319 µs) : 435, 479
.   : milestone, 457,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 383.533 µs [363.52 µs, 403.546 µs] -
iast 524.49 µs [502.466 µs, 546.513 µs] 140.957 µs (36.8%)
iast_FULL 733.36 µs [711.544 µs, 755.176 µs] 349.827 µs (91.2%)
iast_GLOBAL 563.931 µs [541.94 µs, 585.922 µs] 180.398 µs (47.0%)
iast_HARDCODED_SECRET_DISABLED 522.034 µs [498.717 µs, 545.351 µs] 138.501 µs (36.1%)
iast_INACTIVE 468.628 µs [446.435 µs, 490.821 µs] 85.095 µs (22.2%)
iast_TELEMETRY_OFF 519.148 µs [495.825 µs, 542.471 µs] 135.615 µs (35.4%)
tracing 459.392 µs [437.522 µs, 481.262 µs] 75.859 µs (19.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 384.68 µs [365.018 µs, 404.342 µs] -
iast 534.194 µs [510.212 µs, 558.177 µs] 149.515 µs (38.9%)
iast_FULL 733.492 µs [711.757 µs, 755.228 µs] 348.813 µs (90.7%)
iast_GLOBAL 567.708 µs [545.942 µs, 589.474 µs] 183.029 µs (47.6%)
iast_HARDCODED_SECRET_DISABLED 515.033 µs [492.242 µs, 537.824 µs] 130.353 µs (33.9%)
iast_INACTIVE 466.371 µs [444.095 µs, 488.647 µs] 81.691 µs (21.2%)
iast_TELEMETRY_OFF 519.417 µs [495.978 µs, 542.857 µs] 134.738 µs (35.0%)
tracing 457.319 µs [435.145 µs, 479.493 µs] 72.639 µs (18.9%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~71fe387010, baseline=1.50.0-SNAPSHOT~0f42e0a463
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.383 ms) : 1363, 1403
.   : milestone, 1383,
appsec (1.746 ms) : 1723, 1770
.   : milestone, 1746,
appsec_no_iast (1.728 ms) : 1704, 1751
.   : milestone, 1728,
code_origins (1.678 ms) : 1651, 1705
.   : milestone, 1678,
iast (1.516 ms) : 1491, 1540
.   : milestone, 1516,
profiling (1.524 ms) : 1499, 1548
.   : milestone, 1524,
tracing (1.492 ms) : 1469, 1516
.   : milestone, 1492,
section candidate
no_agent (1.358 ms) : 1338, 1377
.   : milestone, 1358,
appsec (1.737 ms) : 1714, 1760
.   : milestone, 1737,
appsec_no_iast (1.724 ms) : 1700, 1748
.   : milestone, 1724,
code_origins (1.66 ms) : 1632, 1687
.   : milestone, 1660,
iast (1.523 ms) : 1497, 1549
.   : milestone, 1523,
profiling (1.524 ms) : 1499, 1550
.   : milestone, 1524,
tracing (1.499 ms) : 1474, 1524
.   : milestone, 1499,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.383 ms [1.363 ms, 1.403 ms] -
appsec 1.746 ms [1.723 ms, 1.77 ms] 363.699 µs (26.3%)
appsec_no_iast 1.728 ms [1.704 ms, 1.751 ms] 344.884 µs (24.9%)
code_origins 1.678 ms [1.651 ms, 1.705 ms] 295.574 µs (21.4%)
iast 1.516 ms [1.491 ms, 1.54 ms] 132.853 µs (9.6%)
profiling 1.524 ms [1.499 ms, 1.548 ms] 140.889 µs (10.2%)
tracing 1.492 ms [1.469 ms, 1.516 ms] 109.693 µs (7.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.358 ms [1.338 ms, 1.377 ms] -
appsec 1.737 ms [1.714 ms, 1.76 ms] 379.531 µs (28.0%)
appsec_no_iast 1.724 ms [1.7 ms, 1.748 ms] 366.75 µs (27.0%)
code_origins 1.66 ms [1.632 ms, 1.687 ms] 302.027 µs (22.2%)
iast 1.523 ms [1.497 ms, 1.549 ms] 165.729 µs (12.2%)
profiling 1.524 ms [1.499 ms, 1.55 ms] 166.645 µs (12.3%)
tracing 1.499 ms [1.474 ms, 1.524 ms] 141.582 µs (10.4%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/migrate_http_client_instrumentations
git_commit_date 1747808555 1747814017
git_commit_sha 0f42e0a 71fe387
release_version 1.50.0-SNAPSHOT~0f42e0a463 1.50.0-SNAPSHOT~71fe387010
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1747816124 1747816124
ci_job_id 947297927 947297927
ci_pipeline_id 65688916 65688916
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-ytbukrc9-project-304-concurrent-0-p3a8b4kp 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-ytbukrc9-project-304-concurrent-0-p3a8b4kp 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 biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~71fe387010, baseline=1.50.0-SNAPSHOT~0f42e0a463
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.268 s) : 15268000, 15268000
.   : milestone, 15268000,
appsec (15.088 s) : 15088000, 15088000
.   : milestone, 15088000,
iast (18.837 s) : 18837000, 18837000
.   : milestone, 18837000,
iast_GLOBAL (18.249 s) : 18249000, 18249000
.   : milestone, 18249000,
profiling (15.018 s) : 15018000, 15018000
.   : milestone, 15018000,
tracing (14.885 s) : 14885000, 14885000
.   : milestone, 14885000,
section candidate
no_agent (15.426 s) : 15426000, 15426000
.   : milestone, 15426000,
appsec (15.075 s) : 15075000, 15075000
.   : milestone, 15075000,
iast (18.969 s) : 18969000, 18969000
.   : milestone, 18969000,
iast_GLOBAL (18.088 s) : 18088000, 18088000
.   : milestone, 18088000,
profiling (15.824 s) : 15824000, 15824000
.   : milestone, 15824000,
tracing (15.182 s) : 15182000, 15182000
.   : milestone, 15182000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.268 s [15.268 s, 15.268 s] -
appsec 15.088 s [15.088 s, 15.088 s] -180.0 ms (-1.2%)
iast 18.837 s [18.837 s, 18.837 s] 3.569 s (23.4%)
iast_GLOBAL 18.249 s [18.249 s, 18.249 s] 2.981 s (19.5%)
profiling 15.018 s [15.018 s, 15.018 s] -250.0 ms (-1.6%)
tracing 14.885 s [14.885 s, 14.885 s] -383.0 ms (-2.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.426 s [15.426 s, 15.426 s] -
appsec 15.075 s [15.075 s, 15.075 s] -351.0 ms (-2.3%)
iast 18.969 s [18.969 s, 18.969 s] 3.543 s (23.0%)
iast_GLOBAL 18.088 s [18.088 s, 18.088 s] 2.662 s (17.3%)
profiling 15.824 s [15.824 s, 15.824 s] 398.0 ms (2.6%)
tracing 15.182 s [15.182 s, 15.182 s] -244.0 ms (-1.6%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~71fe387010, baseline=1.50.0-SNAPSHOT~0f42e0a463
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.471 ms) : 1460, 1483
.   : milestone, 1471,
appsec (2.39 ms) : 2342, 2438
.   : milestone, 2390,
iast (2.161 ms) : 2100, 2221
.   : milestone, 2161,
iast_GLOBAL (2.213 ms) : 2152, 2274
.   : milestone, 2213,
profiling (2.015 ms) : 1966, 2063
.   : milestone, 2015,
tracing (2.0 ms) : 1953, 2047
.   : milestone, 2000,
section candidate
no_agent (1.476 ms) : 1465, 1488
.   : milestone, 1476,
appsec (2.391 ms) : 2343, 2438
.   : milestone, 2391,
iast (2.181 ms) : 2120, 2242
.   : milestone, 2181,
iast_GLOBAL (2.215 ms) : 2154, 2277
.   : milestone, 2215,
profiling (2.485 ms) : 2248, 2722
.   : milestone, 2485,
tracing (1.995 ms) : 1948, 2042
.   : milestone, 1995,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.46 ms, 1.483 ms] -
appsec 2.39 ms [2.342 ms, 2.438 ms] 918.394 µs (62.4%)
iast 2.161 ms [2.1 ms, 2.221 ms] 689.528 µs (46.9%)
iast_GLOBAL 2.213 ms [2.152 ms, 2.274 ms] 741.653 µs (50.4%)
profiling 2.015 ms [1.966 ms, 2.063 ms] 543.404 µs (36.9%)
tracing 2.0 ms [1.953 ms, 2.047 ms] 528.558 µs (35.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.476 ms [1.465 ms, 1.488 ms] -
appsec 2.391 ms [2.343 ms, 2.438 ms] 914.35 µs (61.9%)
iast 2.181 ms [2.12 ms, 2.242 ms] 705.028 µs (47.8%)
iast_GLOBAL 2.215 ms [2.154 ms, 2.277 ms] 739.114 µs (50.1%)
profiling 2.485 ms [2.248 ms, 2.722 ms] 1.009 ms (68.4%)
tracing 1.995 ms [1.948 ms, 2.042 ms] 519.083 µs (35.2%)

@mhlidd mhlidd changed the title adding support for Akka Migrating all HttpClient Instrumentations to utilize Context.current() during injection May 15, 2025
@mhlidd mhlidd marked this pull request as ready for review May 15, 2025 04:17
@mhlidd mhlidd requested a review from a team as a code owner May 15, 2025 04:17
@PerfectSlayer PerfectSlayer self-requested a review May 15, 2025 05:56
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.

Thanks for the refactoring!

@PerfectSlayer
Copy link
Contributor

I would recommend using a "meaningful" title for the PR if it is not hidden from the release notes.
Like : "Support full context injection for HTTP clients" and add some context in the PR description, especially about "now the W3C baggage will be injected by HTTP clients".

@mhlidd mhlidd changed the title Migrating all HttpClient Instrumentations to utilize Context.current() during injection Migrating all HttpClient Instrumentations to Inject Full Context May 15, 2025
@mhlidd mhlidd requested a review from a team as a code owner May 19, 2025 08:04
@mhlidd mhlidd merged commit e8eddc2 into master May 21, 2025
788 of 790 checks passed
@mhlidd mhlidd deleted the mhlidd/migrate_http_client_instrumentations branch May 21, 2025 09:21
@github-actions github-actions bot added this to the 1.50.0 milestone May 21, 2025
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jun 20, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
| [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.49.0` -> `1.50.0` |

---

### Release Notes

<details>
<summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary>

###
[`v1.50.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.50.0):
1.50.0

### Deprecation Notice

> \[!NOTE]
> `DD_RUNTIME_ID_ENABLED` has been deprecated and will be removed in
future releases. Please use `DD_RUNTIME_METRICS_RUNTIME_ID_ENABLED`
instead.

### Components

#### Application Security Management (WAF)

- 🐛 Add String length truncation limit to ObjectIntrospector and
update truncation metrics
([#&#8203;8825](DataDog/dd-trace-java#8825) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Adapt standalone ASM to support API Security
([#&#8203;8804](DataDog/dd-trace-java#8804) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Add appsec.waf.input\_truncated metric
([#&#8203;8791](DataDog/dd-trace-java#8791) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Extended appsec request body collection
([#&#8203;8748](DataDog/dd-trace-java#8748) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Extended appsec request/response headers collection
([#&#8203;8724](DataDog/dd-trace-java#8724) -
[@&#8203;jandro996](https://github.com/jandro996))

#### Build & Tooling

- ✨ Add artifacts to public s3 bucket
([#&#8203;8947](DataDog/dd-trace-java#8947) -
[@&#8203;randomanderson](https://github.com/randomanderson))

#### Continuous Integration Visibility

- ✨ Improve PR information building
([#&#8203;8908](DataDog/dd-trace-java#8908) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Truncate span stack traces when Test Optimization is
enabled
([#&#8203;8903](DataDog/dd-trace-java#8903) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Ensure auto-detected service name is the same for every process
in the same build
([#&#8203;8902](DataDog/dd-trace-java#8902) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Use tag as fallback in api requests if no branch is available
([#&#8203;8876](DataDog/dd-trace-java#8876) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Add support for JUnit 5.13-RC1
([#&#8203;8865](DataDog/dd-trace-java#8865),
[#&#8203;8871](DataDog/dd-trace-java#8871) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Implement attempt to fix v3 and v4 and bump capability
version
([#&#8203;8824](DataDog/dd-trace-java#8824) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- 🧹 Align retry logic for all test framework instrumentations
([#&#8203;8803](DataDog/dd-trace-java#8803) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- 🐛 Always build ci workspace without trailing separator
([#&#8203;8788](DataDog/dd-trace-java#8788) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Add commit discrepancies telemetry when building repository
git information
([#&#8203;8763](DataDog/dd-trace-java#8763) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))

#### Data Streams Monitoring

- 💡 Surface process tags in dsm payloads and use them for base hash
calculation
([#&#8203;8836](DataDog/dd-trace-java#8836) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Dynamic Instrumentation

- ✨ Optimized allocations for collection filter functions
([#&#8203;8896](DataDog/dd-trace-java#8896) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Fix SymDB upload size check
([#&#8203;8887](DataDog/dd-trace-java#8887) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Add support for Set in filter function
([#&#8203;8873](DataDog/dd-trace-java#8873) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Add support for isDefined in log template
([#&#8203;8859](DataDog/dd-trace-java#8859) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Fix Max captured frames for Exception Replay
([#&#8203;8856](DataDog/dd-trace-java#8856) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Remove static inherited fields collection
([#&#8203;8832](DataDog/dd-trace-java#8832) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 💡 Add process tags to dynamic instrumentation intake payload
([#&#8203;8779](DataDog/dd-trace-java#8779) -
[@&#8203;amarziali](https://github.com/amarziali))

#### GraalVM native-image

- ✨ Add support for GraalVM Native GC metrics
([#&#8203;8913](DataDog/dd-trace-java#8913) -
[@&#8203;ygree](https://github.com/ygree))
- ✨ Add JMXFetch support for GraalVM Native
([#&#8203;8569](DataDog/dd-trace-java#8569) -
[@&#8203;ygree](https://github.com/ygree))

#### JMX fetch

- ✨ Add support for GraalVM Native GC metrics
([#&#8203;8913](DataDog/dd-trace-java#8913) -
[@&#8203;ygree](https://github.com/ygree))

#### Library Injection

- ✨ Deny oracle db jvm based tools
([#&#8203;8909](DataDog/dd-trace-java#8909) -
[@&#8203;bric3](https://github.com/bric3))

#### OpenTracing

- 🐛 Fix OT packaging for exception replay
([#&#8203;8912](DataDog/dd-trace-java#8912) -
[@&#8203;jpbempel](https://github.com/jpbempel))

#### Profiling

- ✨ Bump ddprof to 1.27.0
([#&#8203;8893](DataDog/dd-trace-java#8893) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- Properly handle the adaptive sampling interval overflow by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#213
- Fix [#&#8203;200](DataDog/dd-trace-java#200)
Crash related to aligned\_alloc and free in context by
[@&#8203;yanglong1010](https://github.com/yanglong1010) in
DataDog/java-profiler#208
- Explicitly initialize empty context page by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#210
- Re-connect crash recursion protection with VM stackwalker by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#214
- ✨ Enable ZSTD compression for profiling
([#&#8203;8862](DataDog/dd-trace-java#8862) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- ✨ Extend JPS re-implementation to J9 family
([#&#8203;8813](DataDog/dd-trace-java#8813) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- 💡 Collect process tags for profiling upload requests
([#&#8203;8780](DataDog/dd-trace-java#8780) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Telemetry

- 💡 Surface process tags on telemetry payloads
([#&#8203;8837](DataDog/dd-trace-java#8837) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Trace context propagation

- ✨ Migrating all HttpClient Instrumentations to Inject Full
Context
([#&#8203;8826](DataDog/dd-trace-java#8826) -
[@&#8203;mhlidd](https://github.com/mhlidd))
- ✨ Migrating all HttpServer Instrumentations to Extract full
Context
([#&#8203;8820](DataDog/dd-trace-java#8820) -
[@&#8203;mhlidd](https://github.com/mhlidd))
- ✨ Add context API support OTel propagators
([#&#8203;8770](DataDog/dd-trace-java#8770) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Tracer core

- ✨⚡ Skip JAXB generated classes classloader
([#&#8203;9003](DataDog/dd-trace-java#9003) -
[@&#8203;bric3](https://github.com/bric3))
- ✨ Add DD\_RUNTIME\_METRICS\_RUNTIME\_ID\_ENABLED alias for
runtime id generation
([#&#8203;8981](DataDog/dd-trace-java#8981) -
[@&#8203;amarziali](https://github.com/amarziali))
- 🐛 Use resolved address for peer.hostname when available without
hitting the cache
([#&#8203;8915](DataDog/dd-trace-java#8915) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡 Surface server name process tag for tomcat
([#&#8203;8894](DataDog/dd-trace-java#8894) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡 Surface websphere cell and server name on process tags
([#&#8203;8880](DataDog/dd-trace-java#8880) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Added special lightweight pre-main class that skips
installation on incompatible JVMs.
([#&#8203;8855](DataDog/dd-trace-java#8855) -
[@&#8203;AlexeyKuznetsov-DD](https://github.com/AlexeyKuznetsov-DD))
- 💡 Add entrypoint type to process tags
([#&#8203;8839](DataDog/dd-trace-java#8839) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Extend JPS re-implementation to J9 family
([#&#8203;8813](DataDog/dd-trace-java#8813) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- ✨ Notify listeners when the scope top changes after switching
scope stacks
([#&#8203;8797](DataDog/dd-trace-java#8797) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨ Read hsperfdata for Java PIDs if jvmstat is unavailable
([#&#8203;8792](DataDog/dd-trace-java#8792) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- 🐛 Turn JDK socket support on by default
([#&#8203;8752](DataDog/dd-trace-java#8752) -
[@&#8203;sarahchen6](https://github.com/sarahchen6))
- ✨ Simplify context propagation
([#&#8203;8719](DataDog/dd-trace-java#8719) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Add JSON parsing support
([#&#8203;8579](DataDog/dd-trace-java#8579) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Tracer internal logging

- ✨ Fix printing format of span identifiers
([#&#8203;8897](DataDog/dd-trace-java#8897) -
[@&#8203;vandonr](https://github.com/vandonr))

#### Tracer public API

- 💡 Track the source of installation
([#&#8203;8956](DataDog/dd-trace-java#8956) -
[@&#8203;mabdinur](https://github.com/mabdinur))
- ✨ Enforce size limit on application\_monitoring.yaml files
([#&#8203;8789](DataDog/dd-trace-java#8789) -
[@&#8203;mtoffl01](https://github.com/mtoffl01))
- ✨ Enabling baggage cache to support limits and non-ascii
characters
([#&#8203;8713](DataDog/dd-trace-java#8713) -
[@&#8203;mhlidd](https://github.com/mhlidd))

### Instrumentations

#### AWS Lambda instrumentation

- ✨ Pass Lambda Request ID to Extension
([#&#8203;8814](DataDog/dd-trace-java#8814) -
[@&#8203;nhulston](https://github.com/nhulston))

#### Core Java language instrumentation

- ✨ Ensure ClassloadingInstrumentation is always applied even
with `DD_TRACE_ENABLED=false`
([#&#8203;8863](DataDog/dd-trace-java#8863) -
[@&#8203;mcculls](https://github.com/mcculls))

#### Eclipse Vert.x instrumentation

- 🐛 Do not override route with / in vertx instrumentation
([#&#8203;8881](DataDog/dd-trace-java#8881) -
[@&#8203;vandonr](https://github.com/vandonr))

#### IBM Liberty

- 🐛 Fix error mark on http status for IBM liberty
([#&#8203;8822](DataDog/dd-trace-java#8822) -
[@&#8203;amarziali](https://github.com/amarziali))

#### JDBC instrumentation

- 🐛 Do not prepend DBM <> APM trace comment in SQLCommenter if there
is a pg plan hint
([#&#8203;8864](DataDog/dd-trace-java#8864) -
[@&#8203;edengorevoy](https://github.com/edengorevoy))

#### JMS instrumentation

- ✨ Add jms as an extra integration name where there is JMS
involved
([#&#8203;8933](DataDog/dd-trace-java#8933) -
[@&#8203;vandonr](https://github.com/vandonr))

#### Kotlin instrumentation

- ✨ Enable kotlin\_coroutine integration by default
([#&#8203;8848](DataDog/dd-trace-java#8848) -
[@&#8203;mcculls](https://github.com/mcculls))
- 🧹 Rework Kotlin coroutines instrumentation around coroutine
context
([#&#8203;8774](DataDog/dd-trace-java#8774) -
[@&#8203;mcculls](https://github.com/mcculls))

#### OpenTelemetry instrumentation

- 🐛 Support WithSpan inheritContext attribute
([#&#8203;8858](DataDog/dd-trace-java#8858) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Add context API support OTel propagators
([#&#8203;8770](DataDog/dd-trace-java#8770) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Play Framework instrumentation

- 🐛 Fix the Play Framework's span resource name priority so that the
client JAX-RS 404 cannot override it
([#&#8203;8591](DataDog/dd-trace-java#8591) -
[@&#8203;ygree](https://github.com/ygree))

#### Quarkus Instrumentation

- 🐛 Ignore quarkus jaxrs stubs and cdi wrapper proxies
([#&#8203;8891](DataDog/dd-trace-java#8891) -
[@&#8203;amarziali](https://github.com/amarziali))

#### ServiceTalk

- ✨ Improve ServiceTalk Captured Context API Instrumentation
for v0.42.56+
([#&#8203;8821](DataDog/dd-trace-java#8821) -
[@&#8203;ygree](https://github.com/ygree))

#### Spring instrumentation

- ✨ Supporting Baggage for Instrumentations used in Weblog
Tests
([#&#8203;8773](DataDog/dd-trace-java#8773) -
[@&#8203;mhlidd](https://github.com/mhlidd))

#### WebSocket Instrumentation

- 💡 Trace websocket for spring webflux reactive handlers
([#&#8203;8831](DataDog/dd-trace-java#8831) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡:test\_tube: WebSocket support for Netty
([#&#8203;8632](DataDog/dd-trace-java#8632) -
[@&#8203;ValentinZakharov](https://github.com/ValentinZakharov))

#### Zio Instrumentation

- 🧹 Cleanup Zio fiber instrumentation to avoid repeated activation
of continuation
([#&#8203;8798](DataDog/dd-trace-java#8798) -
[@&#8203;mcculls](https://github.com/mcculls))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 9207366cdb6a1bd098082305d354a0a3c4622d7a
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