Skip to content

Move InferredProxyContext to internal-api… - #8795

Closed
mcculls wants to merge 3 commits into
masterfrom
mcculls/move-inferred-proxy-code-out-of-components
Closed

Move InferredProxyContext to internal-api…#8795
mcculls wants to merge 3 commits into
masterfrom
mcculls/move-inferred-proxy-code-out-of-components

Conversation

@mcculls

@mccullsmcculls commented May 11, 2025

Copy link
Copy Markdown
Contributor

…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)
@mccullsmcculls added comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring labels May 11, 2025
@pr-commenter

pr-commenterBot commented May 11, 2025

Copy link
Copy Markdown

Benchmarks

Startup

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmastermcculls/move-inferred-proxy-code-out-of-components
git_commit_date17470421671747042185
git_commit_shae5785f754de40f
release_version1.50.0-SNAPSHOT~e5785f73061.50.0-SNAPSHOT~54de40f50a
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17470446811747044681
ci_job_id933032565933032565
ci_pipeline_id6475894364758943
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux 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/LinuxLinux 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
moduleAgentAgent
parentNoneNone
variantiastiast

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
ModuleVariantDurationΔ tracing
Agenttracing1.025 s-
Agentappsec1.162 s136.448 ms (13.3%)
Agentiast1.15 s125.17 ms (12.2%)
Agentprofiling1.28 s254.356 ms (24.8%)
Totaltracing10.496 s-
Totalappsec10.677 s181.56 ms (1.7%)
Totaliast10.897 s401.565 ms (3.8%)
Totalprofiling10.839 s343.205 ms (3.3%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.027 s-
Agentappsec1.164 s136.401 ms (13.3%)
Agentiast1.157 s129.694 ms (12.6%)
Agentprofiling1.282 s254.613 ms (24.8%)
Totaltracing10.483 s-
Totalappsec10.687 s204.369 ms (1.9%)
Totaliast10.935 s452.07 ms (4.3%)
Totalprofiling10.916 s432.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
ModuleVariantDurationΔ tracing
Agenttracing1.029 s-
Agentiast1.156 s127.614 ms (12.4%)
Agentiast_HARDCODED_SECRET_DISABLED1.148 s119.612 ms (11.6%)
Agentiast_TELEMETRY_OFF1.162 s133.34 ms (13.0%)
Totaltracing8.68 s-
Totaliast9.228 s547.186 ms (6.3%)
Totaliast_HARDCODED_SECRET_DISABLED9.175 s494.989 ms (5.7%)
Totaliast_TELEMETRY_OFF9.278 s597.324 ms (6.9%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.02 s-
Agentiast1.147 s127.38 ms (12.5%)
Agentiast_HARDCODED_SECRET_DISABLED1.154 s133.802 ms (13.1%)
Agentiast_TELEMETRY_OFF1.152 s131.807 ms (12.9%)
Totaltracing8.644 s-
Totaliast9.235 s590.875 ms (6.8%)
Totaliast_HARDCODED_SECRET_DISABLED9.206 s562.324 ms (6.5%)
Totaliast_TELEMETRY_OFF9.205 s560.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

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmastermcculls/move-inferred-proxy-code-out-of-components
git_commit_date17470421671747042185
git_commit_shae5785f754de40f
release_version1.50.0-SNAPSHOT~e5785f73061.50.0-SNAPSHOT~54de40f50a
See matching parameters
BaselineCandidate
applicationbiojavabiojava
ci_job_date17470442631747044263
ci_job_id933032567933032567
ci_pipeline_id6475894364758943
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux 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/LinuxLinux 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
variantappsecappsec

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
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.471 ms [1.46 ms, 1.483 ms]-
appsec2.406 ms [2.356 ms, 2.456 ms]934.651 µs (63.5%)
iast2.181 ms [2.118 ms, 2.244 ms]709.496 µs (48.2%)
iast_GLOBAL2.22 ms [2.157 ms, 2.282 ms]748.352 µs (50.9%)
profiling2.024 ms [1.974 ms, 2.073 ms]552.185 µs (37.5%)
tracing2.006 ms [1.958 ms, 2.055 ms]534.941 µs (36.4%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.475 ms [1.464 ms, 1.487 ms]-
appsec2.408 ms [2.358 ms, 2.458 ms]932.896 µs (63.2%)
iast2.189 ms [2.126 ms, 2.252 ms]713.844 µs (48.4%)
iast_GLOBAL2.22 ms [2.158 ms, 2.283 ms]745.0 µs (50.5%)
profiling2.029 ms [1.979 ms, 2.078 ms]553.417 µs (37.5%)
tracing2.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
VariantExecution Time [CI 0.99]Δ no_agent
no_agent15.485 s [15.485 s, 15.485 s]-
appsec14.993 s [14.993 s, 14.993 s]-492.0 ms (-3.2%)
iast19.109 s [19.109 s, 19.109 s]3.624 s (23.4%)
iast_GLOBAL17.645 s [17.645 s, 17.645 s]2.16 s (13.9%)
profiling15.137 s [15.137 s, 15.137 s]-348.0 ms (-2.2%)
tracing14.84 s [14.84 s, 14.84 s]-645.0 ms (-4.2%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent15.319 s [15.319 s, 15.319 s]-
appsec15.377 s [15.377 s, 15.377 s]58.0 ms (0.4%)
iast18.916 s [18.916 s, 18.916 s]3.597 s (23.5%)
iast_GLOBAL17.886 s [17.886 s, 17.886 s]2.567 s (16.8%)
profiling15.628 s [15.628 s, 15.628 s]309.0 ms (2.0%)
tracing15.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 ownerMay 11, 2025 17:45
@datadog-datadog-prod-us1

Copy link
Copy Markdown
Contributor

Datadog Summary

✅ Code Quality✅ Code Security✅ Dependencies


Was this helpful? Give us feedback!

@PerfectSlayerPerfectSlayer left a comment

Copy link
Copy Markdown
Collaborator

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
@mccullsmcculls closed this May 16, 2025
@mcculls
mcculls deleted the mcculls/move-inferred-proxy-code-out-of-components branch May 16, 2025 14:20
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: coreTracer coretag: no release notesChanges to exclude from release notestype: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mcculls@PerfectSlayer