chore(config): integrate and test the config system - #2094
Conversation
|
Binary Size Analysis (Agent Data Plane)Baseline: f6a508e · Comparison: 1f0ed22 · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (3)Experiments configured
Bounds Checks: ✅ Passed (3)
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 ( |
There was a problem hiding this comment.
Static analysis only (build unavailable — hyper-http-proxy git dependency unreachable in sandbox). DD_MEMORY_LIMIT=10485760 arrives at ByteSize::from_str as the bare string "10485760" (no unit suffix) via EnvDecode::RawString; if bytesize 2.4.0 rejects unitless integer strings, ADP startup fails whenever memory_limit is set as a plain byte count.
ByteSize env-var bare-number decode is untested
ADP startup aborts for any deployment that sets DD_MEMORY_LIMIT to a plain byte count rather than a suffixed string like "10MB", which is a common scripting pattern.
Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · Commit e1396dc · What is Autotest? · Any feedback? Reach out in #autotest
@datadog-datadog-prod-us1 I'm 99.9% percent sure I fixed this in the preceding PR, #2093, which has been merged and this has been rebased to pick it up. |
Connect the typed configuration system to `agent-data-plane` while preserving the existing compatibility path for consumers that have not migrated yet. - Load the configuration system during startup and require the first Agent snapshot to pass typed deserialization and translation before boot continues. - Consume the live configuration stream through the configuration system, forward updates faithfully to the compatibility configuration map, and thread the typed system through topology and supervisor assembly. - Expose the current compatibility configuration through the privileged `/config/internal` endpoint and retain integration coverage for runtime updates. - Move the runtime's remaining key-alias and remapper imports to `datadog-agent-config`, leaving the compatibility re-export available only for legacy tests. This commit wires the configuration system into the binary; component migrations remain separate.
e4cba81
into
main
## Human Summary Integrates the typed config system into `agent-data-plane` even though no components are yet reading from it. We decided to take a migration approach to this, so components will be cut over to using typed config in isolated PRs where we can focus on correctness for each component. This PR introduces a privileged API endpoint `/config/internal` which is a serialization of `SalukiConfig`. This is going to be important for end-to-end integration testing, and the first such test is added in this PR. Also noteworthy is that all integration and correctness tests are passing here, which was not the case prior to #2093's improvement of how the type config system handles environment variables. ## AI Summary Integrate the typed configuration system into the Agent Data Plane runtime and expose its current value through the internal configuration endpoint. - Load the configuration system after the initial configuration snapshot is available. - Thread the configuration-system handle through runtime setup and the internal supervisor. - Serve the current configuration through `/config/internal`. - Use fallback environment-overlay behavior so Agent-provided values remain authoritative. - Add integration coverage for runtime configuration updates through the internal endpoint. ## Change Type - [x] Non-functional (chore, refactoring, docs) ## How did you test this PR? - `make build-schema-overlay` - `make fmt` - `make check-docs` - `make check-all` - `make test` All checks passed; 1,830 tests passed and 31 were skipped. ## References Stacked on [#2093](#2093). Co-authored-by: matt.briggs <matt.briggs@datadoghq.com> e4cba81
## Human Summary A fairly simple case of a missing config. Note that there are some ugly parts as we wait for #2094, after which I will move OTLP to typed config and we can delete the env-handlers and deserialization stuff. ## AI Summary - Wire `otlp_config.metrics.histograms.send_aggregation_metrics` through Datadog and typed OTLP configuration into the metrics translator. - Support the legacy raw-map environment override and preserve validation for invalid `nobuckets` configurations. - Keep deprecated `send_count_sum_metrics` unsupported. ## Change Type - [x] New feature ## How did you test this PR? - `cargo nextest run -p saluki-components sources::otlp::tests::histogram_aggregation_setting_flows_to_metrics_translator sources::otlp::tests::histogram_aggregation_setting_configurable_via_environment_variable sources::otlp::tests::nobuckets_with_histogram_aggregations_is_valid sources::otlp::tests::nobuckets_without_histogram_aggregations_is_invalid` - `make fmt` - `make build-schema-overlay` - `make check-docs` - `make check-all` ## References - Closes: #2021 Co-authored-by: lucas.tembras <lucas.tembras@datadoghq.com>
## Human Summary A fairly simple case of a missing config. Note that there are some ugly parts as we wait for #2094, after which I will move OTLP to typed config and we can delete the env-handlers and deserialization stuff. ## AI Summary - Wire `otlp_config.metrics.histograms.send_aggregation_metrics` through Datadog and typed OTLP configuration into the metrics translator. - Support the legacy raw-map environment override and preserve validation for invalid `nobuckets` configurations. - Keep deprecated `send_count_sum_metrics` unsupported. ## Change Type - [x] New feature ## How did you test this PR? - `cargo nextest run -p saluki-components sources::otlp::tests::histogram_aggregation_setting_flows_to_metrics_translator sources::otlp::tests::histogram_aggregation_setting_configurable_via_environment_variable sources::otlp::tests::nobuckets_with_histogram_aggregations_is_valid sources::otlp::tests::nobuckets_without_histogram_aggregations_is_invalid` - `make fmt` - `make build-schema-overlay` - `make check-docs` - `make check-all` ## References - Closes: #2021 Co-authored-by: lucas.tembras <lucas.tembras@datadoghq.com> ef17da7
## Human Summary #2094 landed the typed configuration system. This is the first PR in which we migrate a component to typed config. I have decided to start with the OTLP components because @lucastemb and I are working with them now and we have already been accumulating some `TODO: delete when typed config` stuff. These components are a good place to start because: - a) they are not used in production currently - b) they are high churn as we work on the OTLP subsystem ## AI Summary Migrate the OTLP source from `GenericConfiguration` to the typed `SalukiConfiguration` model. - Build `OtlpConfiguration` from the unified OTLP domain, including metrics, logs, and traces. - Move Saluki-only defaults and byte-size parsing into the configuration layer. - Translate the schema gRPC receive-size sentinel (`0`) to the effective 4 MiB default. - Replace the retired source smoke-test consumer with `TYPED_CONFIG_SYSTEM`. - Retain raw configuration types required by the unmigrated OTLP relay and decoder. ## Change Type - [x] Non-functional (chore, refactoring, docs) ## How did you test this PR? - `make build-schema-overlay` - `make fmt` - `git diff --check` - `cargo check --workspace --tests` - `make check-clippy` - `cargo test -p agent-data-plane-config-system --lib` - `cargo test -p saluki-components --lib sources::otlp` - `cargo test -p saluki-components --lib decoders::otlp` - `cargo test -p datadog-agent-config-testing` ## References - Progress #2169 - Progresses: #2192
## Human Summary #2094 landed the typed configuration system. This is the first PR in which we migrate a component to typed config. I have decided to start with the OTLP components because @lucastemb and I are working with them now and we have already been accumulating some `TODO: delete when typed config` stuff. These components are a good place to start because: - a) they are not used in production currently - b) they are high churn as we work on the OTLP subsystem ## AI Summary Migrate the OTLP source from `GenericConfiguration` to the typed `SalukiConfiguration` model. - Build `OtlpConfiguration` from the unified OTLP domain, including metrics, logs, and traces. - Move Saluki-only defaults and byte-size parsing into the configuration layer. - Translate the schema gRPC receive-size sentinel (`0`) to the effective 4 MiB default. - Replace the retired source smoke-test consumer with `TYPED_CONFIG_SYSTEM`. - Retain raw configuration types required by the unmigrated OTLP relay and decoder. ## Change Type - [x] Non-functional (chore, refactoring, docs) ## How did you test this PR? - `make build-schema-overlay` - `make fmt` - `git diff --check` - `cargo check --workspace --tests` - `make check-clippy` - `cargo test -p agent-data-plane-config-system --lib` - `cargo test -p saluki-components --lib sources::otlp` - `cargo test -p saluki-components --lib decoders::otlp` - `cargo test -p datadog-agent-config-testing` ## References - Progress #2169 - Progresses: #2192 7833d71

Human Summary
Integrates the typed config system into
agent-data-planeeven though no components are yet reading from it. We decided to take a migration approach to this, so components will be cut over to using typed config in isolated PRs where we can focus on correctness for each component.This PR introduces a privileged API endpoint
/config/internalwhich is a serialization ofSalukiConfig. This is going to be important for end-to-end integration testing, and the first such test is added in this PR.Also noteworthy is that all integration and correctness tests are passing here, which was not the case prior to #2093's improvement of how the type config system handles environment variables.
AI Summary
Integrate the typed configuration system into the Agent Data Plane runtime and expose its current value through the internal configuration endpoint.
/config/internal.Change Type
How did you test this PR?
make build-schema-overlaymake fmtmake check-docsmake check-allmake testAll checks passed; 1,830 tests passed and 31 were skipped.
References
Stacked on #2093.