Skip to content

chore(config): migrate OttlFilterConfiguration to typed config#1980

Merged
webern merged 1 commit into
m/pr5-cutoverfrom
m/ottl-filter
Jul 4, 2026
Merged

chore(config): migrate OttlFilterConfiguration to typed config#1980
webern merged 1 commit into
m/pr5-cutoverfrom
m/ottl-filter

Conversation

@webern

@webern webern commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

AI Summary

Build the OTTL filter processor from the resolved traces-domain configuration instead of parsing GenericConfiguration in the component. Remove the component-owned source serde configuration and use the shared OttlErrorMode model type.

Change Type

  • Non-functional (chore, refactoring, docs)

How did you test this PR?

  • make build-schema-overlay && make fmt
  • make check-all
  • make test
  • make check-docs
  • Targeted OTTL filter processor tests

References

Related to configuration cutover PR #1979.

@webern webern requested a review from a team as a code owner July 4, 2026 13:22
Copilot AI review requested due to automatic review settings July 4, 2026 13:22

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

Refactors the OTTL filter processor to be constructed from the resolved typed traces-domain configuration (SalukiConfiguration) rather than deserializing component-owned YAML (GenericConfiguration) inside the component, aligning this component with the ongoing typed-config cutover.

Changes:

  • Build OttlFilterConfiguration from agent_data_plane_config::domains::traces::OttlFilter and reuse the shared OttlErrorMode.
  • Remove the component-local serde/YAML config module (ottl_filter_processor/config.rs) and update tests accordingly.
  • Wire the baseline traces pipeline to pass ConfigurationSystem so it can read the typed config model.

Reviewed changes

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

File Description
bin/agent-data-plane/src/components/ottl_filter_processor/mod.rs Switches config input to typed traces-domain settings, updates error mode type, and refactors tests away from ConfigurationLoader.
bin/agent-data-plane/src/components/ottl_filter_processor/config.rs Removes the component-owned serde/YAML configuration types now superseded by the shared typed config model.
bin/agent-data-plane/src/cli/run.rs Loads typed config via ConfigurationSystem::config() and passes domains.traces.ottl_filter into the filter processor configuration.
Comments suppressed due to low confidence (1)

bin/agent-data-plane/src/components/ottl_filter_processor/mod.rs:123

  • The inline comment describes propagating an error and dropping the whole payload, but the current implementation cannot propagate errors from transform_buffer and instead drops the individual span when error_mode=propagate. Adjust the comment to match the actual behavior.
                        //propagate: The processor returns the error up the pipeline. This will result in the payload
                        // being dropped from the collector.
                        // AZH: The current API of SynchronousTransform::transform_buffer does not propagate errors;
                        //  it only logs them.
                        error!(error = %e, "OTTL filter condition error; dropping span (error_mode=propagate)");
                        return true;
                    }

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

Comment thread bin/agent-data-plane/src/components/ottl_filter_processor/mod.rs
Comment thread bin/agent-data-plane/src/components/ottl_filter_processor/mod.rs
Comment thread bin/agent-data-plane/src/components/ottl_filter_processor/mod.rs

@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

Here are some automated review suggestions for this pull request.

Reviewed commit: 610dddafed

ℹ️ 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".

Comment thread bin/agent-data-plane/src/cli/run.rs
@pr-commenter

