Skip to content

Commit 7a8df9c

Browse files
committed
chore(config): migrate OttlTransformConfiguration to typed config (#1997)
Cut the OTTL transform processor over from the raw `GenericConfiguration` map to the typed `SalukiConfiguration` model, following the pattern already applied to the sibling OTTL filter processor. - `OttlTransformConfiguration::from_configuration` now takes the resolved `domains::traces::OttlTransform` settings and copies them directly, instead of deserializing an `OttlTransformConfig` out of `GenericConfiguration`. The component-local config module (its `ErrorMode` enum and `OttlTransformConfig` struct) is removed; the component reuses the model's shared `OttlErrorMode`. - The call site in `run.rs` reads `saluki.domains.traces.ottl_transform`. Since this was the last consumer of the raw config in `add_baseline_traces_pipeline_to_blueprint`, the now-unused `GenericConfiguration` parameter is dropped from that function. - The seed source `OttlTransformConfig` in `saluki_only.rs` is aligned with the filter's: its `error_mode` deserializes directly into `OttlErrorMode` (rather than a loose `Option<String>` fed through a hand-rolled parse helper) and it now rejects unknown fields, restoring the strict deserialization the original component had. `ottl_transform_config` is absent from the vendored Datadog schema, so it is a Saluki-only key on the seed track; there is no witnessed alias for it. - [x] Non-functional (chore, refactoring, docs) - Rewrote the component tests to build from typed traces settings; all OTTL transform tests pass. - Added an `ottl_transform_config` round-trip rejection test mirroring the filter's. - `make build-schema-overlay` leaves the tree unchanged; `make fmt`, `make check-all`, `make test`, and `make check-docs` all pass. - Progresses #1788 - Merges into #1987
1 parent 8472018 commit 7a8df9c

4 files changed

Lines changed: 160 additions & 309 deletions

File tree

bin/agent-data-plane/src/cli/run.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ async fn create_topology(
442442
}
443443

444444
if dp_config.traces_pipeline_required() {
445-
add_baseline_traces_pipeline_to_blueprint(&mut blueprint, config, config_system, env_provider).await?;
445+
add_baseline_traces_pipeline_to_blueprint(&mut blueprint, config_system, env_provider).await?;
446446
}
447447

448448
// Now we move on to our actual data pipelines.
@@ -668,8 +668,7 @@ async fn add_baseline_service_checks_pipeline_to_blueprint(
668668
}
669669

670670
async fn add_baseline_traces_pipeline_to_blueprint(
671-
blueprint: &mut TopologyBlueprint, config: &GenericConfiguration, config_system: &ConfigurationSystem,
672-
env_provider: &ADPEnvironmentProvider,
671+
blueprint: &mut TopologyBlueprint, config_system: &ConfigurationSystem, env_provider: &ADPEnvironmentProvider,
673672
) -> Result<(), GenericError> {
674673
let saluki = config_system.config();
675674
let dd_traces_config = DatadogTraceConfiguration::from_configuration(
@@ -685,7 +684,7 @@ async fn add_baseline_traces_pipeline_to_blueprint(
685684
.error_context("Failed to configure Trace Sampler transform.")?;
686685
let ottl_filter_config = OttlFilterConfiguration::from_configuration(&saluki.domains.traces.ottl_filter)
687686
.error_context("Failed to configure OTTL filter processor.")?;
688-
let ottl_transform_config = OttlTransformConfiguration::from_configuration(config)
687+
let ottl_transform_config = OttlTransformConfiguration::from_configuration(&saluki.domains.traces.ottl_transform)
689688
.error_context("Failed to configure OTTL transform processor.")?;
690689
let dd_traces_enrich_config = ChainedConfiguration::default()
691690
.with_transform_builder("ottl_filter", ottl_filter_config)

bin/agent-data-plane/src/components/ottl_transform_processor/config.rs

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)