Skip to content

Move InferredProxyContext to internal-api… #8795

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mcculls
Copy link
Contributor

@mcculls mcculls commented May 11, 2025

…and InferredProxyPropagatorto dd-trace-core

Also makes InferredProxySpanGroup class static to avoid unnecessary dependency on surrounding decorator

Motivation

components/context should remain generic and not contain any specific propagator code

Additional Notes

#8796 is needed to fix an unrelated test compilation issue

Contributor Checklist

Jira ticket: [PROJ-IDENT]

… to dd-trace-core

('components/context' should remain generic and not contain any specific propagator code)
@mcculls mcculls added comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring labels May 11, 2025
@pr-commenter
Copy link

pr-commenter bot commented May 11, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/move-inferred-proxy-code-out-of-components
git_commit_date 1747042167 1747042185
git_commit_sha e5785f7 54de40f
release_version 1.50.0-SNAPSHOT~e5785f7306 1.50.0-SNAPSHOT~54de40f50a
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1747044681 1747044681
ci_job_id 933032565 933032565
ci_pipeline_id 64758943 64758943
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-7pg-kqds-project-304-concurrent-2-f3qawd3e 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-7pg-kqds-project-304-concurrent-2-f3qawd3e 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 57 metrics, 14 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~54de40f50a, baseline=1.50.0-SNAPSHOT~e5785f7306

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.025 s) : 0, 1025231
Total [baseline] (10.496 s) : 0, 10495591
Agent [candidate] (1.027 s) : 0, 1027381
Total [candidate] (10.483 s) : 0, 10483130
section appsec
Agent [baseline] (1.162 s) : 0, 1161679
Total [baseline] (10.677 s) : 0, 10677151
Agent [candidate] (1.164 s) : 0, 1163781
Total [candidate] (10.687 s) : 0, 10687499
section iast
Agent [baseline] (1.15 s) : 0, 1150401
Total [baseline] (10.897 s) : 0, 10897156
Agent [candidate] (1.157 s) : 0, 1157075
Total [candidate] (10.935 s) : 0, 10935200
section profiling
Agent [baseline] (1.28 s) : 0, 1279586
Total [baseline] (10.839 s) : 0, 10838796
Agent [candidate] (1.282 s) : 0, 1281994
Total [candidate] (10.916 s) : 0, 10915854
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.025 s -
Agent appsec 1.162 s 136.448 ms (13.3%)
Agent iast 1.15 s 125.17 ms (12.2%)
Agent profiling 1.28 s 254.356 ms (24.8%)
Total tracing 10.496 s -
Total appsec 10.677 s 181.56 ms (1.7%)
Total iast 10.897 s 401.565 ms (3.8%)
Total profiling 10.839 s 343.205 ms (3.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.027 s -
Agent appsec 1.164 s 136.401 ms (13.3%)
Agent iast 1.157 s 129.694 ms (12.6%)
Agent profiling 1.282 s 254.613 ms (24.8%)
Total tracing 10.483 s -
Total appsec 10.687 s 204.369 ms (1.9%)
Total iast 10.935 s 452.07 ms (4.3%)
Total profiling 10.916 s 432.724 ms (4.1%)
gantt
    title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~54de40f50a, baseline=1.50.0-SNAPSHOT~e5785f7306

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (686.64 ms) : 0, 686640
BytebuddyAgent [candidate] (687.513 ms) : 0, 687513
GlobalTracer [baseline] (240.85 ms) : 0, 240850
GlobalTracer [candidate] (241.789 ms) : 0, 241789
AppSec [baseline] (54.379 ms) : 0, 54379
AppSec [candidate] (54.668 ms) : 0, 54668
Debugger [baseline] (6.938 ms) : 0, 6938
Debugger [candidate] (9.219 ms) : 0, 9219
Remote Config [baseline] (712.852 µs) : 0, 713
Remote Config [candidate] (706.502 µs) : 0, 707
Telemetry [baseline] (12.056 ms) : 0, 12056
Telemetry [candidate] (9.758 ms) : 0, 9758
section appsec
BytebuddyAgent [baseline] (700.879 ms) : 0, 700879
BytebuddyAgent [candidate] (702.74 ms) : 0, 702740
GlobalTracer [baseline] (236.787 ms) : 0, 236787
GlobalTracer [candidate] (236.928 ms) : 0, 236928
AppSec [baseline] (175.692 ms) : 0, 175692
AppSec [candidate] (175.741 ms) : 0, 175741
Debugger [baseline] (5.968 ms) : 0, 5968
Debugger [candidate] (5.955 ms) : 0, 5955
Remote Config [baseline] (627.522 µs) : 0, 628
Remote Config [candidate] (626.933 µs) : 0, 627
Telemetry [baseline] (7.4 ms) : 0, 7400
Telemetry [candidate] (7.398 ms) : 0, 7398
IAST [baseline] (21.631 ms) : 0, 21631
IAST [candidate] (21.537 ms) : 0, 21537
section iast
BytebuddyAgent [baseline] (803.246 ms) : 0, 803246
BytebuddyAgent [candidate] (808.585 ms) : 0, 808585
GlobalTracer [baseline] (230.529 ms) : 0, 230529
GlobalTracer [candidate] (231.92 ms) : 0, 231920
AppSec [baseline] (50.335 ms) : 0, 50335
AppSec [candidate] (50.065 ms) : 0, 50065
Debugger [baseline] (5.966 ms) : 0, 5966
Debugger [candidate] (5.894 ms) : 0, 5894
Remote Config [baseline] (598.191 µs) : 0, 598
Remote Config [candidate] (599.005 µs) : 0, 599
Telemetry [baseline] (7.943 ms) : 0, 7943
Telemetry [candidate] (7.835 ms) : 0, 7835
IAST [baseline] (28.249 ms) : 0, 28249
IAST [candidate] (28.565 ms) : 0, 28565
section profiling
BytebuddyAgent [baseline] (672.301 ms) : 0, 672301
BytebuddyAgent [candidate] (673.573 ms) : 0, 673573
GlobalTracer [baseline] (377.831 ms) : 0, 377831
GlobalTracer [candidate] (378.713 ms) : 0, 378713
AppSec [baseline] (54.798 ms) : 0, 54798
AppSec [candidate] (53.966 ms) : 0, 53966
Debugger [baseline] (6.149 ms) : 0, 6149
Debugger [candidate] (6.184 ms) : 0, 6184
Remote Config [baseline] (652.687 µs) : 0, 653
Remote Config [candidate] (668.65 µs) : 0, 669
Telemetry [baseline] (8.076 ms) : 0, 8076
Telemetry [candidate] (8.217 ms) : 0, 8217
ProfilingAgent [baseline] (109.277 ms) : 0, 109277
ProfilingAgent [candidate] (110.181 ms) : 0, 110181
Profiling [baseline] (109.302 ms) : 0, 109302
Profiling [candidate] (110.206 ms) : 0, 110206
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~54de40f50a, baseline=1.50.0-SNAPSHOT~e5785f7306

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.029 s) : 0, 1028587
Total [baseline] (8.68 s) : 0, 8680432
Agent [candidate] (1.02 s) : 0, 1019927
Total [candidate] (8.644 s) : 0, 8643865
section iast
Agent [baseline] (1.156 s) : 0, 1156201
Total [baseline] (9.228 s) : 0, 9227617
Agent [candidate] (1.147 s) : 0, 1147307
Total [candidate] (9.235 s) : 0, 9234740
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.148 s) : 0, 1148199
Total [baseline] (9.175 s) : 0, 9175421
Agent [candidate] (1.154 s) : 0, 1153730
Total [candidate] (9.206 s) : 0, 9206188
section iast_TELEMETRY_OFF
Agent [baseline] (1.162 s) : 0, 1161927
Total [baseline] (9.278 s) : 0, 9277756
Agent [candidate] (1.152 s) : 0, 1151735
Total [candidate] (9.205 s) : 0, 9204740
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.029 s -
Agent iast 1.156 s 127.614 ms (12.4%)
Agent iast_HARDCODED_SECRET_DISABLED 1.148 s 119.612 ms (11.6%)
Agent iast_TELEMETRY_OFF 1.162 s 133.34 ms (13.0%)
Total tracing 8.68 s -
Total iast 9.228 s 547.186 ms (6.3%)
Total iast_HARDCODED_SECRET_DISABLED 9.175 s 494.989 ms (5.7%)
Total iast_TELEMETRY_OFF 9.278 s 597.324 ms (6.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.02 s -
Agent iast 1.147 s 127.38 ms (12.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.154 s 133.802 ms (13.1%)
Agent iast_TELEMETRY_OFF 1.152 s 131.807 ms (12.9%)
Total tracing 8.644 s -
Total iast 9.235 s 590.875 ms (6.8%)
Total iast_HARDCODED_SECRET_DISABLED 9.206 s 562.324 ms (6.5%)
Total iast_TELEMETRY_OFF 9.205 s 560.875 ms (6.5%)
gantt
    title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~54de40f50a, baseline=1.50.0-SNAPSHOT~e5785f7306

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.996 ms) : 0, 687996
BytebuddyAgent [candidate] (682.209 ms) : 0, 682209
GlobalTracer [baseline] (241.806 ms) : 0, 241806
GlobalTracer [candidate] (240.084 ms) : 0, 240084
AppSec [baseline] (54.691 ms) : 0, 54691
AppSec [candidate] (54.466 ms) : 0, 54466
Debugger [baseline] (9.919 ms) : 0, 9919
Debugger [candidate] (9.131 ms) : 0, 9131
Remote Config [baseline] (703.551 µs) : 0, 704
Remote Config [candidate] (706.587 µs) : 0, 707
Telemetry [baseline] (9.809 ms) : 0, 9809
Telemetry [candidate] (9.862 ms) : 0, 9862
section iast
BytebuddyAgent [baseline] (810.446 ms) : 0, 810446
BytebuddyAgent [candidate] (800.47 ms) : 0, 800470
GlobalTracer [baseline] (229.661 ms) : 0, 229661
GlobalTracer [candidate] (230.196 ms) : 0, 230196
IAST [baseline] (29.886 ms) : 0, 29886
IAST [candidate] (26.53 ms) : 0, 26530
AppSec [baseline] (47.499 ms) : 0, 47499
AppSec [candidate] (51.301 ms) : 0, 51301
Debugger [baseline] (5.843 ms) : 0, 5843
Debugger [candidate] (5.974 ms) : 0, 5974
Remote Config [baseline] (606.843 µs) : 0, 607
Remote Config [candidate] (599.958 µs) : 0, 600
Telemetry [baseline] (7.823 ms) : 0, 7823
Telemetry [candidate] (7.94 ms) : 0, 7940
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (800.983 ms) : 0, 800983
BytebuddyAgent [candidate] (805.555 ms) : 0, 805555
GlobalTracer [baseline] (230.499 ms) : 0, 230499
GlobalTracer [candidate] (230.791 ms) : 0, 230791
IAST [baseline] (28.462 ms) : 0, 28462
IAST [candidate] (29.303 ms) : 0, 29303
AppSec [baseline] (50.352 ms) : 0, 50352
AppSec [candidate] (49.896 ms) : 0, 49896
Debugger [baseline] (5.939 ms) : 0, 5939
Debugger [candidate] (6.0 ms) : 0, 6000
Remote Config [baseline] (588.131 µs) : 0, 588
Remote Config [candidate] (601.641 µs) : 0, 602
Telemetry [baseline] (7.943 ms) : 0, 7943
Telemetry [candidate] (8.018 ms) : 0, 8018
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (809.87 ms) : 0, 809870
BytebuddyAgent [candidate] (803.635 ms) : 0, 803635
GlobalTracer [baseline] (233.975 ms) : 0, 233975
GlobalTracer [candidate] (231.367 ms) : 0, 231367
IAST [baseline] (24.468 ms) : 0, 24468
IAST [candidate] (23.337 ms) : 0, 23337
AppSec [baseline] (55.172 ms) : 0, 55172
AppSec [candidate] (55.323 ms) : 0, 55323
Debugger [baseline] (6.126 ms) : 0, 6126
Debugger [candidate] (6.012 ms) : 0, 6012
Remote Config [baseline] (639.15 µs) : 0, 639
Remote Config [candidate] (602.773 µs) : 0, 603
Telemetry [baseline] (7.963 ms) : 0, 7963
Telemetry [candidate] (7.864 ms) : 0, 7864
Loading

Load

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/move-inferred-proxy-code-out-of-components
git_commit_date 1747042167 1747042185
git_commit_sha e5785f7 54de40f
release_version 1.50.0-SNAPSHOT~e5785f7306 1.50.0-SNAPSHOT~54de40f50a
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1747044263 1747044263
ci_job_id 933032567 933032567
ci_pipeline_id 64758943 64758943
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-7pg-kqds-project-304-concurrent-3-gh337vl7 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-7pg-kqds-project-304-concurrent-3-gh337vl7 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 tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~54de40f50a, baseline=1.50.0-SNAPSHOT~e5785f7306
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.471 ms) : 1460, 1483
.   : milestone, 1471,
appsec (2.406 ms) : 2356, 2456
.   : milestone, 2406,
iast (2.181 ms) : 2118, 2244
.   : milestone, 2181,
iast_GLOBAL (2.22 ms) : 2157, 2282
.   : milestone, 2220,
profiling (2.024 ms) : 1974, 2073
.   : milestone, 2024,
tracing (2.006 ms) : 1958, 2055
.   : milestone, 2006,
section candidate
no_agent (1.475 ms) : 1464, 1487
.   : milestone, 1475,
appsec (2.408 ms) : 2358, 2458
.   : milestone, 2408,
iast (2.189 ms) : 2126, 2252
.   : milestone, 2189,
iast_GLOBAL (2.22 ms) : 2158, 2283
.   : milestone, 2220,
profiling (2.029 ms) : 1979, 2078
.   : milestone, 2029,
tracing (2.007 ms) : 1958, 2055
.   : milestone, 2007,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.46 ms, 1.483 ms] -
appsec 2.406 ms [2.356 ms, 2.456 ms] 934.651 µs (63.5%)
iast 2.181 ms [2.118 ms, 2.244 ms] 709.496 µs (48.2%)
iast_GLOBAL 2.22 ms [2.157 ms, 2.282 ms] 748.352 µs (50.9%)
profiling 2.024 ms [1.974 ms, 2.073 ms] 552.185 µs (37.5%)
tracing 2.006 ms [1.958 ms, 2.055 ms] 534.941 µs (36.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.464 ms, 1.487 ms] -
appsec 2.408 ms [2.358 ms, 2.458 ms] 932.896 µs (63.2%)
iast 2.189 ms [2.126 ms, 2.252 ms] 713.844 µs (48.4%)
iast_GLOBAL 2.22 ms [2.158 ms, 2.283 ms] 745.0 µs (50.5%)
profiling 2.029 ms [1.979 ms, 2.078 ms] 553.417 µs (37.5%)
tracing 2.007 ms [1.958 ms, 2.055 ms] 531.414 µs (36.0%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~54de40f50a, baseline=1.50.0-SNAPSHOT~e5785f7306
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.485 s) : 15485000, 15485000
.   : milestone, 15485000,
appsec (14.993 s) : 14993000, 14993000
.   : milestone, 14993000,
iast (19.109 s) : 19109000, 19109000
.   : milestone, 19109000,
iast_GLOBAL (17.645 s) : 17645000, 17645000
.   : milestone, 17645000,
profiling (15.137 s) : 15137000, 15137000
.   : milestone, 15137000,
tracing (14.84 s) : 14840000, 14840000
.   : milestone, 14840000,
section candidate
no_agent (15.319 s) : 15319000, 15319000
.   : milestone, 15319000,
appsec (15.377 s) : 15377000, 15377000
.   : milestone, 15377000,
iast (18.916 s) : 18916000, 18916000
.   : milestone, 18916000,
iast_GLOBAL (17.886 s) : 17886000, 17886000
.   : milestone, 17886000,
profiling (15.628 s) : 15628000, 15628000
.   : milestone, 15628000,
tracing (15.149 s) : 15149000, 15149000
.   : milestone, 15149000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.485 s [15.485 s, 15.485 s] -
appsec 14.993 s [14.993 s, 14.993 s] -492.0 ms (-3.2%)
iast 19.109 s [19.109 s, 19.109 s] 3.624 s (23.4%)
iast_GLOBAL 17.645 s [17.645 s, 17.645 s] 2.16 s (13.9%)
profiling 15.137 s [15.137 s, 15.137 s] -348.0 ms (-2.2%)
tracing 14.84 s [14.84 s, 14.84 s] -645.0 ms (-4.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.319 s [15.319 s, 15.319 s] -
appsec 15.377 s [15.377 s, 15.377 s] 58.0 ms (0.4%)
iast 18.916 s [18.916 s, 18.916 s] 3.597 s (23.5%)
iast_GLOBAL 17.886 s [17.886 s, 17.886 s] 2.567 s (16.8%)
profiling 15.628 s [15.628 s, 15.628 s] 309.0 ms (2.0%)
tracing 15.149 s [15.149 s, 15.149 s] -170.0 ms (-1.1%)

@mcculls mcculls marked this pull request as ready for review May 11, 2025 17:45
@mcculls mcculls requested a review from a team as a code owner May 11, 2025 17:45
@datadog-datadog-prod-us1
Copy link
Contributor

Datadog Summary

✅ Code Quality    ✅ Code Security    ✅ Dependencies


Was this helpful? Give us feedback!

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.

Thank for cleaning up.
I will follow up with another clean up PR: #8801

@mcculls mcculls marked this pull request as draft May 12, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants