enhancement(dogstatsd): read bind_host from config#1413
Conversation
Add 00-panoramic-dynamic.sh cont-init.d script that evaluates
PANORAMIC_DYNAMIC_* env vars as shell commands at container startup,
writes results to /airlock/dynamic/, and resolves {{PANORAMIC_DYNAMIC_*}}
references in DD_* env vars via /run/adp/env/ for s6-envdir.
This is the container-side half of a generic mechanism for runtime-resolved
variables in panoramic integration tests. The script is a no-op when no
PANORAMIC_DYNAMIC_* vars are present.
Refs: #1331
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: c6247b57-01b2-425e-82c9-7cf81fc98f93 Baseline: 4dd143e Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.00 | [-0.13, +0.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | -0.13 | [-4.58, +4.33] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | -0.85 | [-1.12, -0.57] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | +4.06 | [-53.67, +61.80] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | +2.92 | [-4.43, +10.27] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | +2.48 | [-26.47, +31.43] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_cpu | % cpu utilization | +0.89 | [-1.50, +3.28] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | +0.63 | [+0.48, +0.78] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | +0.52 | [+0.36, +0.69] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_cpu | % cpu utilization | +0.44 | [-1.51, +2.40] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | +0.24 | [-1.19, +1.67] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | +0.17 | [+0.13, +0.21] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | +0.15 | [-0.02, +0.32] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | +0.04 | [-0.08, +0.17] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | +0.03 | [-0.12, +0.17] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.15, +0.15] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.06, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.05, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.00 | [-0.13, +0.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | -0.01 | [-0.05, +0.04] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | -0.01 | [-0.19, +0.16] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | -0.04 | [-0.12, +0.03] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | -0.05 | [-0.18, +0.08] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_throughput | ingress throughput | -0.06 | [-0.13, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_memory | memory utilization | -0.07 | [-0.24, +0.09] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | -0.09 | [-0.25, +0.07] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_memory | memory utilization | -0.10 | [-0.26, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | -0.13 | [-4.58, +4.33] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | -0.15 | [-0.29, -0.00] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | -0.15 | [-0.31, +0.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_throughput | ingress throughput | -0.27 | [-0.34, -0.20] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_memory | memory utilization | -0.31 | [-0.56, -0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | -0.36 | [-0.49, -0.23] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | -0.85 | [-1.12, -0.57] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_cpu | % cpu utilization | -0.99 | [-3.07, +1.09] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | -1.09 | [-1.22, -0.96] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | -2.28 | [-7.45, +2.88] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | -6.87 | [-59.39, +45.66] | 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.40MiB ≤ 140MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | 39.58MiB ≤ 50MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | 59.67MiB ≤ 75MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | 174.99MiB ≤ 200MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | 27.05MiB ≤ 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".
fa8a46b to
9cda52f
Compare
| } | ||
|
|
||
| impl AssertionStep { |
| #[snafu(display("Invalid bind_host '{}': not a valid IP address.", address))] | ||
| InvalidBindHost { address: String }, |
There was a problem hiding this comment.
Oh wait, could something other than an IP address be valid? 🤔
Binary Size Analysis (Agent Data Plane)Target: 4dd143e (baseline) vs 02716cf (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
piecemeal |
+13.28 KiB | 11 |
saluki_common::task::instrument |
-9.54 KiB | 19 |
datadog_protos::trace_piecemeal_include::datadog |
-8.47 KiB | 13 |
memory_accounting::allocator::Tracked |
+7.08 KiB | 19 |
http_body_util |
-4.14 KiB | 14 |
tokio |
+3.51 KiB | 117 |
axum |
+2.83 KiB | 11 |
anon.b2c124a4a764227177a2e69f4bf88554.7.llvm.11462414956994612189 |
+2.81 KiB | 1 |
anon.cf9dc9beacb4b004a1cd29cde4c48742.789.llvm.7988610276044582054 |
-2.81 KiB | 1 |
saluki_components::sources::dogstatsd |
+2.48 KiB | 42 |
figment |
-2.13 KiB | 39 |
saluki_components::transforms::apm_stats |
-2.05 KiB | 6 |
saluki_components::encoders::datadog |
-1.99 KiB | 21 |
serde_with |
+1.97 KiB | 8 |
serde_core |
-1.97 KiB | 45 |
anon.b39606bfe243aa45c40b54889fc520b2.2.llvm.14371567054272567064 |
+1.93 KiB | 1 |
anon.c558e9f1bd059043dd8639ac17522c07.403.llvm.13126592839154015127 |
-1.93 KiB | 1 |
tonic |
-1.74 KiB | 14 |
anon.35d49b4e24c0e7f5214b70de36bc97fe.21.llvm.7728317631408173894 |
-1.53 KiB | 1 |
anon.8965b913716a40c3301d4237bac6c6af.118.llvm.8363388500039370749 |
+1.53 KiB | 1 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
[NEW] +7.26Ki [NEW] +7.07Ki _<saluki_components::sources::dogstatsd::DogStatsD as saluki_core::components::sources::Source>::run::_{{closure}}::h8c0bd803af47c9da
[NEW] +6.80Ki [NEW] +6.58Ki _<saluki_components::sources::dogstatsd::DogStatsDConfiguration as saluki_core::components::sources::builder::SourceBuilder>::build::_{{closure}}::he522612ebb97ab2e
[NEW] +4.96Ki [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}}>>::h5bf2a91d0013d017
[NEW] +3.71Ki [NEW] +3.48Ki _<futures_util::future::try_future::try_flatten::TryFlatten<Fut,<Fut as futures_core::future::TryFuture>::Ok> as core::future::future::Future>::poll::hd845dfa39ce5f35c
[NEW] +2.96Ki [NEW] +2.61Ki core::ptr::drop_in_place<saluki_components::sources::dogstatsd::DogStatsDConfiguration>::h07b5d49ddd8f10e1
[NEW] +2.82Ki [NEW] +2.71Ki saluki_components::sources::dogstatsd::resolver::ContextResolvers::new::ha1d4cc7ef38ef38a
[NEW] +2.81Ki [NEW] +74 anon.b2c124a4a764227177a2e69f4bf88554.7.llvm.11462414956994612189
+34% +2.54Ki +35% +2.54Ki _<F as axum::handler::Handler<$LP$M,T1,T2$RP$,S>>::call::_{{closure}}::hc4ce11ef0d633c2c
[NEW] +2.26Ki [NEW] +46 core::error::Error::cause::h589b3e010e8012a5
[NEW] +2.25Ki [NEW] +2.15Ki piecemeal::io::scratch::ScratchWriter<B>::track_message::h7de6a6f84f92f0db
[DEL] -2.26Ki [DEL] -46 core::error::Error::cause::h5524eeb9d0d0e5d1
[DEL] -2.43Ki [DEL] -2.33Ki serde_core::ser::SerializeMap::serialize_entry::hec7f18f83c63215d
[DEL] -2.65Ki [DEL] -2.30Ki core::ptr::drop_in_place<saluki_components::sources::dogstatsd::DogStatsDConfiguration>::h4200e5ea2af42ad0
[DEL] -2.81Ki [DEL] -74 anon.cf9dc9beacb4b004a1cd29cde4c48742.789.llvm.7988610276044582054
[DEL] -2.81Ki [DEL] -2.70Ki saluki_components::sources::dogstatsd::resolver::ContextResolvers::new::h0111c6cbe27eabf1
[DEL] -3.65Ki [DEL] -3.48Ki _<futures_util::future::try_future::AndThen<Fut1,Fut2,F> as core::future::future::Future>::poll::h61c38fcdbe67a4d9
-0.1% -3.97Ki -0.1% -3.16Ki [4538 Others]
-92.2% -4.69Ki -95.0% -4.69Ki datadog_protos::trace_piecemeal_include::datadog::trace::AgentPayloadBuilder<S>::add_tracer_payloads::h452beefbd5c34217
[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::config::ConfigState>>,axum::routing::path_router::PathRouter<saluki_app::config::ConfigState,_>::with_state<$LP$$RP$>::{{closure}}>>::hd706cb861ab2880d
[DEL] -5.73Ki [DEL] -5.51Ki _<saluki_components::sources::dogstatsd::DogStatsDConfiguration as saluki_core::components::sources::builder::SourceBuilder>::build::_{{closure}}::h81ad64174e1fa088
[DEL] -6.36Ki [DEL] -6.17Ki _<saluki_components::sources::dogstatsd::DogStatsD as saluki_core::components::sources::Source>::run::_{{closure}}::h051d262d59d87aa7
-0.0% -3.94Ki -0.0% -3.21Ki TOTAL
Verifies ADP binds to the address specified by bind_host when non_local_traffic is false. Uses the panoramic dynamic-variable resolution (PANORAMIC_DYNAMIC_CONTAINER_IP) to set bind_host to the container's eth0 IP at runtime — an address guaranteed to be neither 127.0.0.1 nor 0.0.0.0, which proves bind_host was read from config rather than coincidentally matching a hardcoded default.
…recedence tests Two static integration tests that do not depend on panoramic's dynamic variable resolution: - dogstatsd-default-bind: no bind_host, no non_local_traffic. Verifies the default listen address is 127.0.0.1. - dogstatsd-non-local-overrides-bind-host: bind_host set to an arbitrary unreachable IP (10.9.8.7) alongside non_local_traffic=true. Verifies that non_local_traffic takes precedence — the listener binds to 0.0.0.0 regardless of bind_host.
ADP previously hardcoded the DogStatsD UDP/TCP listen address to 127.0.0.1 (or 0.0.0.0 when dogstatsd_non_local_traffic was true). The core agent exposes a bind_host config key that allows binding to a specific interface; ADP now matches that behavior. Precedence matches the core agent (pkg/config/utils/miscellaneous.go GetBindHost + comp/dogstatsd/listeners/udp.go): non_local_traffic=true -> 0.0.0.0 (bind_host ignored) bind_host=X -> X (neither set) -> 127.0.0.1
9cda52f to
02716cf
Compare
Summary
Reads
bind_hostfrom DogStatsD config, matching core agent precedence:dogstatsd_non_local_traffic=true→0.0.0.0, elsebind_hostif set, else127.0.0.1. Invalid values surface a parse error.Change Type
How did you test this PR?
The testing is a bit interesting. Two of the tests were possible without changing
panoramic. In the third, which I was quite stubborn about doing, I wanted to bind the container's IP address which required getting it after the container started and then using a templating method to inject it into the assertion config after the container was running. I anticipate this could be controversial so the commits relating to this and the test relying on it are broken out from the rest for easy dropping.I ran a pre-existing test, and the three new ones locally. I did this in a red->green manner in that two of the tests failed before I applied the fix.
References
Closes #1331