Skip to content

chore(app): dynamically publish config API via supervised worker#1635

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
tobz/config-api-worker-dynamic-route
May 13, 2026
Merged

chore(app): dynamically publish config API via supervised worker#1635
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
tobz/config-api-worker-dynamic-route

Conversation

@tobz
Copy link
Copy Markdown
Member

@tobz tobz commented May 13, 2026

Summary

This PR wraps up the config API handler into a supervised worker to take advantage of the dynamic route publishing capabilities of the (un)privileged API builders.

Really, it's more unification than anything else since we were able to directly construct ConfigAPIHandler before this PR as well, but... 🤷🏻

Change Type

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

How did you test this PR?

  • Built and ran ADP locally, ensuring the /config endpoint still worked.
  • Added a new assertion to the privileged-api-endpoints integration test to assert the /config exists.

References

DADP-2

@dd-octo-sts dd-octo-sts Bot added area/core Core functionality, event model, etc. area/observability Internal observability of ADP and Saluki. area/test All things testing: unit/integration, correctness, SMP regression, etc. labels May 13, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 13, 2026

Binary Size Analysis (Agent Data Plane)

Target: 79b8351 (baseline) vs cf5360f (comparison) diff
Analysis Type: Stripped binaries (debug symbols excluded)
Baseline Size: 37.16 MiB
Comparison Size: 37.18 MiB
Size Change: +24.70 KiB (+0.06%)
Pass/Fail Threshold: +5%
Result: PASSED ✅

Changes by Module

Module File Size Symbols
axum -17.63 KiB 90
agent_data_plane::main +16.42 KiB 1
tokio -15.50 KiB 458
hyper -11.04 KiB 83
memory_accounting::allocator::Tracked -9.93 KiB 4
tracing +9.73 KiB 8
core +9.45 KiB 1231
prost +9.39 KiB 24
agent_data_plane::internal::env -8.54 KiB 18
http +7.97 KiB 50
bytes +7.92 KiB 18
http_body_util -7.69 KiB 33
tonic +7.20 KiB 95
agent_data_plane::state::metrics +7.13 KiB 7
agent_data_plane::cli::run +6.86 KiB 6
tracing_subscriber +6.60 KiB 45
saluki_core::state::reflector -6.59 KiB 3
hyper_util +5.89 KiB 8
[Unmapped] +5.05 KiB 1
[sections] +4.96 KiB 7

Detailed Symbol Changes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +97% +28.3Ki   +98% +28.3Ki    agent_data_plane::internal::env::workload::RemoteAgentWorkloadProvider::from_configuration::_{{closure}}::h97d49d4a1e26a4f3
 +28e2% +16.4Ki +32e2% +16.4Ki    agent_data_plane::main::h223e4c7cf2a90878
  +0.2% +14.4Ki  +0.2% +12.7Ki    [5129 Others]
  +241% +13.5Ki  +245% +13.5Ki    h2::proto::connection::DynConnection<B>::recv_frame::hfab6ab4a3734ad96
  +784% +8.39Ki  +898% +8.39Ki    _<h2::client::Connection<T,B> as core::future::future::Future>::poll::hacfb4fc22e8adf10
 +10e2% +8.27Ki +12e2% +8.27Ki    agent_data_plane::state::metrics::rules::get_datadog_agent_remappings::h46c3a8bdae4c194b
  +767% +8.21Ki  +878% +8.21Ki    _<h2::client::Connection<T,B> as core::future::future::Future>::poll::h241007b1009d6884
  [NEW] +8.06Ki  [NEW] +7.96Ki    h2::proto::connection::Connection<T,P,B>::poll::hbf637e8282ee52ce
  [NEW] +7.85Ki  [NEW] +7.75Ki    h2::proto::connection::Connection<T,P,B>::poll::hb26d67be8515a2ca
  [NEW] +7.45Ki  [NEW] +7.29Ki    _<hyper::server::conn::http1::Connection<I,S> as core::future::future::Future>::poll::h36bda8f6febda62a
  [NEW] +7.39Ki  [NEW] +7.24Ki    _<hyper::server::conn::http1::Connection<I,S> as core::future::future::Future>::poll::h2642025dbbb3c284
  [NEW] +7.34Ki  [NEW] +7.20Ki    _<tracing::instrument::Instrumented<T> as core::future::future::Future>::poll::h802d74003f6fa7ec
 -95.2% -7.12Ki -97.1% -7.12Ki    _<memory_accounting::allocator::Tracked<Inner> as core::future::future::Future>::poll::h1d58add409bf5817
  [DEL] -8.10Ki  [DEL] -7.98Ki    agent_data_plane::state::metrics::rules::dogstatsd::get_dogstatsd_remappings::hd9a85f5e0d91a339
  [DEL] -8.82Ki  [DEL] -8.72Ki    h2::proto::connection::Connection<T,P,B>::poll::h2c59aeab903f19ba
  [DEL] -9.08Ki  [DEL] -8.98Ki    h2::proto::connection::Connection<T,P,B>::poll::hdde276d8cbad2ca6
  [DEL] -11.7Ki  [DEL] -11.6Ki    h2::server::Connection<T,B>::poll_closed::h67d407d0bcead28d
  [DEL] -12.4Ki  [DEL] -12.3Ki    h2::server::Connection<T,B>::poll_closed::h1fdd5799bc823cc4
  [DEL] -16.7Ki  [DEL] -16.6Ki    tokio::runtime::runtime::Runtime::block_on::hb98f1abd9d0b1b7f
 -51.8% -17.5Ki -52.0% -17.4Ki    agent_data_plane::internal::env::ADPEnvironmentProvider::from_configuration::_{{closure}}::h30b96d76b3b1410d
 -50.8% -19.6Ki -51.0% -19.6Ki    agent_data_plane::internal::env::workload::build_collector::_{{closure}}::haa327b514d6bc2f0
  +0.1% +24.7Ki  +0.1% +22.9Ki    TOTAL

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 13, 2026