pr-commenter Bot commented Jul 4, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 7b98c6f · Comparison: eed5d65 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.63 MiB (baseline) vs 42.56 MiB (comparison)
Size Change: +942.82 KiB (+2.21%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
serde_json +248.88 KiB 512
core +212.30 KiB 9338
datadog_agent_config::generated::datadog_configuration +112.82 KiB 54
serde_core +79.33 KiB 962
alloc +71.19 KiB 1718
[sections] +57.09 KiB 8
figment -55.99 KiB 551
tokio +37.01 KiB 3183
prost +32.49 KiB 263
otlp_protos::otlp_include::opentelemetry -24.84 KiB 135
h2 -21.37 KiB 478
agent_data_plane_config_system::translators::datadog_translator +20.78 KiB 21
saluki_components::common::datadog +20.50 KiB 570
axum +18.69 KiB 378
datadog_protos::trace_piecemeal_include::datadog -15.20 KiB 21
serde_with -14.99 KiB 47
saluki_components::encoders::datadog +13.58 KiB 505
piecemeal +13.15 KiB 38
datadog_agent_config::generated::witness +12.35 KiB 1
saluki_components::common::otlp -11.51 KiB 156
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +5.0%  +860Ki  +4.8%  +645Ki    [35561 Others]
  [NEW] +55.2Ki  [NEW] +55.0Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h3ef2a484186f0bb8
  [NEW] +53.1Ki  [NEW] +52.8Ki    _<datadog_agent_config::generated::datadog_configuration::_::<impl serde_core::de::Deserialize for datadog_agent_config::generated::datadog_configuration::DatadogConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::h59abc0a47db21533
  [NEW] +44.5Ki  [NEW] +44.4Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::he5819430e26508ec
  [NEW] +38.4Ki  [NEW] +38.2Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h3d7ef516f362b9a8
  +2.8% +30.9Ki  +2.8% +30.9Ki    [section .gcc_except_table]
  [NEW] +30.1Ki  [NEW] +30.0Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::translate_metrics::hd269a5b16c8f1266
  [NEW] +29.1Ki  [NEW] +28.9Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::h6809d072204e0804
  [NEW] +28.8Ki  [NEW] +28.6Ki    _<saluki_components::sources::dogstatsd::DogStatsDConfiguration as saluki_core::components::sources::builder::SourceBuilder>::build::_{{closure}}::h6b9140c89e43d005
  [NEW] +28.6Ki  [NEW] +28.5Ki    agent_data_plane::cli::dogstatsd::handle_dogstatsd_command::_{{closure}}::hd22ba2289c2b0af8
  [NEW] +27.4Ki  [NEW] +27.1Ki    _<saluki_components::sources::dogstatsd::_::<impl serde_core::de::Deserialize for saluki_components::sources::dogstatsd::DogStatsDConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::hba6844531adf2ec6
  [NEW] +25.8Ki  [NEW] +25.7Ki    saluki_components::sources::dogstatsd::drive_stream::_{{closure}}::h16acca5cc1c6ba60
  [DEL] -25.6Ki  [DEL] -25.4Ki    saluki_components::sources::dogstatsd::drive_stream::_{{closure}}::h3fe2520e3abdfc38
  [DEL] -26.6Ki  [DEL] -26.4Ki    _<saluki_components::sources::dogstatsd::DogStatsDConfiguration as saluki_core::components::sources::builder::SourceBuilder>::build::_{{closure}}::h2c2a33d551977c6d
  [DEL] -27.2Ki  [DEL] -26.9Ki    _<saluki_components::sources::dogstatsd::_::<impl serde_core::de::Deserialize for saluki_components::sources::dogstatsd::DogStatsDConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::hfc578ba92a99992a
  [DEL] -28.6Ki  [DEL] -28.5Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::translate_metrics::h1e8351a6f731e9df
  [DEL] -28.6Ki  [DEL] -28.5Ki    agent_data_plane::cli::dogstatsd::handle_dogstatsd_command::_{{closure}}::h84db3f7ad161eab2
  [DEL] -32.6Ki  [DEL] -32.4Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::h72e4b09fd816d94f
  [DEL] -38.7Ki  [DEL] -38.5Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h3cd6ee67f0471508
  [DEL] -44.7Ki  [DEL] -44.6Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h83501a7881036c5f
  [DEL] -56.8Ki  [DEL] -56.6Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h54fbb73bb30184e6
  +2.2%  +942Ki  +2.1%  +727Ki    TOTAL

Build the OTTL filter processor from the resolved traces configuration and remove source-map parsing from the component.

@webern webern left a comment

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.

Claude Code, reviewing on behalf of @webern.

Clean-room review of this OTTL filter cutover, focused on regression risk. No blocking issues found; this looks good to merge.

Input sanitization — preserved (and strengthened). The deleted component config enforced deny_unknown_fields on both the root object and the traces subsection, and validated error_mode against a fixed enum. The typed path now matches that: deny_unknown_fields is applied to both OttlFilterConfig and OttlFilterTraces, and error_mode is the typed OttlErrorMode (rename_all = "lowercase"), so a misspelled mode or an unsupported key (e.g. traces.spanevent) still fails at load rather than being silently ignored. The new config-system test exercises exactly these cases. This resolves the earlier validation-loss concern.

Config reachability — preserved. error_mode and traces.span (now span_conditions) both remain reachable through the model.

Behavioral parity — preserved. The default remains Propagate; the empty/trimmed-condition skip and all three error-mode branches are unchanged.

Test coverage — preserved. Behavioral tests are retained and now construct the typed model directly. The removed deserialization tests are appropriately relocated to the config-system layer with broader coverage.

Minor / optional: a couple of the test doc comments still describe the old ottl_filter_config / traces.span YAML keys rather than the typed model fields — worth a touch-up but not blocking.

@webern webern merged commit d6bcd0a into m/pr5-cutover Jul 4, 2026
84 of 85 checks passed
@webern webern deleted the m/ottl-filter branch July 4, 2026 14:09
webern added a commit that referenced this pull request Jul 5, 2026
## AI Summary

Build the OTTL filter processor from the resolved traces-domain
configuration instead of parsing `GenericConfiguration` in the
component. Remove the component-owned source serde configuration and use
the shared `OttlErrorMode` model type.

## Change Type
- [x] Non-functional (chore, refactoring, docs)

## How did you test this PR?
- `make build-schema-overlay && make fmt`
- `make check-all`
- `make test`
- `make check-docs`
- Targeted OTTL filter processor tests

## References

Related to configuration cutover PR #1979.
webern added a commit that referenced this pull request Jul 5, 2026
## AI Summary

Build the OTTL filter processor from the resolved traces-domain
configuration instead of parsing `GenericConfiguration` in the
component. Remove the component-owned source serde configuration and use
the shared `OttlErrorMode` model type.

## Change Type
- [x] Non-functional (chore, refactoring, docs)

## How did you test this PR?
- `make build-schema-overlay && make fmt`
- `make check-all`
- `make test`
- `make check-docs`
- Targeted OTTL filter processor tests

## References

Related to configuration cutover PR #1979.
webern added a commit that referenced this pull request Jul 5, 2026
## AI Summary

Build the OTTL filter processor from the resolved traces-domain
configuration instead of parsing `GenericConfiguration` in the
component. Remove the component-owned source serde configuration and use
the shared `OttlErrorMode` model type.

## Change Type
- [x] Non-functional (chore, refactoring, docs)

## How did you test this PR?
- `make build-schema-overlay && make fmt`
- `make check-all`
- `make test`
- `make check-docs`
- Targeted OTTL filter processor tests

## References

Related to configuration cutover PR #1979.
webern added a commit that referenced this pull request Jul 5, 2026
## AI Summary

Build the OTTL filter processor from the resolved traces-domain
configuration instead of parsing `GenericConfiguration` in the
component. Remove the component-owned source serde configuration and use
the shared `OttlErrorMode` model type.

## Change Type
- [x] Non-functional (chore, refactoring, docs)

## How did you test this PR?
- `make build-schema-overlay && make fmt`
- `make check-all`
- `make test`
- `make check-docs`
- Targeted OTTL filter processor tests

## References

Related to configuration cutover PR #1979.
webern added a commit that referenced this pull request Jul 5, 2026
## AI Summary

Build the OTTL filter processor from the resolved traces-domain
configuration instead of parsing `GenericConfiguration` in the
component. Remove the component-owned source serde configuration and use
the shared `OttlErrorMode` model type.

## Change Type
- [x] Non-functional (chore, refactoring, docs)

## How did you test this PR?
- `make build-schema-overlay && make fmt`
- `make check-all`
- `make test`
- `make check-docs`
- Targeted OTTL filter processor tests

## References

Related to configuration cutover PR #1979.
webern added a commit that referenced this pull request Jul 8, 2026
## AI Summary

Build the OTTL filter processor from the resolved traces-domain
configuration instead of parsing `GenericConfiguration` in the
component. Remove the component-owned source serde configuration and use
the shared `OttlErrorMode` model type.

## Change Type
- [x] Non-functional (chore, refactoring, docs)

## How did you test this PR?
- `make build-schema-overlay && make fmt`
- `make check-all`
- `make test`
- `make check-docs`
- Targeted OTTL filter processor tests

## References

Related to configuration cutover PR #1979.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants