chore(app): dynamically publish config API via supervised worker#1635
Conversation
Binary Size Analysis (Agent Data Plane)Target: 79b8351 (baseline) vs cf5360f (comparison) diff
|
| 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
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (35)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA 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 ( |
e749202 to
08c8463
Compare
There was a problem hiding this comment.
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
ConfigWorkerinsaluki-app::configthat wrapsConfigAPIHandlerand asserts aDynamicRouteon the privileged endpoint. - Make
ConfigAPIHandler::newprivate since construction now flows throughConfigWorker. - Register
ConfigWorkerwith the control-plane supervisor in ADP and remove the static handler attachment on the privileged API builder. - Add an integration assertion that the
/configendpoint 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.
08c8463 to
cf5360f
Compare
## 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

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
ConfigAPIHandlerbefore this PR as well, but... 🤷🏻Change Type
How did you test this PR?
/configendpoint still worked.privileged-api-endpointsintegration test to assert the/configexists.References
DADP-2