Regression Detector (Agent Data Plane)

Run ID: 369f4ecb-f389-4f47-ab44-17cbf9e64fae
Baseline: 79b83510 · Comparison: cf5360f7 · Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (35)

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
dsd_uds_10mb_3k_contexts_cpu (erratic) cpu ⚪ +4.75 metrics profiles logs
dsd_uds_500mb_3k_contexts_throughput throughput ⚪ -3.00 metrics profiles logs
dsd_uds_100mb_3k_contexts_cpu (erratic) cpu ⚪ +1.11 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_cpu (erratic) cpu ⚪ +0.54 metrics profiles logs
otlp_ingest_metrics_5mb_memory memory ⚪ +0.29 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_cpu (erratic) cpu ⚪ +0.23 metrics profiles logs
otlp_ingest_traces_5mb_cpu (erratic) cpu ⚪ +0.19 metrics profiles logs
otlp_ingest_logs_5mb_memory (ignored) memory ⚪ +0.11 metrics profiles logs
otlp_ingest_logs_5mb_throughput (ignored) throughput ⚪ -0.02 metrics profiles logs
dsd_uds_10mb_3k_contexts_throughput throughput ⚪ -0.01 metrics profiles logs
dsd_uds_100mb_3k_contexts_throughput throughput ⚪ -0.01 metrics profiles logs
otlp_ingest_metrics_5mb_throughput throughput ⚪ -0.01 metrics profiles logs
dsd_uds_1mb_3k_contexts_throughput throughput ⚪ +0.00 metrics profiles logs
dsd_uds_512kb_3k_contexts_throughput throughput ⚪ +0.00 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_throughput throughput ⚪ +0.01 metrics profiles logs
otlp_ingest_traces_5mb_throughput throughput ⚪ +0.06 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_throughput throughput ⚪ +0.10 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ -0.16 metrics profiles logs
otlp_ingest_metrics_5mb_cpu (erratic) cpu ⚪ -0.17 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_memory memory ⚪ -0.23 metrics profiles logs
otlp_ingest_traces_5mb_memory memory ⚪ -0.38 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_memory memory ⚪ -0.39 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.43 metrics profiles logs
dsd_uds_100mb_3k_contexts_memory memory ⚪ -0.48 metrics profiles logs
dsd_uds_1mb_3k_contexts_memory memory ⚪ -0.50 metrics profiles logs
dsd_uds_10mb_3k_contexts_memory memory ⚪ -0.51 metrics profiles logs
dsd_uds_500mb_3k_contexts_cpu (erratic) cpu ⚪ -0.52 metrics profiles logs
dsd_uds_512kb_3k_contexts_memory memory ⚪ -0.56 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ -0.56 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.56 metrics profiles logs
dsd_uds_500mb_3k_contexts_memory memory ⚪ -0.67 metrics profiles logs
quality_gates_rss_idle memory ⚪ -1.07 metrics profiles logs
otlp_ingest_logs_5mb_cpu (ignored) cpu ⚪ -1.68 metrics profiles logs
dsd_uds_1mb_3k_contexts_cpu (erratic) cpu ⚪ -4.51 metrics profiles logs
dsd_uds_512kb_3k_contexts_cpu (erratic) cpu ⚪ -4.80 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 122 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 39.4 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 60.9 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 178 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 26.6 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.

@tobz tobz force-pushed the tobz/config-api-worker-dynamic-route branch from e749202 to 08c8463 Compare May 13, 2026 03:31
@dd-octo-sts dd-octo-sts Bot removed the area/core Core functionality, event model, etc. label May 13, 2026
@tobz tobz added the type/chore Updates to dependencies or general "administrative" tasks necessary to maintain the codebase/repo. label May 13, 2026
@tobz tobz marked this pull request as ready for review May 13, 2026 12:26
@tobz tobz requested a review from a team as a code owner May 13, 2026 12:26
Copilot AI review requested due to automatic review settings May 13, 2026 12:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the configuration API into a ConfigWorker that implements Supervisable, asserting its routes via the DataspaceRegistry/DynamicRoute mechanism instead of being attached statically to the privileged DynamicAPIBuilder. This unifies the config endpoint with other workers (logging, metrics, health, memory) that already register routes dynamically.

Changes:

  • Add ConfigWorker in saluki-app::config that wraps ConfigAPIHandler and asserts a DynamicRoute on the privileged endpoint.
  • Make ConfigAPIHandler::new private since construction now flows through ConfigWorker.
  • Register ConfigWorker with the control-plane supervisor in ADP and remove the static handler attachment on the privileged API builder.
  • Add an integration assertion that the /config endpoint is reachable on the privileged API.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lib/saluki-app/src/config.rs Introduces ConfigWorker implementing Supervisable; updates docs and visibility of ConfigAPIHandler::new.
bin/agent-data-plane/src/internal/control_plane.rs Replaces static ConfigAPIHandler registration with the new ConfigWorker added to the supervisor.
test/integration/cases/privileged-api-endpoints/config.yaml Adds an http_check assertion ensuring /config is exposed on the privileged endpoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tobz tobz changed the base branch from tobz/logging-metrics-override-dynamic-routes to graphite-base/1635 May 13, 2026 18:37
@tobz tobz force-pushed the tobz/config-api-worker-dynamic-route branch from 08c8463 to cf5360f Compare May 13, 2026 19:05
@tobz tobz force-pushed the graphite-base/1635 branch from 14bbe0e to 79b8351 Compare May 13, 2026 19:05
@tobz tobz changed the base branch from graphite-base/1635 to main May 13, 2026 19:05
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 2167344 into main May 13, 2026
75 checks passed
dd-octo-sts Bot pushed a commit that referenced this pull request May 13, 2026
## Summary

This PR wraps up the config API handler into a supervised worker to take advantage of the dynamic route publishing capabilities of the (un)privileged API builders.

Really, it's more unification than anything else since we were able to directly construct `ConfigAPIHandler` before this PR as well, but... 🤷🏻

## Change Type
- [ ] Bug fix
- [ ] New feature
- [x] Non-functional (chore, refactoring, docs)
- [ ] Performance

## How did you test this PR?

- [x] Built and ran ADP locally, ensuring the `/config` endpoint still worked.
- [x] Added a new assertion to the `privileged-api-endpoints` integration test to assert the `/config` exists.

## References

DADP-2

Co-authored-by: toby.lawrence <toby.lawrence@datadoghq.com> 2167344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/observability Internal observability of ADP and Saluki. area/test All things testing: unit/integration, correctness, SMP regression, etc. mergequeue-status: done type/chore Updates to dependencies or general "administrative" tasks necessary to maintain the codebase/repo.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants