Skip to content

feat(config): model the APM proxy on the trace-agent's receiver settings - #2707

Draft
ajgajg1134 wants to merge 1 commit into
mainfrom
andrew.glaude/apm-proxy-config
Draft

ajgajg1134 wants to merge 1 commit into
mainfrom
andrew.glaude/apm-proxy-config

Conversation

@ajgajg1134

Copy link
Copy Markdown
Contributor

Summary

Reworks the APM config for a new approach. Instead of ADP running a v1.0 trace receiver on its own port next to the trace-agent, ADP now runs as an experimental proxy in front of the trace-agent. It listens exactly where the trace-agent normally listens, handles /v1.0/traces itself (eventually feeding the full trace pipeline), and proxies everything else to the trace-agent, which the Datadog Agent moves to a new address.

This PR replaces the unreleased data_plane.apm.* settings from #2593 with:

Key Kind Purpose
data_plane.experimental.apm.enabled Saluki-only Gates the proxy (control.apm), default false
data_plane.experimental.apm.proxy_destination Saluki-only Relocated trace-agent URL, http://host:port or unix:///path, default http://127.0.0.1:8127
apm_config.receiver_port Datadog, now supported Where ADP listens (TCP), default 8126, 0 disables
apm_config.receiver_socket Datadog, now supported Where ADP listens (UDS), default /var/run/datadog/apm.socket on Linux/AIX
apm_config.apm_non_local_traffic Datadog, now supported Bind all interfaces

Other changes:

  • bind_host moves from the DogStatsD domain to shared, since both DogStatsD and APM now read it.
  • apm_config.receiver_socket's default depends on the platform, which the generated model can't express, so the translator applies the Linux/AIX default when the key is unset. An explicit "" still disables the socket, as it does for the trace-agent.
  • The default destination is a literal 127.0.0.1 rather than localhost, so ADP and the trace-agent can't resolve the name to different address families.

Nothing consumes domains.apm yet. The relay that uses it is the next PR in the stack. The matching Datadog Agent change (relocating the trace-agent when the proxy is enabled) is tracked separately.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

  • New translator tests: receiver settings reach domains.apm, defaults match the trace-agent (including the platform socket default), an empty socket disables it, out-of-range ports record errors
  • Updated the Saluki-only seed test for the new keys
  • cargo nextest run --workspace: 3334/3334 passed
  • make check-all: clean

References

Part of #2438 (Datadog-native intake). Replaces the settings added in #2593, which haven't shipped in any release.

🤖 Generated with Claude Code

Replace the unreleased `data_plane.apm.*` settings with configuration for
an experimental APM proxy. With the proxy enabled, ADP takes over the
trace-agent's receiver: it listens where the trace-agent normally does and
forwards requests to the trace-agent, which the Datadog Agent relocates.

- `data_plane.experimental.apm.enabled` gates the proxy (`control.apm`).
- `data_plane.experimental.apm.proxy_destination` is the relocated
  trace-agent's URL, `http://` or `unix://`, defaulting to
  `http://127.0.0.1:8127`.
- `apm_config.receiver_port`, `apm_config.receiver_socket`, and
  `apm_config.apm_non_local_traffic` move from excluded to supported, so ADP
  binds exactly what tracers are configured to reach. The receiver socket's
  Linux/AIX platform default is applied in translation, since the generated
  model cannot express it.
- `bind_host` moves from the DogStatsD domain to the shared configuration,
  now that both DogStatsD and APM read it.

Nothing consumes the APM domain yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ajgajg1134 ajgajg1134 added the changelog/no-changelog No changelog entry needed label Sep 28, 2026
@dd-octo-sts dd-octo-sts Bot added the area/docs Reference documentation. label Sep 28, 2026
@pr-commenter

