Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce context propagation API #8161

Merged
merged 5 commits into from
Jan 14, 2025
Merged

Conversation

PerfectSlayer
Copy link
Contributor

@PerfectSlayer PerfectSlayer commented Jan 6, 2025

What Does This Do

This PR introduce the new context propagation API based on the new context tracking API.
It is similar to the original Agent Tracing propagation API but:

  • decouples propagation from tracing
  • allows declaration and registration of multiple propagators, not only tracing
  • allows using default propagators or specific ones
  • introduce concerns as a way to distinguish propagators, their features, and their ordering

Motivation

Allows products and feature teams to propagate their own data from / to upstream service without relying on Tracing / Spans / Propagation Tags.

Additional Notes

This PR only introduces the API. Porting the existing Tracing propagation implementation, decoupling product / feature data Tracing data model will come in following PRs.

Contributor Checklist

Jira ticket: LANGPLAT-39

@pr-commenter
Copy link

pr-commenter bot commented Jan 6, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/context-propagation
git_commit_date 1736160002 1736243634
git_commit_sha 0c2f7ff ac0a353
release_version 1.45.0-SNAPSHOT~0c2f7ff792 1.45.0-SNAPSHOT~ac0a353af3
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1736246337 1736246337
ci_job_id 756461377 756461377
ci_pipeline_id 52304291 52304291
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

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

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~ac0a353af3, baseline=1.45.0-SNAPSHOT~0c2f7ff792

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056700
Total [baseline] (10.467 s) : 0, 10467227
Agent [candidate] (1.05 s) : 0, 1050018
Total [candidate] (10.365 s) : 0, 10364825
section appsec
Agent [baseline] (1.184 s) : 0, 1184213
Total [baseline] (10.737 s) : 0, 10736927
Agent [candidate] (1.182 s) : 0, 1182358
Total [candidate] (10.721 s) : 0, 10721448
section iast
Agent [baseline] (1.179 s) : 0, 1178915
Total [baseline] (10.961 s) : 0, 10961223
Agent [candidate] (1.177 s) : 0, 1177279
Total [candidate] (10.926 s) : 0, 10926341
section profiling
Agent [baseline] (1.278 s) : 0, 1277911
Total [baseline] (10.778 s) : 0, 10778099
Agent [candidate] (1.273 s) : 0, 1273256
Total [candidate] (10.819 s) : 0, 10819353
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.057 s -
Agent appsec 1.184 s 127.512 ms (12.1%)
Agent iast 1.179 s 122.215 ms (11.6%)
Agent profiling 1.278 s 221.21 ms (20.9%)
Total tracing 10.467 s -
Total appsec 10.737 s 269.7 ms (2.6%)
Total iast 10.961 s 493.995 ms (4.7%)
Total profiling 10.778 s 310.872 ms (3.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.05 s -
Agent appsec 1.182 s 132.34 ms (12.6%)
Agent iast 1.177 s 127.261 ms (12.1%)
Agent profiling 1.273 s 223.238 ms (21.3%)
Total tracing 10.365 s -
Total appsec 10.721 s 356.623 ms (3.4%)
Total iast 10.926 s 561.516 ms (5.4%)
Total profiling 10.819 s 454.528 ms (4.4%)
gantt
    title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~ac0a353af3, baseline=1.45.0-SNAPSHOT~0c2f7ff792

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.36 ms) : 0, 713360
BytebuddyAgent [candidate] (711.091 ms) : 0, 711091
GlobalTracer [baseline] (257.143 ms) : 0, 257143
GlobalTracer [candidate] (256.238 ms) : 0, 256238
AppSec [baseline] (55.648 ms) : 0, 55648
AppSec [candidate] (54.93 ms) : 0, 54930
Remote Config [baseline] (738.658 µs) : 0, 739
Remote Config [candidate] (706.838 µs) : 0, 707
Telemetry [baseline] (14.793 ms) : 0, 14793
Telemetry [candidate] (11.972 ms) : 0, 11972
section appsec
BytebuddyAgent [baseline] (728.201 ms) : 0, 728201
BytebuddyAgent [candidate] (726.482 ms) : 0, 726482
GlobalTracer [baseline] (252.467 ms) : 0, 252467
GlobalTracer [candidate] (252.404 ms) : 0, 252404
AppSec [baseline] (170.462 ms) : 0, 170462
AppSec [candidate] (170.104 ms) : 0, 170104
IAST [baseline] (19.219 ms) : 0, 19219
IAST [candidate] (19.392 ms) : 0, 19392
Remote Config [baseline] (663.766 µs) : 0, 664
Remote Config [candidate] (658.431 µs) : 0, 658
Telemetry [baseline] (7.864 ms) : 0, 7864
Telemetry [candidate] (8.024 ms) : 0, 8024
section iast
BytebuddyAgent [baseline] (828.883 ms) : 0, 828883
BytebuddyAgent [candidate] (827.069 ms) : 0, 827069
GlobalTracer [baseline] (246.377 ms) : 0, 246377
GlobalTracer [candidate] (246.556 ms) : 0, 246556
AppSec [baseline] (58.331 ms) : 0, 58331
AppSec [candidate] (58.115 ms) : 0, 58115
IAST [baseline] (21.237 ms) : 0, 21237
IAST [candidate] (21.379 ms) : 0, 21379
Remote Config [baseline] (644.925 µs) : 0, 645
Remote Config [candidate] (654.371 µs) : 0, 654
Telemetry [baseline] (8.504 ms) : 0, 8504
Telemetry [candidate] (8.469 ms) : 0, 8469
section profiling
BytebuddyAgent [baseline] (702.462 ms) : 0, 702462
BytebuddyAgent [candidate] (701.329 ms) : 0, 701329
GlobalTracer [baseline] (374.636 ms) : 0, 374636
GlobalTracer [candidate] (372.968 ms) : 0, 372968
AppSec [baseline] (54.151 ms) : 0, 54151
AppSec [candidate] (53.571 ms) : 0, 53571
Remote Config [baseline] (665.696 µs) : 0, 666
Remote Config [candidate] (674.508 µs) : 0, 675
Telemetry [baseline] (7.856 ms) : 0, 7856
Telemetry [candidate] (7.875 ms) : 0, 7875
ProfilingAgent [baseline] (96.39 ms) : 0, 96390
ProfilingAgent [candidate] (95.19 ms) : 0, 95190
Profiling [baseline] (96.414 ms) : 0, 96414
Profiling [candidate] (95.214 ms) : 0, 95214
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~ac0a353af3, baseline=1.45.0-SNAPSHOT~0c2f7ff792

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.059 s) : 0, 1059115
Total [baseline] (8.614 s) : 0, 8614039
Agent [candidate] (1.066 s) : 0, 1065652
Total [candidate] (8.67 s) : 0, 8670364
section iast
Agent [baseline] (1.179 s) : 0, 1179484
Total [baseline] (9.225 s) : 0, 9224526
Agent [candidate] (1.178 s) : 0, 1178119
Total [candidate] (9.169 s) : 0, 9168803
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.178 s) : 0, 1177723
Total [baseline] (9.184 s) : 0, 9183711
Agent [candidate] (1.177 s) : 0, 1176820
Total [candidate] (9.163 s) : 0, 9163387
section iast_TELEMETRY_OFF
Agent [baseline] (1.175 s) : 0, 1175393
Total [baseline] (9.185 s) : 0, 9185081
Agent [candidate] (1.173 s) : 0, 1173012
Total [candidate] (9.163 s) : 0, 9162824
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent iast 1.179 s 120.37 ms (11.4%)
Agent iast_HARDCODED_SECRET_DISABLED 1.178 s 118.609 ms (11.2%)
Agent iast_TELEMETRY_OFF 1.175 s 116.279 ms (11.0%)
Total tracing 8.614 s -
Total iast 9.225 s 610.487 ms (7.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.184 s 569.672 ms (6.6%)
Total iast_TELEMETRY_OFF 9.185 s 571.042 ms (6.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.066 s -
Agent iast 1.178 s 112.466 ms (10.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.177 s 111.168 ms (10.4%)
Agent iast_TELEMETRY_OFF 1.173 s 107.36 ms (10.1%)
Total tracing 8.67 s -
Total iast 9.169 s 498.439 ms (5.7%)
Total iast_HARDCODED_SECRET_DISABLED 9.163 s 493.023 ms (5.7%)
Total iast_TELEMETRY_OFF 9.163 s 492.46 ms (5.7%)
gantt
    title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~ac0a353af3, baseline=1.45.0-SNAPSHOT~0c2f7ff792

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.995 ms) : 0, 713995
BytebuddyAgent [candidate] (721.086 ms) : 0, 721086
GlobalTracer [baseline] (257.342 ms) : 0, 257342
GlobalTracer [candidate] (261.053 ms) : 0, 261053
AppSec [baseline] (56.4 ms) : 0, 56400
AppSec [candidate] (56.025 ms) : 0, 56025
Remote Config [baseline] (721.884 µs) : 0, 722
Remote Config [candidate] (735.404 µs) : 0, 735
Telemetry [baseline] (15.644 ms) : 0, 15644
Telemetry [candidate] (11.549 ms) : 0, 11549
section iast
BytebuddyAgent [baseline] (830.243 ms) : 0, 830243
BytebuddyAgent [candidate] (828.579 ms) : 0, 828579
GlobalTracer [baseline] (246.171 ms) : 0, 246171
GlobalTracer [candidate] (246.447 ms) : 0, 246447
AppSec [baseline] (57.84 ms) : 0, 57840
AppSec [candidate] (57.656 ms) : 0, 57656
IAST [baseline] (21.19 ms) : 0, 21190
IAST [candidate] (21.263 ms) : 0, 21263
Remote Config [baseline] (648.18 µs) : 0, 648
Remote Config [candidate] (650.482 µs) : 0, 650
Telemetry [baseline] (8.495 ms) : 0, 8495
Telemetry [candidate] (8.484 ms) : 0, 8484
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (828.689 ms) : 0, 828689
BytebuddyAgent [candidate] (826.262 ms) : 0, 826262
GlobalTracer [baseline] (245.781 ms) : 0, 245781
GlobalTracer [candidate] (246.386 ms) : 0, 246386
AppSec [baseline] (58.016 ms) : 0, 58016
AppSec [candidate] (58.242 ms) : 0, 58242
IAST [baseline] (21.012 ms) : 0, 21012
IAST [candidate] (21.644 ms) : 0, 21644
Remote Config [baseline] (671.341 µs) : 0, 671
Remote Config [candidate] (654.983 µs) : 0, 655
Telemetry [baseline] (8.516 ms) : 0, 8516
Telemetry [candidate] (8.607 ms) : 0, 8607
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (826.346 ms) : 0, 826346
BytebuddyAgent [candidate] (824.347 ms) : 0, 824347
GlobalTracer [baseline] (246.673 ms) : 0, 246673
GlobalTracer [candidate] (246.007 ms) : 0, 246007
AppSec [baseline] (57.896 ms) : 0, 57896
AppSec [candidate] (57.582 ms) : 0, 57582
IAST [baseline] (20.571 ms) : 0, 20571
IAST [candidate] (21.006 ms) : 0, 21006
Remote Config [baseline] (632.942 µs) : 0, 633
Remote Config [candidate] (663.669 µs) : 0, 664
Telemetry [baseline] (8.342 ms) : 0, 8342
Telemetry [candidate] (8.394 ms) : 0, 8394
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-07T10:09:19 2025-01-07T10:16:17
git_branch master bbujon/context-propagation
git_commit_date 1736160002 1736243634
git_commit_sha 0c2f7ff ac0a353
release_version 1.45.0-SNAPSHOT~0c2f7ff792 1.45.0-SNAPSHOT~ac0a353af3
start_time 2025-01-07T10:09:06 2025-01-07T10:16:04
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1736245330 1736245330
ci_job_id 756461378 756461378
ci_pipeline_id 52304291 52304291
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

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

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~ac0a353af3, baseline=1.45.0-SNAPSHOT~0c2f7ff792
    dateFormat X
    axisFormat %s
section baseline
no_agent (379.134 µs) : 359, 399
.   : milestone, 379,
iast (490.754 µs) : 469, 513
.   : milestone, 491,
iast_FULL (655.124 µs) : 634, 677
.   : milestone, 655,
iast_GLOBAL (517.482 µs) : 496, 539
.   : milestone, 517,
iast_HARDCODED_SECRET_DISABLED (488.326 µs) : 467, 510
.   : milestone, 488,
iast_INACTIVE (454.439 µs) : 433, 476
.   : milestone, 454,
iast_TELEMETRY_OFF (475.084 µs) : 453, 497
.   : milestone, 475,
tracing (444.319 µs) : 424, 465
.   : milestone, 444,
section candidate
no_agent (371.738 µs) : 352, 392
.   : milestone, 372,
iast (495.275 µs) : 474, 517
.   : milestone, 495,
iast_FULL (657.716 µs) : 636, 680
.   : milestone, 658,
iast_GLOBAL (520.836 µs) : 499, 543
.   : milestone, 521,
iast_HARDCODED_SECRET_DISABLED (489.829 µs) : 468, 511
.   : milestone, 490,
iast_INACTIVE (449.988 µs) : 429, 471
.   : milestone, 450,
iast_TELEMETRY_OFF (476.899 µs) : 456, 498
.   : milestone, 477,
tracing (447.904 µs) : 427, 468
.   : milestone, 448,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 379.134 µs [359.451 µs, 398.817 µs] -
iast 490.754 µs [468.968 µs, 512.54 µs] 111.62 µs (29.4%)
iast_FULL 655.124 µs [633.688 µs, 676.56 µs] 275.99 µs (72.8%)
iast_GLOBAL 517.482 µs [495.658 µs, 539.306 µs] 138.348 µs (36.5%)
iast_HARDCODED_SECRET_DISABLED 488.326 µs [466.827 µs, 509.825 µs] 109.192 µs (28.8%)
iast_INACTIVE 454.439 µs [432.864 µs, 476.014 µs] 75.305 µs (19.9%)
iast_TELEMETRY_OFF 475.084 µs [453.379 µs, 496.79 µs] 95.95 µs (25.3%)
tracing 444.319 µs [423.691 µs, 464.947 µs] 65.185 µs (17.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 371.738 µs [351.575 µs, 391.9 µs] -
iast 495.275 µs [473.569 µs, 516.98 µs] 123.537 µs (33.2%)
iast_FULL 657.716 µs [635.903 µs, 679.53 µs] 285.979 µs (76.9%)
iast_GLOBAL 520.836 µs [498.771 µs, 542.901 µs] 149.099 µs (40.1%)
iast_HARDCODED_SECRET_DISABLED 489.829 µs [468.175 µs, 511.482 µs] 118.091 µs (31.8%)
iast_INACTIVE 449.988 µs [429.239 µs, 470.738 µs] 78.25 µs (21.0%)
iast_TELEMETRY_OFF 476.899 µs [455.606 µs, 498.191 µs] 105.161 µs (28.3%)
tracing 447.904 µs [427.318 µs, 468.489 µs] 76.166 µs (20.5%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~ac0a353af3, baseline=1.45.0-SNAPSHOT~0c2f7ff792
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.367 ms) : 1348, 1387
.   : milestone, 1367,
appsec (1.772 ms) : 1749, 1796
.   : milestone, 1772,
appsec_no_iast (1.752 ms) : 1727, 1776
.   : milestone, 1752,
iast (1.493 ms) : 1469, 1516
.   : milestone, 1493,
profiling (1.549 ms) : 1524, 1574
.   : milestone, 1549,
tracing (1.475 ms) : 1450, 1500
.   : milestone, 1475,
section candidate
no_agent (1.353 ms) : 1333, 1372
.   : milestone, 1353,
appsec (1.752 ms) : 1729, 1775
.   : milestone, 1752,
appsec_no_iast (1.768 ms) : 1743, 1793
.   : milestone, 1768,
iast (1.512 ms) : 1488, 1535
.   : milestone, 1512,
profiling (1.519 ms) : 1495, 1542
.   : milestone, 1519,
tracing (1.488 ms) : 1464, 1512
.   : milestone, 1488,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.367 ms [1.348 ms, 1.387 ms] -
appsec 1.772 ms [1.749 ms, 1.796 ms] 404.796 µs (29.6%)
appsec_no_iast 1.752 ms [1.727 ms, 1.776 ms] 384.116 µs (28.1%)
iast 1.493 ms [1.469 ms, 1.516 ms] 125.23 µs (9.2%)
profiling 1.549 ms [1.524 ms, 1.574 ms] 181.525 µs (13.3%)
tracing 1.475 ms [1.45 ms, 1.5 ms] 107.199 µs (7.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.353 ms [1.333 ms, 1.372 ms] -
appsec 1.752 ms [1.729 ms, 1.775 ms] 399.358 µs (29.5%)
appsec_no_iast 1.768 ms [1.743 ms, 1.793 ms] 415.564 µs (30.7%)
iast 1.512 ms [1.488 ms, 1.535 ms] 158.824 µs (11.7%)
profiling 1.519 ms [1.495 ms, 1.542 ms] 165.865 µs (12.3%)
tracing 1.488 ms [1.464 ms, 1.512 ms] 135.549 µs (10.0%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/context-propagation
git_commit_date 1736160002 1736243634
git_commit_sha 0c2f7ff ac0a353
release_version 1.45.0-SNAPSHOT~0c2f7ff792 1.45.0-SNAPSHOT~ac0a353af3
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1736245885 1736245885
ci_job_id 756461379 756461379
ci_pipeline_id 52304291 52304291
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
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.45.0-SNAPSHOT~ac0a353af3, baseline=1.45.0-SNAPSHOT~0c2f7ff792
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.459 s) : 15459000, 15459000
.   : milestone, 15459000,
appsec (15.135 s) : 15135000, 15135000
.   : milestone, 15135000,
iast (18.809 s) : 18809000, 18809000
.   : milestone, 18809000,
iast_GLOBAL (18.042 s) : 18042000, 18042000
.   : milestone, 18042000,
profiling (14.918 s) : 14918000, 14918000
.   : milestone, 14918000,
tracing (14.805 s) : 14805000, 14805000
.   : milestone, 14805000,
section candidate
no_agent (15.545 s) : 15545000, 15545000
.   : milestone, 15545000,
appsec (15.178 s) : 15178000, 15178000
.   : milestone, 15178000,
iast (18.516 s) : 18516000, 18516000
.   : milestone, 18516000,
iast_GLOBAL (17.962 s) : 17962000, 17962000
.   : milestone, 17962000,
profiling (15.007 s) : 15007000, 15007000
.   : milestone, 15007000,
tracing (14.98 s) : 14980000, 14980000
.   : milestone, 14980000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.459 s [15.459 s, 15.459 s] -
appsec 15.135 s [15.135 s, 15.135 s] -324.0 ms (-2.1%)
iast 18.809 s [18.809 s, 18.809 s] 3.35 s (21.7%)
iast_GLOBAL 18.042 s [18.042 s, 18.042 s] 2.583 s (16.7%)
profiling 14.918 s [14.918 s, 14.918 s] -541.0 ms (-3.5%)
tracing 14.805 s [14.805 s, 14.805 s] -654.0 ms (-4.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.545 s [15.545 s, 15.545 s] -
appsec 15.178 s [15.178 s, 15.178 s] -367.0 ms (-2.4%)
iast 18.516 s [18.516 s, 18.516 s] 2.971 s (19.1%)
iast_GLOBAL 17.962 s [17.962 s, 17.962 s] 2.417 s (15.5%)
profiling 15.007 s [15.007 s, 15.007 s] -538.0 ms (-3.5%)
tracing 14.98 s [14.98 s, 14.98 s] -565.0 ms (-3.6%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~ac0a353af3, baseline=1.45.0-SNAPSHOT~0c2f7ff792
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.472 ms) : 1461, 1484
.   : milestone, 1472,
appsec (2.355 ms) : 2312, 2397
.   : milestone, 2355,
iast (2.089 ms) : 2036, 2143
.   : milestone, 2089,
iast_GLOBAL (2.146 ms) : 2091, 2201
.   : milestone, 2146,
profiling (1.958 ms) : 1915, 2001
.   : milestone, 1958,
tracing (1.942 ms) : 1901, 1984
.   : milestone, 1942,
section candidate
no_agent (1.466 ms) : 1455, 1478
.   : milestone, 1466,
appsec (2.347 ms) : 2305, 2389
.   : milestone, 2347,
iast (2.078 ms) : 2025, 2131
.   : milestone, 2078,
iast_GLOBAL (2.124 ms) : 2071, 2177
.   : milestone, 2124,
profiling (1.942 ms) : 1900, 1984
.   : milestone, 1942,
tracing (1.926 ms) : 1886, 1967
.   : milestone, 1926,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.472 ms [1.461 ms, 1.484 ms] -
appsec 2.355 ms [2.312 ms, 2.397 ms] 882.4 µs (59.9%)
iast 2.089 ms [2.036 ms, 2.143 ms] 617.362 µs (41.9%)
iast_GLOBAL 2.146 ms [2.091 ms, 2.201 ms] 673.853 µs (45.8%)
profiling 1.958 ms [1.915 ms, 2.001 ms] 485.497 µs (33.0%)
tracing 1.942 ms [1.901 ms, 1.984 ms] 470.162 µs (31.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.466 ms [1.455 ms, 1.478 ms] -
appsec 2.347 ms [2.305 ms, 2.389 ms] 880.669 µs (60.1%)
iast 2.078 ms [2.025 ms, 2.131 ms] 611.721 µs (41.7%)
iast_GLOBAL 2.124 ms [2.071 ms, 2.177 ms] 657.504 µs (44.8%)
profiling 1.942 ms [1.9 ms, 1.984 ms] 475.289 µs (32.4%)
tracing 1.926 ms [1.886 ms, 1.967 ms] 460.083 µs (31.4%)

import java.util.Map;

public final class Propagators {
private static final Map<Concern, Propagator> PROPAGATORS = synchronizedMap(new HashMap<>());

Choose a reason for hiding this comment

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

Out of curiosity, why are we not using an IdentityHashMap instead of HashMap?, (if we keep the HashMap it might be good to make Concern final to prevent mistakes)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That’s a good call! I updated the map implementation 👍

@PerfectSlayer PerfectSlayer added comp: remote config Configuration at Runtime comp: core Tracer core and removed comp: core Tracer core comp: remote config Configuration at Runtime labels Jan 14, 2025
@PerfectSlayer PerfectSlayer merged commit 5bb595b into master Jan 14, 2025
150 of 151 checks passed
@PerfectSlayer PerfectSlayer deleted the bbujon/context-propagation branch January 14, 2025 15:47
@github-actions github-actions bot added this to the 1.46.0 milestone Jan 14, 2025
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jan 31, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.25.4` -> `2.26.0` |
| [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.45.2` -> `1.46.0` |
| [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.45.2` -> `1.46.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |

---

### Release Notes

<details>
<summary>googleapis/java-datastore
(com.google.cloud:google-cloud-datastore)</summary>

###
[`v2.26.0`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#2260-2025-01-29)

##### Features

- Add firestoreInDatastoreMode for datastore emulator
([#&#8203;1698](googleapis/java-datastore#1698))
([50f106d](googleapis/java-datastore@50f106d))

##### Dependencies

- Update dependency com.google.cloud:sdk-platform-java-config to v3.42.0
([#&#8203;1725](googleapis/java-datastore#1725))
([1cbaf22](googleapis/java-datastore@1cbaf22))

</details>

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

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

##### Breaking Changes

> \[!WARNING]
> jnr-unixsocket is now an external dependency of dd-trace-ot and must
be included when deploying dd-trace-ot.

> \[!NOTE]
> The API `TracerScope.setAsync(boolean)`, used to manually control
asynchronous span propagation, does no more apply to the scope instance
but to the active span scope.

##### Components

##### Application Security Management (IAST)

- 🐛 Fix String.replace instrumentation for IAST
([#&#8203;8281](DataDog/dd-trace-java#8281) -
[@&#8203;Mariovido](https://github.com/Mariovido))
- ✨ Apply the standard nomenclature to the stacktrace configs
([#&#8203;8244](DataDog/dd-trace-java#8244) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Exclude false positive weak randomness
([#&#8203;8232](DataDog/dd-trace-java#8232) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Propagation of translateEscapes of String class
([#&#8203;8186](DataDog/dd-trace-java#8186) -
[@&#8203;sezen-datadog](https://github.com/sezen-datadog))
- ✨ Add security control metrics
([#&#8203;8175](DataDog/dd-trace-java#8175) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Increase IAST propagation to StringBuffer setLength
([#&#8203;8128](DataDog/dd-trace-java#8128) -
[@&#8203;Mariovido](https://github.com/Mariovido))
- ✨ Add IAST taint tracking for DB values
([#&#8203;8072](DataDog/dd-trace-java#8072) -
[@&#8203;Mariovido](https://github.com/Mariovido))

##### Application Security Management (WAF)

- 🐛 Prevents a NPE when there is no subscriber for user events
([#&#8203;8258](DataDog/dd-trace-java#8258) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Apply the standard nomenclature to the stacktrace configs
([#&#8203;8244](DataDog/dd-trace-java#8244) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Ensure cached subscriptions are cleared on reconfiguration via
RC ([#&#8203;8229](DataDog/dd-trace-java#8229)
-
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Add support for session tracking in Vertx
([#&#8203;8167](DataDog/dd-trace-java#8167) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Create span tag: \_dd.appsec.rasp.timeout
([#&#8203;8269](DataDog/dd-trace-java#8269) -
[@&#8203;Mariovido](https://github.com/Mariovido))

##### Build & Tooling

- 🐛 Ensure shaded helpers have unique names when injected into
class-loaders
([#&#8203;8192](DataDog/dd-trace-java#8192) -
[@&#8203;mcculls](https://github.com/mcculls))

##### Configuration at Runtime

- 🐛 Remove filtering of `DD_SERVICE` and `DD_ENV` from the tracer
([#&#8203;8176](DataDog/dd-trace-java#8176) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Continuous Integration Visibility

- 🧹 Generalize TestRetryPolicy to TestExecutionPolicy
([#&#8203;8302](DataDog/dd-trace-java#8302) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Parallelize CI Visibility settings requests
([#&#8203;8299](DataDog/dd-trace-java#8299) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Generalize test retry logic
([#&#8203;8289](DataDog/dd-trace-java#8289) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Generalize tests skipping logic
([#&#8203;8288](DataDog/dd-trace-java#8288) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Remove skip and shouldBeSkipped methods from TestEventsHandler
in favor of isSkippable
([#&#8203;8286](DataDog/dd-trace-java#8286) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨⚡ Optimize Git repository information computation
([#&#8203;8270](DataDog/dd-trace-java#8270) -
[@&#8203;dougqh](https://github.com/dougqh))
- ✨ Always request known tests from the backend
([#&#8203;8268](DataDog/dd-trace-java#8268) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Fix NPE when trying to get retry analyzer in Test NG
([#&#8203;8253](DataDog/dd-trace-java#8253) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Set test framework and test framework version tags atomically
([#&#8203;8252](DataDog/dd-trace-java#8252) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Add debug logging to Android Gradle module layout logic
([#&#8203;8251](DataDog/dd-trace-java#8251) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Fix source and destination folders computation for Android
Gradle projects
([#&#8203;8190](DataDog/dd-trace-java#8190) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Add basic Scala Weaver sbt support
([#&#8203;8189](DataDog/dd-trace-java#8189) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Implement impacted tests detection
([#&#8203;8188](DataDog/dd-trace-java#8188) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))

##### Data Streams Monitoring

- ✨ Change hash computation for protobuf to better represent
impacting changes + save proto number in schema
([#&#8203;8201](DataDog/dd-trace-java#8201) -
[@&#8203;vandonr](https://github.com/vandonr))

##### Database Monitoring

- Add peer service tag in dbm sql commenter
([#&#8203;7913](DataDog/dd-trace-java#7913) -
[@&#8203;jordan-wong](https://github.com/jordan-wong))

##### Dynamic Instrumentation

- ✨ Add support for SymDB to scan directories
([#&#8203;8306](DataDog/dd-trace-java#8306) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Add SymDB report for any jar scanning failures
([#&#8203;8300](DataDog/dd-trace-java#8300) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Use two budgets depending on type
([#&#8203;8283](DataDog/dd-trace-java#8283) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- ✨ Institute a 10 snapshot per probe per trace budget
([#&#8203;8277](DataDog/dd-trace-java#8277) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- 🐛 Avoid double snapshots for Exception Replay
([#&#8203;8273](DataDog/dd-trace-java#8273) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Simplify code origins. Separate out snapshot generation.
([#&#8203;8263](DataDog/dd-trace-java#8263) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- ✨ Add Exception probe custom instrumentation
([#&#8203;8230](DataDog/dd-trace-java#8230) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Enhance log probes to honor debug session tags
([#&#8203;8215](DataDog/dd-trace-java#8215) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- 🐛 Don't redact env tokens from debugger probe snapshots
([#&#8203;8211](DataDog/dd-trace-java#8211) -
[@&#8203;watson](https://github.com/watson))
- ✨⚡ Move Trace/SpanId capture at commit time
([#&#8203;8184](DataDog/dd-trace-java#8184) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Capture values at entry for method probe
([#&#8203;8169](DataDog/dd-trace-java#8169) -
[@&#8203;jpbempel](https://github.com/jpbempel))

##### JMX fetch

- 🐛 Mute JMXFetch Shutdown in progress error
([#&#8203;8068](DataDog/dd-trace-java#8068) -
[@&#8203;ygree](https://github.com/ygree))

##### OpenTracing

- ⚠️🧹 Make jnr-unixsocket an explicit dependency of
dd-trace-ot
([#&#8203;8307](DataDog/dd-trace-java#8307) -
[@&#8203;mcculls](https://github.com/mcculls))

##### Profiling

- 🐛 Avoid unsupported API call for creating folders on windows
([#&#8203;8304](DataDog/dd-trace-java#8304) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Tag profiles for serverless
([#&#8203;8279](DataDog/dd-trace-java#8279) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ add queue type and length to queue events
([#&#8203;8242](DataDog/dd-trace-java#8242) -
[@&#8203;richardstartin](https://github.com/richardstartin))
- 🐛 TempLocationManager Fixes and Improvements
([#&#8203;8191](DataDog/dd-trace-java#8191) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Bump ddprof to 1.18.0
([#&#8203;8173](DataDog/dd-trace-java#8173) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Report profiler initialization and configuration errors to
telemetry
([#&#8203;8171](DataDog/dd-trace-java#8171) -
[@&#8203;jbachorik](https://github.com/jbachorik))

##### Telemetry

- ✨ Add pending traces report in tracer flares
([#&#8203;8053](DataDog/dd-trace-java#8053) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Testing

- ✨ Test http server requests in parallel
([#&#8203;8222](DataDog/dd-trace-java#8222) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Trace context propagation

- ✨ Add non default propagator registration
([#&#8203;8310](DataDog/dd-trace-java#8310) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

##### Tracer core

- ✨ Probe for existence of IBMSASL or ACCP security providers
([#&#8203;8276](DataDog/dd-trace-java#8276) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨⚡ Overhead improvement to agent feedback based sampling
([#&#8203;8265](DataDog/dd-trace-java#8265) -
[@&#8203;dougqh](https://github.com/dougqh))
- 🧹 Move async propagation API from scope to tracer
([#&#8203;8231](DataDog/dd-trace-java#8231) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Introduce context propagation API
([#&#8203;8161](DataDog/dd-trace-java#8161) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨🧪 Use env-entry to add tags per webapp deployment
([#&#8203;8138](DataDog/dd-trace-java#8138) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Introduce context helpers API
([#&#8203;8134](DataDog/dd-trace-java#8134) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Support IPv6 values for `DD_AGENT_HOST` and
`DD_TRACE_AGENT_URL`
([#&#8203;7984](DataDog/dd-trace-java#7984) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Instrumentations

##### Apache HttpComponents

- 🐛 Properly finish spans and support latest apache httpclient5
([#&#8203;8272](DataDog/dd-trace-java#8272) -
[@&#8203;amarziali](https://github.com/amarziali))

##### AWS Lambda instrumentation

- 🐛 Properly capture lambda payloads for all handler types.
([#&#8203;8264](DataDog/dd-trace-java#8264) -
[@&#8203;purple4reina](https://github.com/purple4reina))

##### AWS S3 instrumentation

- 💡 Create S3 instrumentation + add span pointers
([#&#8203;8075](DataDog/dd-trace-java#8075) -
[@&#8203;nhulston](https://github.com/nhulston))

##### AWS SDK instrumentation

- 🐛 Revert "Add avoid double instrumenting lambda non-streaming
handlers."
([#&#8203;8247](DataDog/dd-trace-java#8247) -
[@&#8203;nhulston](https://github.com/nhulston))

##### Cassandra

- ✨ Allow extracting keyspace from statement result
([#&#8203;8239](DataDog/dd-trace-java#8239) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Core Java language instrumentation

- ✨ Propagation of translateEscapes of String class
([#&#8203;8186](DataDog/dd-trace-java#8186) -
[@&#8203;sezen-datadog](https://github.com/sezen-datadog))

##### Eclipse Vert.x instrumentation

- 🐛 Fix vertx worker propagation and error handling
([#&#8203;8237](DataDog/dd-trace-java#8237) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Support vertx 5
([#&#8203;8220](DataDog/dd-trace-java#8220) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Add support for session tracking in Vertx
([#&#8203;8167](DataDog/dd-trace-java#8167) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))

##### Kafka instrumentation

- 🐛 Prevent possible NPE calculating Kafka record header size
([#&#8203;8292](DataDog/dd-trace-java#8292) -
[@&#8203;ygree](https://github.com/ygree))

##### Mule instrumentation

- 🐛 Fix crash using Mule with JPMS
([#&#8203;8187](DataDog/dd-trace-java#8187) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Protocol Buffer instrumentation

- ✨ Change hash computation for protobuf to better represent
impacting changes + save proto number in schema
([#&#8203;8201](DataDog/dd-trace-java#8201) -
[@&#8203;vandonr](https://github.com/vandonr))

##### Spring instrumentation

- 🐛 Preserve getQualifier from spring scheduling runnables
([#&#8203;8293](DataDog/dd-trace-java#8293) -
[@&#8203;amarziali](https://github.com/amarziali))

</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**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- 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: bb09d47e4eed77a003f630273b4d0a84003eb899
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants