Skip to content

feat(config): migrate DogStatsD source to translated config#1898

Open
webern wants to merge 7 commits into
m/scaffoldfrom
m/dsd-cutover
Open

feat(config): migrate DogStatsD source to translated config#1898
webern wants to merge 7 commits into
m/scaffoldfrom
m/dsd-cutover

Conversation

@webern

@webern webern commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Human Summary

This PR introduces the native saluki configuration type for the DogStatsD source component. Note the naming is quite confusing here:

  • saluki-components: DogStatsDConfiguration - is for the source component only. The rest of the pipeline has other config names.
  • Thus, this maps to dogstatsd::SourceConfig in the new system, and that is aggregated by dogstatsd::Config which can be throught of as the whole DogStatsD pipeline.

Just the DogStatsD source is modeled, at first, and wired through the new system in order to present a less overwhelming diff and establish the migration pattern.

The corresponding smoke test needs to be deleted because it is not compatible with the new system. However, a comparable test has been added to the new system under smoke_test which provides similar guarantees. If we mark the field as supported and MIGRATED_TO_CONFIG_SYSTEM then we will assert that setting that field produces a non-default SalukiConfiguration after translation.

AI Summary

Makes the configuration system the single config loader for the data plane and drives the DogStatsD
source from typed, translated configuration.

  • Adds ConfigurationSystem with a load -> start lifecycle: it takes ownership of the final
    configuration, translates the Datadog source into the native model once, and exposes both a typed
    view (saluki()) and the raw map (raw_map()) for components not yet on typed config.
  • Wires it into run.rs as the sole config loader. Every component other than the DogStatsD source
    reads the raw map.
  • Drives the DogStatsD source from SourceConfig, its slice of the typed native config.
    DogStatsDConfiguration is built by DogStatsDConfiguration::new from a SourceConfig plus
    runtime-injected handles (workload provider, capture and replay control). It implements no
    Deserialize and is never built from the raw map.
  • Adds a privileged /config/internal route that serves the native configuration as JSON.
  • The DogStatsD source's old per-struct smoke test is removed because the harness deserializes its
    target struct, which DogStatsDConfiguration no longer does. The source's schema-overlay keys are
    re-attributed to a MigratedToConfigSystem sentinel in used_by, which holds them out of every
    struct's smoke test while satisfying the overlay's non-empty used_by rule.
  • Replacement coverage: agent-data-plane-config-system gains a build.rs that generates one
    translation smoke test per MigratedToConfigSystem key. Each test injects a non-default value
    into GenericConfiguration, runs the full ConfigurationSystem pipeline (deserialize ->
    witness drive -> translation), and asserts the resulting SalukiConfiguration differs from the
    default-translated baseline. Tests auto-grow as more keys migrate.
  • Adds a Panoramic integration test (adp-config-internal-dogstatsd) that sets DogStatsD source
    config via DD_*, starts the data plane, and asserts the translated values on /config/internal.

Change Type

  • New feature

How did you test this PR?

  • Translation smoke tests: build.rs in agent-data-plane-config-system generates one
    #[tokio::test] per MigratedToConfigSystem overlay key. Each test injects a non-default value
    into GenericConfiguration and asserts translation produces a SalukiConfiguration that differs
    from the default. Currently 34 generated tests covering all migrated DogStatsD source keys.
  • Unit tests: lifecycle (load -> start -> saluki() / raw_map()), translation correctness
    (field propagation, error surfacing, seed/drive disjointness, DD bridge for Saluki-only knobs).
  • Panoramic integration test: adp-config-internal-dogstatsd sets DogStatsD source config via
    DD_* env vars, starts ADP in Docker, and asserts the translated values appear on
    /config/internal. Runs in CI.
  • make check-all and make build-schema-overlay are clean locally.

References

@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 Jun 22, 2026
@webern webern changed the title chore(config): add configuration system lifecycle feat(config): drive the DogStatsD source from translated config Jun 22, 2026

webern commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@datadog-datadog-prod-us1

This comment has been minimized.

@pr-commenter

pr-commenter Bot commented Jun 22, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 9c1abde · Comparison: 8bbad95 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 40.37 MiB (baseline) vs 41.99 MiB (comparison)
Size Change: +1.62 MiB (+4.01%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
figment +750.17 KiB 1035
datadog_agent_config::datadog_configuration::_ +321.87 KiB 14
serde_json +143.87 KiB 571
saluki_config -122.53 KiB 96
serde_core +78.30 KiB 1268
[sections] +65.85 KiB 8
saluki_components::common::datadog +56.93 KiB 519
anon.6a8d6ec5b1f4e882d8198b663e868898.13.llvm.14546428259864905478 +48.93 KiB 1
anon.82eed2807a2ccf1066380c6b10547f44.13.llvm.4366587632014520895 -48.93 KiB 1
serde -46.06 KiB 95
saluki_config_tools::GenericConfiguration::try_get_typed +35.58 KiB 21
tokio +29.77 KiB 5623
anon.46cdadc29311fa19dd337038052bddde.1031.llvm.2604772181265915144 +28.07 KiB 1
anon.bf46b5cf91c3a9d33fa58ade8030f63d.1031.llvm.6297278845612599996 -28.07 KiB 1
axum +27.50 KiB 615
datadog_agent_config::witness::drive +24.85 KiB 1
saluki_components::sources::dogstatsd -22.81 KiB 337
saluki_common::task::instrument +22.51 KiB 85
tracing -22.22 KiB 172
&mut serde_json +21.82 KiB 105
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW] +1.77Mi  [NEW] +1.77Mi    _<chrono_tz::prebuilt::timezones::Tz as chrono_tz::timezone_impl::TimeSpans>::timespans::hf1af569602ecff11
  +4.3% +1.25Mi  +4.4%  +982Ki    [86243 Others]
  [NEW] +62.4Ki  [NEW] +62.1Ki    _<datadog_agent_config::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::datadog_configuration::DatadogConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::he5d9dc71816ea555
  [NEW] +57.3Ki  [NEW] +57.1Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::ha60e957c44c7f13e
  [NEW] +48.9Ki  [NEW] +48.8Ki    anon.6a8d6ec5b1f4e882d8198b663e868898.13.llvm.14546428259864905478
  +4.3% +46.8Ki  +4.3% +46.8Ki    [section .gcc_except_table]
  [NEW] +46.6Ki  [NEW] +46.3Ki    _<datadog_agent_config::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::datadog_configuration::DatadogConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::ha160ea4a85a8ba98
  [NEW] +46.0Ki  [NEW] +45.7Ki    _<datadog_agent_config::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::datadog_configuration::DatadogConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::h0caef10b94f75926
  [NEW] +43.9Ki  [NEW] +43.8Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h9a5c011bc7c4b078
  [NEW] +43.8Ki  [NEW] +43.5Ki    _<datadog_agent_config::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::datadog_configuration::DatadogConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::h2bc249b5061ed96d
  [NEW] +43.8Ki  [NEW] +43.5Ki    _<datadog_agent_config::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::datadog_configuration::DatadogConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::h5739c5d8e8814096
  [NEW] +43.8Ki  [NEW] +43.5Ki    _<datadog_agent_config::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::datadog_configuration::DatadogConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::h980579545f0a7081
  [NEW] +39.9Ki  [NEW] +39.7Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h31297d0183e2fb5d
  [NEW] +36.3Ki  [NEW] +36.0Ki    _<saluki_components::common::datadog::obfuscation::_::<impl serde_core::de::Deserialize for saluki_components::common::datadog::obfuscation::ObfuscationConfig>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::h6bcb057290de83a7
  [NEW] +33.7Ki  [NEW] +33.5Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::h344ea730ee6dc655
  [DEL] -34.4Ki  [DEL] -34.2Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h622a7084ee8b9e54
  [DEL] -35.2Ki  [DEL] -35.1Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::hb4a84cbbc21a072f
  [DEL] -39.8Ki  [DEL] -39.7Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h772878347210b56d
  [DEL] -48.9Ki  [DEL] -48.8Ki    anon.82eed2807a2ccf1066380c6b10547f44.13.llvm.4366587632014520895
  [DEL] -53.4Ki  [DEL] -53.2Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h2c37bd2f0a7c3fc7
  [DEL] -1.77Mi  [DEL] -1.77Mi    _<chrono_tz::prebuilt::timezones::Tz as chrono_tz::timezone_impl::TimeSpans>::timespans::h68dcf722c1a9f6b4
  +4.0% +1.62Mi  +4.1% +1.33Mi    TOTAL

@pr-commenter

pr-commenter Bot commented Jun 22, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: f1d22e22-42a3-4fb5-981c-01bc63f1b926
Baseline: 9c1abdeb · Comparison: 8bbad959 · 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_1mb_3k_contexts_cpu (erratic) cpu ⚪ +12.97 metrics profiles logs
dsd_uds_512kb_3k_contexts_cpu (erratic) cpu ⚪ +5.03 metrics profiles logs
quality_gates_rss_idle memory ⚪ +2.88 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ +2.83 metrics profiles logs
dsd_uds_10mb_3k_contexts_memory memory ⚪ +2.56 metrics profiles logs
dsd_uds_100mb_3k_contexts_memory memory ⚪ +2.25 metrics profiles logs
dsd_uds_1mb_3k_contexts_memory memory ⚪ +2.24 metrics profiles logs
dsd_uds_100mb_3k_contexts_cpu (erratic) cpu ⚪ +2.01 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ +1.77 metrics profiles logs
otlp_ingest_metrics_5mb_cpu (erratic) cpu ⚪ +1.70 metrics profiles logs
dsd_uds_512kb_3k_contexts_memory memory ⚪ +1.69 metrics profiles logs
dsd_uds_500mb_3k_contexts_memory memory ⚪ +1.67 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_cpu (erratic) cpu ⚪ +1.48 metrics profiles logs
otlp_ingest_traces_5mb_memory memory ⚪ +1.44 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_memory memory ⚪ +1.29 metrics profiles logs
otlp_ingest_traces_5mb_cpu (erratic) cpu ⚪ +1.17 metrics profiles logs
dsd_uds_500mb_3k_contexts_throughput throughput ⚪ -1.06 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_memory memory ⚪ +0.95 metrics profiles logs
dsd_uds_500mb_3k_contexts_cpu (erratic) cpu ⚪ +0.90 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ +0.81 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ +0.46 metrics profiles logs
otlp_ingest_logs_5mb_cpu (ignored) cpu ⚪ +0.15 metrics profiles logs
otlp_ingest_metrics_5mb_memory memory ⚪ +0.06 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_512kb_3k_contexts_throughput throughput ⚪ -0.00 metrics profiles logs
dsd_uds_1mb_3k_contexts_throughput throughput ⚪ -0.00 metrics profiles logs
otlp_ingest_metrics_5mb_throughput throughput ⚪ -0.00 metrics profiles logs
dsd_uds_100mb_3k_contexts_throughput throughput ⚪ +0.02 metrics profiles logs
otlp_ingest_traces_5mb_throughput throughput ⚪ +0.02 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_throughput throughput ⚪ +0.04 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_throughput throughput ⚪ +0.05 metrics profiles logs
dsd_uds_10mb_3k_contexts_cpu (erratic) cpu ⚪ -0.38 metrics profiles logs
otlp_ingest_logs_5mb_memory (ignored) memory ⚪ -0.78 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_cpu (erratic) cpu ⚪ -0.90 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 132 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 43.3 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 65.2 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 191 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 29 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.

@webern webern force-pushed the m/dsd-cutover branch 2 times, most recently from 55e3b2b to f221f9b Compare June 23, 2026 10:34
@webern webern changed the base branch from m/scaffold to graphite-base/1898 June 23, 2026 10:44
@webern webern changed the base branch from graphite-base/1898 to m/scaffold June 23, 2026 10:45
@webern webern force-pushed the m/dsd-cutover branch 3 times, most recently from 0e03948 to f741905 Compare June 24, 2026 11:00
@webern webern force-pushed the m/scaffold branch 2 times, most recently from 5181d4e to 541cf25 Compare June 24, 2026 12:51
webern added 4 commits June 24, 2026 15:55
Add the first end-to-end slice of the typed config system.
DynamicConfig<T> and DogStatsDConfig land in saluki-component-config;
a minimal SalukiConfiguration embeds DogStatsDConfig in
agent-data-plane-config; and a Translator implements the generated
witness in agent-data-plane-config-system, seeding the Saluki-only
base then driving the Datadog source over it.

Only DogStatsD-source keys have a native destination so far; the
remaining witness methods are temporary no-ops until their
destinations land. Trim the new crates' dependencies to what this
slice actually uses.
Add ConfigurationSystem and ConfigurationSystemLoader with the
consume-by-value load -> start transition wrapping the existing
translator. start() parses the retained map as a DatadogConfiguration,
translates once, and freezes the master SalukiConfiguration. raw_map()
exposes the retained map for un-flipped components; saluki() returns an
owned clone of the master.

A temporary bridge carries DogStatsD Saluki-only knobs from their DD_*
keys into the seed, preserving behavior until a dedicated source for
those keys is wired. No production caller yet.
Build the configuration system from the final configuration and make it
the single source. The top-level config binding becomes the system's
retained map; create_topology and the DogStatsD topology helper now take
the system and read that map. The DogStatsD source is not yet moved onto
typed config, so behavior is unchanged; this only introduces the runtime
plumbing.
Add DogStatsDConfiguration::new, which builds the source from its
component-native config and re-applies the capture-queue depth floor.
The topology helper constructs the source from the translated typed
config instead of parsing the raw map. The raw-map constructor is
retained, unused, until the remaining callers move over.
webern added 2 commits June 24, 2026 15:57
Add a privileged API worker that serializes the translated native
configuration to JSON on /config/internal. It holds the shared
configuration system and reads the translated master per request, so it
reflects later re-translation without change. The body is served
unscrubbed, like the existing /config route.
Add a Panoramic integration case that sets DogStatsD source config via
DD_* env vars, starts ADP, and asserts the values appear on
/config/internal. It checks a translated field and a seeded field,
proving the source-to-native translation runs end-to-end.
@webern webern force-pushed the m/dsd-cutover branch 2 times, most recently from c65c6cf to c7a7928 Compare June 24, 2026 14:46
Add a generated config smoke test in the agent-data-plane-config crate
that mostly replicates the functionality of config_registry smoke tests
(which have to be deleted one-by-one).

Each value that is declared in the overlay as MIGRATED_TO_CONFIG_SYSTEM
will run through a config system smoke test that asserts setting the
key to a non-default value results in a non-default SalukiConfiguration.
@webern webern marked this pull request as ready for review June 24, 2026 15:44
@webern webern requested a review from a team as a code owner June 24, 2026 15:44
Copilot AI review requested due to automatic review settings June 24, 2026 15:44
@webern webern changed the title feat(config): drive the DogStatsD source from translated config feat(config): migrate DogStatsD source to translated config Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR wires the agent-data-plane to a new typed configuration translation system, and migrates the DogStatsD source component to be driven from the translated native SalukiConfiguration rather than direct deserialization from the raw config map. It also adds a privileged /config/internal endpoint to expose the translated native configuration for validation and debugging.

Changes:

  • Introduces ConfigurationSystem (load -> start) to translate GenericConfiguration -> DatadogConfiguration -> SalukiConfiguration once at startup, while retaining raw_map() as an escape hatch for unmigrated components.
  • Refactors DogStatsD source config plumbing so saluki-components consumes saluki-component-config::dogstatsd::SourceConfig (plain data) and no longer deserializes DogStatsDConfiguration.
  • Adds generated translation smoke tests and a new integration test case validating /config/internal shows end-to-end translated DogStatsD source values.

Reviewed changes

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

Show a summary per file
File Description
test/integration/cases/adp-config-internal-dogstatsd/config.yaml New integration case asserting translated DogStatsD source config is served via /config/internal.
Makefile Extends build-schema-overlay to also build agent-data-plane-config-system (needed for codegen tests).
lib/saluki-components/src/sources/dogstatsd/resolver.rs Updates resolver logic to read limits from config.source.*.
lib/saluki-components/src/sources/dogstatsd/origin.rs Moves OriginEnrichmentConfiguration to saluki-component-config.
lib/saluki-components/src/sources/dogstatsd/mod.rs Refactors DogStatsDConfiguration into a builder embedding SourceConfig; removes serde-based deserialization and old config smoke test.
lib/saluki-components/Cargo.toml Adds dependency on saluki-component-config.
lib/saluki-component-config/src/dogstatsd.rs Improves docs and clarifies the role of SourceConfig as the source slice.
lib/datadog-agent/config/src/classifier/mod.rs Adds MIGRATED_TO_CONFIG_SYSTEM sentinel struct name for overlay/test classification.
lib/datadog-agent/config/schema/schema_overlay.yaml Reattributes migrated DogStatsD source keys’ used_by to MigratedToConfigSystem.
lib/datadog-agent/config-testing/src/config_registry/dogstatsd.rs Updates registry annotations to reference the migration sentinel instead of DogStatsDConfiguration.
lib/datadog-agent/config-testing/src/config_registry/aggregate.rs Removes DogStatsD usage for a key that remains owned by AggregateConfiguration.
lib/datadog-agent/config-overlay-model/src/smoke_test_support.rs Documents and adds the MigratedToConfigSystem enum variant and const mapping.
lib/datadog-agent/config-overlay-model/src/saluki_keys.rs Updates Saluki-only keys’ used_by to point at the migration sentinel constant.
lib/agent-data-plane-config/src/dogstatsd.rs Expands docs clarifying dogstatsd::Config is the domain umbrella and SourceConfig is the component slice.
lib/agent-data-plane-config-system/src/system.rs New config-system lifecycle + DD->Saluki-only bridging for select DogStatsD knobs.
lib/agent-data-plane-config-system/src/smoke_test/mod.rs New translation smoke-test harness for generated per-key tests.
lib/agent-data-plane-config-system/src/lib.rs Exposes ConfigurationSystem publicly; wires smoke-test module under cfg(test).
lib/agent-data-plane-config-system/Cargo.toml Adds runtime/build/dev deps for translation tests and codegen.
lib/agent-data-plane-config-system/build.rs Generates one translation smoke test per overlay key marked MigratedToConfigSystem.
Cargo.lock Adds new crate dependencies for config-system and component-config.
bin/agent-data-plane/src/internal/mod.rs Threads ConfigurationSystem through internal supervisor creation.
bin/agent-data-plane/src/internal/control_plane.rs Registers new InternalConfigWorker on the privileged API.
bin/agent-data-plane/src/internal/config_internal.rs New privileged /config/internal route serving translated SalukiConfiguration.
bin/agent-data-plane/src/cli/run.rs Makes config-system the single config loader; migrates DogStatsD source builder to typed SourceConfig.
bin/agent-data-plane/Cargo.toml Adds dependency on agent-data-plane-config-system.

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

Comment on lines +3 to +7
//! Each test checks a single key by setting a non default value in a `GenericConfiguration` map
//! then running that map through `DatadogConfiguration` deserialization and witness trait
//! translation. The resulting `SalukiConfiguration` is checked against default construction to
//! ensure that it's value has been perturbed. This ensures that none of the witness trait function
//! implementations are inert.
Comment on lines 469 to 473
let traffic_capture = TrafficCapture::with_workload_provider(
self.capture_path.clone(),
self.capture_depth.max(MIN_CAPTURE_DEPTH),
self.source.capture_path.clone(),
self.source.capture_depth.max(MIN_CAPTURE_DEPTH),
self.workload_provider.clone(),
);
Comment on lines +96 to +100
let datadog: DatadogConfiguration = self
.config
.as_typed()
.error_context("Failed to parse Datadog configuration.")?;

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

/// Number of entries for the string interner, as interpreted by the Core Agent.

P2 Badge Keep component-config docs source-neutral

The root AGENTS.md says generic lib/saluki-* crates should not reference the Datadog Agent by name; this new public Rustdoc in lib/saluki-component-config adds a Core Agent-specific migration detail to a crate whose own module docs describe source-agnostic component config. Move that source-language note to ADP/config-system docs or phrase it generically so the generic API surface stays source-neutral.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


let dsd_config = DogStatsDConfiguration::from_configuration(config)
.error_context("Failed to configure DogStatsD source.")?
let dsd_config = DogStatsDConfiguration::new(system.saluki().components.dogstatsd.source)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the run_path capture fallback

In deployments that rely on run_path for the default DogStatsD capture directory, this new construction path skips the old from_configuration fixup that derived run_path/dsd_capture when dogstatsd_capture_path was empty. The translator now leaves the default as an empty PathBuf, and TrafficCapture rejects implicit captures with no configured path, so agent-data-plane dogstatsd capture without an explicit path regresses. Preserve the run_path fallback in the translated/new path.

Useful? React with 👍 / 👎.

Comment on lines 687 to 689
test_support:
used_by: [DogStatsDConfiguration]
used_by: [MigratedToConfigSystem]
test_json: '["udp"]'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep accepting space-separated eol_required

When users set dogstatsd_eol_required as a space-separated string, marking this key as migrated sends it through the generated Datadog model, whose field is a plain Vec<String>. The old source config explicitly used deserialize_space_separated_or_seq and had coverage for the string form, but the new smoke test here only exercises an array, so the legacy string form now fails deserialization before the source is built. Keep the string-or-list normalization in the config-system path.

Useful? React with 👍 / 👎.

Comment on lines +124 to +126
if let Ok(Some(v)) = dd.try_get_typed::<bool>("dogstatsd_allow_context_heap_allocs") {
dsd.allow_context_heap_allocs = Some(v);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Surface invalid bridged DD fallback values

For these Saluki-only DD fallbacks, each branch matches only Ok(Some(_)); if a configured value has the wrong type or is out of range, try_get_typed returns Err and this code silently leaves the native field at its default. Before this migration, the source deserializer failed startup for invalid typed values such as an invalid dogstatsd_tcp_port, so this can make bad configuration look accepted while changing runtime behavior. Return or record the bridge error instead of dropping it.

Useful? React with 👍 / 👎.

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.

2 participants