Skip to content

feat(adp): apply trace products from remote configuration - #2724

Open
webern wants to merge 2 commits into
m/otlp-smpdecfrom
m/otlp-rcwire
Open

webern wants to merge 2 commits into
m/otlp-smpdecfrom
m/otlp-rcwire

Conversation

@webern

@webern webern commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Human Summary

The final PR in the remote configuration stack. This wires it all together end enables it in ADP's runtime including the configuration values that turn these on and off. If no products are requested, or we are in standalone mode, the remote connection is not created. But if remote configurations are enabled, the subscriptions are created. Either way the respective providers are handed down into the topologies in run.rs.

AI Summary

This PR connects the RC client (#2713) to the trace consumers added in #2718–#2720. Those PRs provide a registry reader and decoders for the APM_SEMANTIC_CORE_DD and APM_SAMPLING products, but their subscriptions are not created by ADP startup. Here startup connects to the core Agent, creates the RC client and enabled product subscriptions, passes their handles into the topology, and runs the RC worker. This is the point at which production components can receive remote semantic mappings and sampling settings.

ADP subscribes only in connected mode with a local trace pipeline and remote_configuration.enabled on. Each product has its own switch: remote_configuration.apm_sampling.enabled defaults on; remote_configuration.apm_semantics.enabled defaults off. If neither product is enabled, ADP makes no RC connection. Without a semantic subscription, OTLP translation and APM stats use embedded mappings; without a sampling subscription, the trace sampler uses its configured settings.

The OTLP source and decoder and APM stats receive clones of one semantic-registry provider; the trace sampler receives its sampling subscription. The RC worker publishes accepted snapshots, and the components read them at their input-buffer boundaries. There is no semantic-registry applier task. The worker runs under a remote-config child supervisor with up to five restarts per 60 seconds. If it exhausts that budget, ADP continues with the last accepted settings. A connection failure during startup still fails startup. RC client logs are enabled in ADP's first-party log allowlist.

Tests cover product gating, avoiding an unused connection, supervisor exhaustion, and configuration-key translation. Live configuration delivery from the core Agent through both consumers has not been tested end to end.

Change Type

  • New feature

How did you test this PR?

  • make fmt, cargo check --workspace, cargo check --workspace --tests, make check-docs, make check-clippy at the stack tip.
  • Filtered saluki-components tests: 549 passed at the stack tip.
  • Filtered agent-data-plane RC and logging tests: 20 passed; make check-release-notes.

References

@webern
webern added this pull request to stack #2721 September 30, 2026 13:47
@dd-octo-sts dd-octo-sts Bot added area/docs Reference documentation. area/test All things testing: unit/integration, correctness, SMP regression, etc. labels Sep 30, 2026
@pr-commenter

pr-commenter Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 216e499 · Comparison: 6bc2a7b · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 38.27 MiB (baseline) vs 38.91 MiB (comparison)
Size Change: +657.48 KiB (+1.68%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
core +251.56 KiB 9418
alloc +115.08 KiB 1729
serde_json +36.61 KiB 544
datadog_agent_remote_config::repository::Repository +33.98 KiB 17
anon.7774f2e379471741c1ed15c646f03bd4.988.llvm.2690645972580669916 +20.80 KiB 1
anon.a6926c6c21417749435f71dba1b992d8.976.llvm.1534094455157536209 -20.54 KiB 1
otlp_protos::otlp_include::opentelemetry -18.43 KiB 181
anyhow +17.37 KiB 1207
saluki_components::common::otlp +17.14 KiB 207
anon.98ddbb4b3d89a784f740dc68a36565b2.177.llvm.6782259302113870848 +16.63 KiB 1
anon.87e7c38bfd928d17fa28187081c51bf0.2.llvm.240572210426274404 -16.09 KiB 1
hashbrown +15.51 KiB 926
anon.248c44458bf0ece589f5735e53ee60c8.5.llvm.5570360124207531632 +15.07 KiB 1
datadog_protos::agent_include::datadog +15.06 KiB 51
agent_data_plane_config::shared::_ -14.78 KiB 20
saluki_components::sources::otlp +14.64 KiB 260
anon.87e7c38bfd928d17fa28187081c51bf0.768.llvm.240572210426274404 -14.62 KiB 1
anon.248c44458bf0ece589f5735e53ee60c8.1194.llvm.5570360124207531632 +13.28 KiB 1
anon.87e7c38bfd928d17fa28187081c51bf0.766.llvm.240572210426274404 -12.84 KiB 1
serde_core +12.77 KiB 459
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +4.2%  +702Ki  +3.9%  +509Ki    [34936 Others]
  [NEW] +60.0Ki  [NEW] +59.8Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::ha38a49b72e023545
  [NEW] +44.0Ki  [NEW] +43.9Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::h6588517f8bc3f488
  [NEW] +43.5Ki  [NEW] +43.3Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::hb872765f165820b0
  [NEW] +39.3Ki  [NEW] +39.2Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h7efc87fb66359c76
  [NEW] +37.0Ki  [NEW] +36.8Ki    _<saluki_components::transforms::apm_stats::ApmStats as saluki_core::components::transforms::Transform>::run::_{{closure}}::h79ca62828ea1b270
  [NEW] +30.9Ki  [NEW] +30.8Ki    datadog_agent_config::generated::witness::drive::hf005d71745a63b77
  [NEW] +30.6Ki  [NEW] +30.4Ki    agent_data_plane::cli::dogstatsd::run_dogstatsd_command::_{{closure}}::h0c5481b3dd25a367
  [NEW] +28.6Ki  [NEW] +28.5Ki    agent_data_plane::dogstatsd_contexts::artifact::for_each_record::hfcdf75836b001dbe
  [NEW] +26.3Ki  [NEW] +26.1Ki    datadog_agent_commons::ipc::client::RemoteAgentClient::connect::_{{closure}}::_{{closure}}::_{{closure}}::hf21742c7f3c24541
  [DEL] -25.6Ki  [DEL] -25.4Ki    agent_data_plane::internal::remote_agent::run_remote_agent_registration_loop::_{{closure}}::h1f55b7becb8f9961
  [DEL] -25.7Ki  [DEL] -25.6Ki    core::ops::function::FnOnce::call_once::h4d6ad556f476b8c9
  [DEL] -28.4Ki  [DEL] -28.2Ki    datadog_agent_commons::ipc::client::RemoteAgentClient::connect::_{{closure}}::_{{closure}}::_{{closure}}::h1bd6a026eeafe819
  [DEL] -28.7Ki  [DEL] -28.6Ki    agent_data_plane::dogstatsd_contexts::artifact::for_each_record::hb60d5262ffff75a0
  [DEL] -31.0Ki  [DEL] -30.9Ki    datadog_agent_config::generated::witness::drive::h5f0a3f05b22b2ac2
  [DEL] -31.4Ki  [DEL] -31.2Ki    agent_data_plane::cli::dogstatsd::run_dogstatsd_command::_{{closure}}::h2f5246c806e7f392
  [DEL] -34.9Ki  [DEL] -34.7Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::haa79196f741be08a
  [DEL] -35.8Ki  [DEL] -35.6Ki    _<saluki_components::transforms::apm_stats::ApmStats as saluki_core::components::transforms::Transform>::run::_{{closure}}::h8bffda5d06bacbfd
  [DEL] -40.5Ki  [DEL] -40.4Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::h02ed82f16b54dbc0
  [DEL] -44.7Ki  [DEL] -44.5Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h252ca254b106e4c3
  [DEL] -58.6Ki  [DEL] -58.5Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h15a965fc1b5a6f1e
  +1.7%  +657Ki  +1.4%  +464Ki    TOTAL

@pr-commenter

pr-commenter Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 096af054-5218-49f4-bfd8-7fcd15b4ed73
Baseline: 216e499a · Comparison: 6bc2a7ba · 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 ⚪ +2.23 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ +0.30 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ +0.26 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.01 metrics profiles logs
quality_gates_rss_idle memory ⚪ -0.07 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 229 MiB ≤ 250 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 51.5 MiB ≤ 60 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 91.9 MiB ≤ 100 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 387 MiB ≤ 420 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 33.4 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.

Comment thread bin/agent-data-plane/src/cli/run.rs Outdated
Comment thread bin/agent-data-plane/src/internal/logging.rs Outdated
@webern
webern force-pushed the m/otlp-rcwire branch 2 times, most recently from 659fa83 to f703b43 Compare October 2, 2026 13:32
@webern
webern marked this pull request as ready for review October 2, 2026 14:35
@webern
webern requested a review from a team as a code owner October 2, 2026 14:35

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

Product gating, subscriptions, supervision, and trace-consumer wiring are internally consistent, with no actionable defect identified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 7665e56 · @DataDog review to ask questions

@webern webern changed the title feat(adp): apply trace products from Remote Configuration feat(adp): apply trace products from remote configuration Oct 2, 2026
webern added 2 commits October 2, 2026 16:47
Build the Remote Configuration client during startup and pass its
subscriptions to the trace sampler, both OTLP ingestion paths and APM
stats.

Enable products only in connected mode with a local trace pipeline,
remote_configuration.enabled and the product switch. Translate the three
Remote Configuration keys from the Agent schema. Sampling defaults on
and semantic configuration defaults off. With no enabled product, do not
connect or start a worker.

Use the configuration stream client name for the Remote Configuration
identity. Connection or subscription setup failures prevent startup.
Disabled products retain static sampler settings and the embedded
registry.

Run the client worker under a remote-config supervisor with five
restarts per 60 seconds. Make that supervisor a temporary child of root
so exhausting its restart budget stops Remote Configuration without
stopping ADP. Consumers retain their last accepted configuration.

Keep the client log target in the first-party allowlist. Add tests for
product gating, configuration translation, the no-connection path,
client naming and restart exhaustion, plus integration cases for
disabled products and a core Agent that refuses Remote Configuration.
Document the supported keys and add a release note.

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. area/test All things testing: unit/integration, correctness, SMP regression, etc.

Projects

None yet

1 participant