Skip to content

enhancement(dogstatsd): read bind_host from config#1413

Open
webern wants to merge 4 commits intomainfrom
matt.briggs/issue-1331-pr
Open

enhancement(dogstatsd): read bind_host from config#1413
webern wants to merge 4 commits intomainfrom
matt.briggs/issue-1331-pr

Conversation

@webern
Copy link
Copy Markdown
Contributor

@webern webern commented Apr 17, 2026

Summary

Reads bind_host from DogStatsD config, matching core agent precedence: dogstatsd_non_local_traffic=true0.0.0.0, elsebind_host if set, else 127.0.0.1. Invalid values surface a parse error.

Change Type

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

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.

  # build
  make build-datadog-agent-image build-panoramic

  # run the baseline pre-existing test
  ./target/release/panoramic run -d test/integration/cases --tests basic-startup

  # run the new tests (two were red->green)
  ./target/release/panoramic run -d test/integration/cases --tests dogstatsd-bind-host
  ./target/release/panoramic run -d test/integration/cases --tests dogstatsd-default-bind
  ./target/release/panoramic run -d test/integration/cases --tests dogstatsd-non-local-overrides-bind-host

References

Closes #1331

@webern webern requested a review from a team as a code owner April 17, 2026 17:56
@dd-octo-sts dd-octo-sts bot added area/components Sources, transforms, and destinations. source/dogstatsd DogStatsD source. area/test All things testing: unit/integration, correctness, SMP regression, etc. labels Apr 17, 2026
@webern webern marked this pull request as draft April 17, 2026 18:06
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
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 17, 2026

Regression Detector (Agent Data Plane)

Regression Detector Results

Run ID: c6247b57-01b2-425e-82c9-7cf81fc98f93

Baseline: 4dd143e
Comparison: 02716cf
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

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:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. 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.

  3. Its configuration does not mark it "erratic".

@webern webern force-pushed the matt.briggs/issue-1331-pr branch from fa8a46b to 9cda52f Compare April 17, 2026 18:13
Comment on lines +264 to +266
}

impl AssertionStep {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why two impls?

Comment on lines +85 to +86
#[snafu(display("Invalid bind_host '{}': not a valid IP address.", address))]
InvalidBindHost { address: String },
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh wait, could something other than an IP address be valid? 🤔

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 17, 2026

Binary Size Analysis (Agent Data Plane)

Target: 4dd143e (baseline) vs 02716cf (comparison) diff
Analysis Type: Stripped binaries (debug symbols excluded)
Baseline Size: 37.09 MiB
Comparison Size: 37.09 MiB
Size Change: -3.94 KiB (-0.01%)
Pass/Fail Threshold: +5%
Result: PASSED ✅

Changes by Module

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

webern added 3 commits April 17, 2026 20:27
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
@webern webern force-pushed the matt.briggs/issue-1331-pr branch from 9cda52f to 02716cf Compare April 17, 2026 18:28
@webern webern marked this pull request as ready for review April 17, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/components Sources, transforms, and destinations. area/test All things testing: unit/integration, correctness, SMP regression, etc. source/dogstatsd DogStatsD source.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read bind_host from config instead of hardcoding the listen address.

1 participant