feat(dogstatsd): enable ADP for dogstatsd with only data_plane.dogstatsd.enabled#1399
feat(dogstatsd): enable ADP for dogstatsd with only data_plane.dogstatsd.enabled#1399
Conversation
…lags - Changed `enabled` field from `bool` to `Option<bool>` so it can be unset - When unset, ADP is considered enabled if at least one data pipeline is enabled - When explicitly set to `false`, acts as a global kill switch regardless of pipeline flags - Added unit tests covering all four combinations of enabled/pipeline flags - Added integration test case for DogStatsD-only enabled scenario Rationale: Users should not need to set both `data_plane.enabled=true` and `data_plane.dogstatsd.enabled=true` to enable ADP for DogStatsD; enabling a pipeline flag alone should be sufficient. This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md)
Binary Size Analysis (Agent Data Plane)Target: 4e9276f (baseline) vs dbac343 (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
core |
-17.34 KiB | 638 |
tracing |
-5.02 KiB | 4 |
alloc |
+4.69 KiB | 44 |
http_body_util |
+4.29 KiB | 40 |
[Unmapped] |
-3.76 KiB | 1 |
figment |
+2.73 KiB | 27 |
anon.b2c124a4a764227177a2e69f4bf88554.7.llvm.11462414956994612189 |
+2.71 KiB | 1 |
anon.8dfae574f2cebb833d078f1b121a54ab.181.llvm.7489912710204160194 |
-2.71 KiB | 1 |
serde_core |
-2.68 KiB | 19 |
anon.fc2436bb87d535a59cfed3c75604fc87.289.llvm.4964930560005435172 |
+1.92 KiB | 1 |
anon.eac1aa767a05ae3341a8290bfd263ac1.10.llvm.7362130234543058777 |
-1.92 KiB | 1 |
tonic |
-1.77 KiB | 24 |
[sections] |
-1.71 KiB | 7 |
anon.bf04a810f47ca408d9471bdd5a59a326.586.llvm.16309705619652496684 |
-1.32 KiB | 1 |
anon.e9e5ef4d4f26f6bd55264b1fbd6ba736.261.llvm.2971474945893283995 |
+1.32 KiB | 1 |
hyper_util |
+1.26 KiB | 2 |
anon.11b755567b9f123438014fb313ec276d.1.llvm.7444065669723707366 |
+1.26 KiB | 1 |
anon.f7cb6ece189f943ad3de3f538e5380f4.76.llvm.4520591679099266948 |
+1.26 KiB | 1 |
anon.31a65ba2cf758b25104a1e46cb31b26f.15.llvm.5267623360349016472 |
-1.26 KiB | 1 |
anon.31a65ba2cf758b25104a1e46cb31b26f.19.llvm.5267623360349016472 |
-1.26 KiB | 1 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
+48% +17.1Ki +48% +17.1Ki agent_data_plane::cli::run::create_topology::_{{closure}}::haa2df0a3e1efb1ab
[NEW] +4.95Ki [NEW] +458 core::ptr::drop_in_place<core::iter::adapters::map::Map<std::collections::hash::map::IntoIter<axum::routing::RouteId,axum::routing::Endpoint<saluki_app::metrics::api::MetricsHandlerState>>,axum::routing::path_router::PathRouter<saluki_app::metrics::api::MetricsHandlerState,_>::with_state<$LP$$RP$>::{{closure}}>>::h6d2d91e576d61cb4
[NEW] +3.87Ki [NEW] +3.71Ki _<futures_util::future::try_future::AndThen<Fut1,Fut2,F> as core::future::future::Future>::poll::h01f194aaab3a92f5
[NEW] +2.96Ki [NEW] +2.81Ki _<futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::h9a982f2bed4dcfdc
[NEW] +2.71Ki [NEW] +74 anon.b2c124a4a764227177a2e69f4bf88554.7.llvm.11462414956994612189
+12e2% +2.30Ki [ = ] 0 _<http_body_util::combinators::map_err::MapErr<B,F> as http_body::Body>::size_hint::hbf3dd790466cc211
[NEW] +1.92Ki [NEW] +77 anon.fc2436bb87d535a59cfed3c75604fc87.289.llvm.4964930560005435172
+297% +1.52Ki [ = ] 0 _<std::sync::poison::PoisonError<T> as core::fmt::Debug>::fmt::h8adc8324734ba3df
[NEW] +1.39Ki [NEW] +1.22Ki serde_json::value::de::_<impl serde_core::de::Deserializer for serde_json::value::Value>::deserialize_seq::ha6b089907155e883
[NEW] +1.32Ki [NEW] +1.15Ki serde_json::value::de::_<impl serde_core::de::Deserializer for serde_json::value::Value>::deserialize_seq::h14386e55d7ab840b
[DEL] -1.32Ki [DEL] -77 anon.bf04a810f47ca408d9471bdd5a59a326.586.llvm.16309705619652496684
-72.7% -1.40Ki [ = ] 0 _<std::sync::poison::PoisonError<T> as core::fmt::Debug>::fmt::hd5864e040c231f89
[DEL] -1.92Ki [DEL] -77 anon.eac1aa767a05ae3341a8290bfd263ac1.10.llvm.7362130234543058777
[DEL] -2.71Ki [DEL] -74 anon.8dfae574f2cebb833d078f1b121a54ab.181.llvm.7489912710204160194
[DEL] -3.00Ki [DEL] -2.85Ki _<futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll::hb3515fe31c6718f4
-47.9% -3.76Ki [ = ] 0 [Unmapped]
[DEL] -3.94Ki [DEL] -3.71Ki _<futures_util::future::try_future::try_flatten::TryFlatten<Fut,<Fut as futures_core::future::TryFuture>::Ok> as core::future::future::Future>::poll::h5f5b7cb009d5f51c
[DEL] -4.95Ki [DEL] -458 core::ptr::drop_in_place<core::iter::adapters::map::Map<std::collections::hash::map::IntoIter<axum::routing::RouteId,axum::routing::Endpoint<saluki_app::logging::api::LoggingHandlerState>>,axum::routing::path_router::PathRouter<saluki_app::logging::api::LoggingHandlerState,_>::with_state<$LP$$RP$>::{{closure}}>>::hdde81fefc0c21c36
-41.2% -5.11Ki -41.7% -5.11Ki _<tracing::instrument::Instrumented<T> as core::future::future::Future>::poll::h7f1513ca620569d3
-0.3% -14.8Ki -0.4% -13.5Ki [2587 Others]
-10.5% -17.0Ki -10.5% -17.0Ki agent_data_plane::cli::run::handle_run_command::_{{closure}}::h539a78526b3dc637
-0.1% -19.8Ki -0.1% -16.2Ki TOTAL
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: 88948583-c57d-4eda-8b8c-f342a72184ec Baseline: 4e9276f Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.01 | [-0.13, +0.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | -0.79 | [-4.75, +3.18] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | -4.36 | [-4.66, -4.06] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | +7.36 | [-24.41, +39.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_cpu | % cpu utilization | +4.40 | [+2.55, +6.24] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | +3.17 | [-53.01, +59.35] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | +2.94 | [-2.92, +8.79] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | +2.16 | [-51.75, +56.07] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_cpu | % cpu utilization | +1.51 | [-0.47, +3.49] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_cpu | % cpu utilization | +1.35 | [-0.41, +3.11] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | +1.10 | [+0.95, +1.26] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | +0.67 | [-0.79, +2.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | +0.37 | [+0.20, +0.54] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | +0.28 | [+0.13, +0.43] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | +0.16 | [-0.01, +0.33] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | +0.07 | [-0.08, +0.22] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | +0.02 | [-0.15, +0.20] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | +0.01 | [-0.01, +0.03] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.05, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | -0.00 | [-0.01, +0.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_throughput | ingress throughput | -0.00 | [-0.02, +0.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_throughput | ingress throughput | -0.00 | [-0.02, +0.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.06, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | -0.01 | [-0.13, +0.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.01 | [-0.13, +0.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | -0.07 | [-0.23, +0.08] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | -0.15 | [-0.27, -0.03] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_memory | memory utilization | -0.25 | [-0.52, +0.03] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | -0.26 | [-0.39, -0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | -0.27 | [-0.29, -0.24] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_memory | memory utilization | -0.30 | [-0.50, -0.11] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | -0.31 | [-0.45, -0.17] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | -0.35 | [-0.50, -0.20] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_memory | memory utilization | -0.41 | [-0.59, -0.22] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | -0.73 | [-0.85, -0.60] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | -0.79 | [-4.75, +3.18] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | -1.38 | [-8.12, +5.35] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | -4.36 | [-4.66, -4.06] | 1 | (metrics) (profiles) (logs) |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
|---|---|---|---|---|---|
| ✅ | quality_gates_rss_dsd_heavy | memory_usage | 10/10 | 119.16MiB ≤ 140MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | 39.97MiB ≤ 50MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | 59.88MiB ≤ 75MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | 175.52MiB ≤ 200MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | 27.38MiB ≤ 40MiB | (metrics) (profiles) (logs) |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
Summary
Mirrors the change made in DataDog/datadog-agent#49409 for the saluki side.
data_plane.enabled: trueanddata_plane.dogstatsd.enabled: true.data_plane.dogstatsd.enabled: truealone is sufficient —data_plane.enabledno longer needs to be set explicitly.data_plane.enabledis explicitly set tofalse(via config file orDD_DATA_PLANE_ENABLED=false), it still acts as a global kill switch and disables ADP for dogstatsd regardless of the per-feature flag.Before
After
Implementation
The key change is in
DataPlaneConfigurationinconfig.rs:enabledis now stored asOption<bool>instead ofbool, preserving the distinction between "not configured" and "explicitly set to false".enabled()now returnstruewhendata_plane.enabledis not set (None) and at least one data pipeline (e.g. dogstatsd) is enabled — mirroring theIsConfiguredcheck in the Go implementation.enabled()still returnsfalseimmediately whendata_plane.enabledis explicitlyfalse.No changes are needed in
run.rs— the existing guardif !in_standalone_mode && !dp_config.enabled()works correctly with the updated method.Test plan
test_dogstatsd_only_enables_adp—data_plane.dogstatsd.enabled: truealone enables ADPtest_global_disabled_overrides_dogstatsd—data_plane.enabled: falsedisables ADP even when dogstatsd is enabledtest_nothing_configured_not_enabled— no config → ADP not enabledtest_explicit_enabled_true_with_no_pipelines—data_plane.enabled: truealone still enables ADP (existing behavior preserved)dogstatsd-only-enabled— verifies DSD starts with onlyDD_DATA_PLANE_DOGSTATSD_ENABLED=true🤖 Generated with Claude Code