pr-commenter Bot commented Sep 28, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 60cea0c · Comparison: aee0e66 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 39.50 MiB (baseline) vs 39.51 MiB (comparison)
Size Change: +18.91 KiB (+0.05%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
anon.a6926c6c21417749435f71dba1b992d8.989.llvm.108194269033826922 +20.80 KiB 1
anon.a6926c6c21417749435f71dba1b992d8.976.llvm.1534094455157536209 -20.54 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.11.llvm.2053145391855355513 -17.32 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.11.llvm.16669733176756370272 +17.24 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.767.llvm.2053145391855355513 -15.16 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.767.llvm.16669733176756370272 +15.07 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.765.llvm.16669733176756370272 +13.28 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.765.llvm.2053145391855355513 -13.28 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.733.llvm.16669733176756370272 +11.39 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.733.llvm.2053145391855355513 -11.39 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.0.llvm.16669733176756370272 +9.19 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.0.llvm.2053145391855355513 -9.18 KiB 1
anon.f71f1b8f5a26a3332f44ce4b0af26716.154.llvm.6764073306201615899 +8.14 KiB 1
anon.8d62efd5d2dcbce609fa35662e30e445.741.llvm.8684461562703359334 -7.96 KiB 1
anon.f71f1b8f5a26a3332f44ce4b0af26716.221.llvm.6764073306201615899 +7.67 KiB 1
anon.8d62efd5d2dcbce609fa35662e30e445.596.llvm.8684461562703359334 -7.49 KiB 1
serde_core +7.42 KiB 37
anon.c25221ffba0af0c8b9dc4d5753a05458.1.llvm.4585998368775145988 -6.59 KiB 1
anon.f6162508d915b5ad49902bb07ac800ce.162.llvm.3343112326983748776 +6.59 KiB 1
anon.d6f5d974d073ad08c76103565ac8e826.604.llvm.16669733176756370272 +6.46 KiB 1
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW] +20.8Ki  [NEW] +20.7Ki    anon.a6926c6c21417749435f71dba1b992d8.989.llvm.108194269033826922
  [NEW] +17.2Ki  [NEW]     +76    anon.d6f5d974d073ad08c76103565ac8e826.11.llvm.16669733176756370272
  [NEW] +15.1Ki  [NEW]     +81    anon.d6f5d974d073ad08c76103565ac8e826.767.llvm.16669733176756370272
  [NEW] +13.3Ki  [NEW]     +82    anon.d6f5d974d073ad08c76103565ac8e826.765.llvm.16669733176756370272
  [NEW] +11.4Ki  [NEW]     +81    anon.d6f5d974d073ad08c76103565ac8e826.733.llvm.16669733176756370272
  [NEW] +9.19Ki  [NEW]     +81    anon.d6f5d974d073ad08c76103565ac8e826.0.llvm.16669733176756370272
  [NEW] +8.14Ki  [NEW]     +79    anon.f71f1b8f5a26a3332f44ce4b0af26716.154.llvm.6764073306201615899
  [NEW] +7.67Ki  [NEW]     +91    anon.f71f1b8f5a26a3332f44ce4b0af26716.221.llvm.6764073306201615899
  +0.1% +5.46Ki  +0.2% +7.67Ki    [9902 Others]
  [NEW] +6.59Ki  [NEW]     +77    anon.f6162508d915b5ad49902bb07ac800ce.162.llvm.3343112326983748776
  [NEW] +6.54Ki  [NEW]    +132    _<<datadog_agent_config::generated::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::generated::datadog_configuration::ApmConfig>::deserialize::__Visitor as serde_core::de::Visitor>::visit_seq::__DeserializeWith as serde_core::de::Deserialize>::deserialize::hcf6bf0926fc0b65c
  [NEW] +6.46Ki  [NEW]     +79    anon.d6f5d974d073ad08c76103565ac8e826.604.llvm.16669733176756370272
  [DEL] -6.59Ki  [DEL]     -77    anon.c25221ffba0af0c8b9dc4d5753a05458.1.llvm.4585998368775145988
  [DEL] -7.49Ki  [DEL]     -91    anon.8d62efd5d2dcbce609fa35662e30e445.596.llvm.8684461562703359334
  [DEL] -7.96Ki  [DEL]     -79    anon.8d62efd5d2dcbce609fa35662e30e445.741.llvm.8684461562703359334
  [DEL] -9.18Ki  [DEL]     -81    anon.d6f5d974d073ad08c76103565ac8e826.0.llvm.2053145391855355513
  [DEL] -11.4Ki  [DEL]     -81    anon.d6f5d974d073ad08c76103565ac8e826.733.llvm.2053145391855355513
  [DEL] -13.3Ki  [DEL]     -82    anon.d6f5d974d073ad08c76103565ac8e826.765.llvm.2053145391855355513
  [DEL] -15.2Ki  [DEL]     -81    anon.d6f5d974d073ad08c76103565ac8e826.767.llvm.2053145391855355513
  [DEL] -17.3Ki  [DEL]     -76    anon.d6f5d974d073ad08c76103565ac8e826.11.llvm.2053145391855355513
  [DEL] -20.5Ki  [DEL] -20.5Ki    anon.a6926c6c21417749435f71dba1b992d8.976.llvm.1534094455157536209
  +0.0% +18.9Ki  +0.0% +8.13Ki    TOTAL

@pr-commenter

pr-commenter Bot commented Sep 28, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: bc870006-3fb0-41c6-bef7-e72212a8160e
Baseline: 60cea0c5 · Comparison: aee0e667 · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_dsd_ultraheavy memory ⚪ +0.92 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ +0.31 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.02 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.21 metrics profiles logs
quality_gates_rss_idle memory ⚪ -0.50 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 231 MiB ≤ 250 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 52.1 MiB ≤ 60 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 92.3 MiB ≤ 100 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 391 MiB ≤ 420 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 33.8 MiB ≤ 40 MiB metrics profiles logs
Explanation

A change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression. Experiments tagged (no analysis) show ⚠️ n/a: SMP ran them but produced no analysis, usually because a replicate failed and exhausted its retries. Check the SMP report for that experiment's replicate failures.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Reference documentation. changelog/no-changelog No changelog entry needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant