chore(config): migrate datadog trace encoder to typed configuration - #2187
Conversation
Binary Size Analysis (Agent Data Plane)Baseline: c356375 · Comparison: 47e8b1a · 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 (5)Experiments configured
Bounds Checks: ✅ Passed (5)
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 ( |
f701a86 to
100d06a
Compare
760cc24 to
be8b6a3
Compare
|
|
||
| const fn default_flush_timeout_secs() -> u64 { | ||
| 2 | ||
| DEFAULT_FLUSH_TIMEOUT.as_secs() |
There was a problem hiding this comment.
This function will go away in favor of the config default when migrating to typed config. Right now it is just being deduplicated by a new constant.
|
|
||
| const fn default_flush_timeout_secs() -> u64 { | ||
| 2 | ||
| DEFAULT_FLUSH_TIMEOUT.as_secs() |
There was a problem hiding this comment.
This function will go away in favor of the config default when migrating to typed config. Right now it is just being deduplicated by a new constant.
There was a problem hiding this comment.
More details
The typed trace encoder preserves the reviewed behaviors: compression precedence, two-second flush defaults and overrides, OTLP sampling normalization, environment fallback, and Error Tracking headers/tags. Package execution was blocked by unavailable Rust dependencies, so the conclusion rests on diff and call-path inspection; no concrete regression was found.
🤖 Datadog Autotest · Commit 5666aac · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
| default = "default_serializer_compressor_kind" | ||
| )] | ||
| /// Compression algorithm applied to outgoing payloads. | ||
| compressor_kind: String, |
There was a problem hiding this comment.
Can we express this kind of config as an enum now with the new system?
There was a problem hiding this comment.
I don't know where this one is coming from, but I am creating trackers for your comments. In this case, #2268. I have a feeling some things like this will fall out when working on these features in earnest.
Construct the Datadog trace encoder from typed configuration slices instead of reading GenericConfiguration. - Resolve the effective zstd compressor level once at the configuration boundary, so the encoder carries the resolved level rather than the Agent value and the ADP-specific override separately. - Add a shared MetricsEncoding carrying the Saluki-only flush_timeout_secs key (default 2s), shared by the metrics encoders and the trace encoder. - Take the OTLP trace settings as their own slice, since they live in the OTLP domain rather than the traces domain. - Remove the encoder's raw deserialization, Datadog key names, and config-layer defaults; drop its config smoke-test registration while keeping used_by for legacy codegen. - Update the run.rs construction call site and config registries.
…2187) ## Human Summary Migrates the `DatadogTraceEncoder` to typed config. ## AI Summary Migrate the Datadog trace encoder to typed configuration. - Construct the encoder from typed shared configuration instead of `GenericConfiguration`. - Move the Agent zstd compressor setting into the shared compression model. - Add the ADP-specific zstd override as a typed Saluki-only setting while preserving precedence and defaults. - Move the trace encoder's flush timeout into shared metrics encoding configuration. - Remove raw deserialization and legacy smoke-test registration from the encoder. ## Change Type - [x] Non-functional (chore, refactoring, docs) ## How did you test this PR? - `make build-schema-overlay` - `make fmt` - `cargo check --workspace --tests` - `cargo clippy -p saluki-components -p agent-data-plane-config-system -p agent-data-plane -p agent-data-plane-config --all-targets` - `cargo nextest run -p saluki-components -p agent-data-plane-config-system -p agent-data-plane-config` - Confirmed generated schema output has no drift ## References - Progresses #2169 - Progresses #2193 Co-authored-by: matt.briggs <matt.briggs@datadoghq.com> 853c1fe

Human Summary
Migrates the
DatadogTraceEncoderto typed config.AI Summary
Migrate the Datadog trace encoder to typed configuration.
GenericConfiguration.Change Type
How did you test this PR?
make build-schema-overlaymake fmtcargo check --workspace --testscargo clippy -p saluki-components -p agent-data-plane-config-system -p agent-data-plane -p agent-data-plane-config --all-targetscargo nextest run -p saluki-components -p agent-data-plane-config-system -p agent-data-plane-configReferences