feat(agent-data-plane): Add OTTL filter processor component skeleton#1209
Conversation
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: 1ef6fda0-145a-429f-a668-feecf1f78727 Baseline: 5bf6eb8 ❌ Experiments with retried target crashesThis is a critical error. One or more replicates failed with a non-zero exit code. These replicates may have been retried. See Replicate Execution Details for more information.
Optimization Goals: ✅ Improvement(s) detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ❌ | otlp_ingest_logs_5mb_memory | memory utilization | +5.58 | [+4.91, +6.24] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +4.41 | [-0.82, +9.65] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.01 | [-0.14, +0.12] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ❌ | otlp_ingest_logs_5mb_memory | memory utilization | +5.58 | [+4.91, +6.24] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +4.41 | [-0.82, +9.65] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | +3.34 | [+3.15, +3.53] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | +1.14 | [+1.10, +1.18] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | +0.78 | [+0.58, +0.98] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | +0.76 | [+0.57, +0.94] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | +0.75 | [+0.59, +0.91] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | +0.70 | [+0.51, +0.90] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | +0.67 | [+0.48, +0.86] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_cpu | % cpu utilization | +0.51 | [-1.57, +2.59] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | +0.42 | [+0.23, +0.61] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | +0.24 | [+0.11, +0.37] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | +0.22 | [+0.08, +0.35] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | +0.17 | [+0.04, +0.29] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | +0.08 | [-0.11, +0.28] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | +0.04 | [-0.08, +0.16] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.05, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.06, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | -0.00 | [-0.02, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.05, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | -0.01 | [-0.17, +0.15] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.01 | [-0.14, +0.12] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | -0.06 | [-1.34, +1.21] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | -0.79 | [-28.52, +26.94] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | -1.06 | [-6.75, +4.64] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | -1.21 | [-7.21, +4.78] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | -3.31 | [-54.97, +48.35] | 1 | (metrics) (profiles) (logs) |
| ✅ | otlp_ingest_traces_5mb_memory | memory utilization | -6.30 | [-6.57, -6.03] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | -15.35 | [-67.59, +36.89] | 1 | (metrics) (profiles) (logs) |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | links |
|---|---|---|---|---|
| ✅ | quality_gates_rss_dsd_heavy | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | (metrics) (profiles) (logs) |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
Replicate Execution Details
We run multiple replicates for each experiment/variant. However, we allow replicates to be automatically retried if there are any failures, up to 8 times, at which point the replicate is marked dead and we are unable to run analysis for the entire experiment. We call each of these attempts at running replicates a replicate execution. This section lists all replicate executions that failed due to the target crashing or being oom killed.
Note: In the below tables we bucket failures by experiment, variant, and failure type. For each of these buckets we list out the replicate indexes that failed with an annotation signifying how many times said replicate failed with the given failure mode. In the below example the baseline variant of the experiment named experiment_with_failures had two replicates that failed by oom kills. Replicate 0, which failed 8 executions, and replicate 1 which failed 6 executions, all with the same failure mode.
| Experiment | Variant | Replicates | Failure | Logs | Debug Dashboard |
|---|---|---|---|---|---|
| experiment_with_failures | baseline | 0 (x8) 1 (x6) | Oom killed | Debug Dashboard |
The debug dashboard links will take you to a debugging dashboard specifically designed to investigate replicate execution failures.
❌ Retried Normal Replicate Execution Failures (non-profiling)
| Experiment | Variant | Replicates | Failure | Debug Dashboard |
|---|---|---|---|---|
| otlp_ingest_logs_5mb_memory | comparison | 7 | Failed to shutdown when requested | Debug Dashboard |
| otlp_ingest_metrics_5mb_cpu | baseline | 1 | Failed to shutdown when requested | Debug Dashboard |
| otlp_ingest_traces_5mb_throughput | baseline | 0 | Failed to shutdown when requested | Debug Dashboard |
| quality_gates_rss_dsd_heavy | comparison | 5 | Failed to shutdown when requested | Debug Dashboard |
tobz
left a comment
There was a problem hiding this comment.
Overall, this looks good to me just to give us something to start experimenting with.
| //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. |
There was a problem hiding this comment.
We could definitely modify this function to return Result<bool, GenericError> to encode all the possible outcomes, and we could probably write a version of Trace::retain_spans that allowed for a fallible predicate which short circuited... but this could get complex very quickly, though, because of the need to make everything fallible.
Looking at the documentation for filterprocessor, I suspect we might end up wanting (or needing) a higher-level data structure to hold the "result" of each parser execution, in order to allow us to handle the more advanced "context inferrer" logic, but also us to generically represent the outcomes -- keep this span/spanevent/metric/etc, or don't keep it -- without needing specialized versions of retain_* for each one that allows for short circuiting, etc.
Binary Size Analysis (Agent Data Plane)Target: 5bf6eb8 (baseline) vs 6bf69ea (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
core |
+268.47 KiB | 3377 |
chumsky |
+97.08 KiB | 42 |
agent_data_plane::components::ottl_filter_processor |
+36.23 KiB | 17 |
[sections] |
+17.88 KiB | 8 |
ottl::parser::eval |
+13.21 KiB | 8 |
ottl::lexer::Token |
+12.64 KiB | 27 |
alloc |
+11.13 KiB | 369 |
ottl::parser::arena |
+8.58 KiB | 5 |
figment |
+7.83 KiB | 61 |
ottl::parser::grammar |
+6.49 KiB | 9 |
hashbrown |
+5.87 KiB | 73 |
ottl::Value |
+5.53 KiB | 4 |
saluki_components::transforms::chained |
+3.58 KiB | 4 |
serde_core |
+3.56 KiB | 84 |
ottl::parser::ops |
+2.67 KiB | 1 |
[Unmapped] |
-1.59 KiB | 1 |
agent_data_plane::cli::run |
-1.03 KiB | 70 |
ottl::lexer::LexerError |
+815 B | 1 |
std |
-746 B | 123 |
saluki_env::helpers::remote_agent |
-456 B | 4 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
[NEW] +1.79Mi [NEW] +1.79Mi std::thread::local::LocalKey<T>::with::he359acebcd355a42
+9.6% +494Ki +7.1% +294Ki [7778 Others]
[NEW] +113Ki [NEW] +113Ki agent_data_plane::cli::run::create_topology::_{{closure}}::hc645b34a68b8f71e
[NEW] +84.5Ki [NEW] +84.4Ki agent_data_plane::internal::control_plane::spawn_control_plane::_{{closure}}::hd6ee71eb8e3b5d42
[NEW] +57.9Ki [NEW] +57.7Ki agent_data_plane::cli::run::handle_run_command::_{{closure}}::h3f44cf5951d01919
[NEW] +48.9Ki [NEW] +48.8Ki saluki_app::bootstrap::AppBootstrapper::bootstrap::_{{closure}}::h08a8f41b52f72e34
[NEW] +44.1Ki [NEW] +44.0Ki saluki_env::workload::providers::remote_agent::RemoteAgentWorkloadProvider::from_configuration::_{{closure}}::hc491aca4a43dc516
[NEW] +38.1Ki [NEW] +38.0Ki agent_data_plane::run_inner::_{{closure}}::h877e1870ab1bc351
[NEW] +36.1Ki [NEW] +192 core::ptr::drop_in_place<chumsky::combinator::Foldl<ottl::parser::grammar::build_parser::{{closure}}::{{closure}},chumsky::combinator::Foldl<ottl::parser::grammar::build_parser::{{closure}}::{{closure}},chumsky::combinator::Map<chumsky::combinator::Then<chumsky::combinator::OrNot<chumsky::primitive::Just<&ottl::lexer::Token,&[ottl::lexer::Token],chumsky::extra::Full<chumsky::error::Rich<ottl::lexer::Token>,$LP$$RP$,$LP$$RP$>>>,chumsky::primitive::Choice<$LP$chumsky::combinator::DelimitedBy<chumsky::recursive::Recursive<dyn chumsky::Parser<&[ottl::lexer::Token],ottl::parser::ast::BoolExpr,chumsky::extra::Full<chumsky::error::Rich<ottl::lexer::Token>,$LP$$RP$,$LP$$RP$>>>,chumsky::primitive::Just<&ottl::lexer::Token,&[ottl::lexer::Token],chumsky::extra::Full<chumsky::error::Rich<ottl::lexer::Token>$
[NEW] +35.9Ki [NEW] +35.7Ki saluki_env::helpers::remote_agent::client::RemoteAgentClient::from_configuration::_{{closure}}::_{{closure}}::_{{closure}}::h1e5186b3677591e6
[NEW] +35.3Ki [NEW] +35.1Ki _<saluki_config::secrets::resolver::external::ExternalProcessResolver as saluki_config::secrets::resolver::Resolver>::resolve::_{{closure}}::h377cb0d1ae9ccf4f
[DEL] -32.8Ki [DEL] -32.6Ki agent_data_plane::cli::dogstatsd::handle_dogstatsd_stats::_{{closure}}::hb8cafd703c5ed08d
[DEL] -35.3Ki [DEL] -35.1Ki _<saluki_config::secrets::resolver::external::ExternalProcessResolver as saluki_config::secrets::resolver::Resolver>::resolve::_{{closure}}::h868cfb2b64303c87
[DEL] -35.9Ki [DEL] -35.7Ki saluki_env::helpers::remote_agent::client::RemoteAgentClient::from_configuration::_{{closure}}::_{{closure}}::_{{closure}}::h451602f339bf9b6d
[DEL] -38.1Ki [DEL] -38.0Ki agent_data_plane::run_inner::_{{closure}}::h4bd94e0532d6b630
[DEL] -44.1Ki [DEL] -44.0Ki saluki_env::workload::providers::remote_agent::RemoteAgentWorkloadProvider::from_configuration::_{{closure}}::hb64db5e615713673
[DEL] -48.8Ki [DEL] -48.7Ki saluki_app::bootstrap::AppBootstrapper::bootstrap::_{{closure}}::hca5d8d0e9367596a
[DEL] -57.7Ki [DEL] -57.6Ki agent_data_plane::cli::run::handle_run_command::_{{closure}}::he1c11d97bbc07545
[DEL] -84.5Ki [DEL] -84.4Ki agent_data_plane::internal::control_plane::spawn_control_plane::_{{closure}}::h34d667a7fe151224
[DEL] -114Ki [DEL] -114Ki agent_data_plane::cli::run::create_topology::_{{closure}}::h242100d6d38705c3
[DEL] -1.79Mi [DEL] -1.79Mi std::thread::local::LocalKey<T>::with::h69bf559e2b2ff5e4
+1.8% +497Ki +1.1% +261Ki TOTAL
…1209) ## Summary ADP Pipeline component that drops spans (_not yet supported: span events, metrics, datapoints, and logs_) when _any_ OTTL ([OpenTelemetry Transformation Language](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/README.md)) conditions evaluate to true. Example of configuration: ```yaml ottl_config: error_mode: ignore traces: span: - 'attributes["container.name"] == "app_container_1"' - 'resource.attributes["host.name"] == "localhost"' ``` Behavior is aligned with the [OSS filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/release/v0.144.x/processor/filterprocessor/README.md) Current support: - Filtering by multiple OTTL predicates is supported. - The component’s configuration is global for all component instances (a temporary solution for the POC). - Currently, filtering applies only to span attributes and resource attributes. ## Change Type - [x] New feature ## How did you test this PR? Manual tests [[OTAGENT-834]](https://datadoghq.atlassian.net/browse/OTAGENT-834) [OTAGENT-834]: https://datadoghq.atlassian.net/browse/OTAGENT-834?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ f348903
Summary
ADP Pipeline component that drops spans (not yet supported: span events, metrics, datapoints, and logs) when any OTTL (OpenTelemetry Transformation Language) conditions evaluate to true.
Example of configuration:
Behavior is aligned with the OSS filterprocessor
Current support:
Change Type
How did you test this PR?
Manual tests
[OTAGENT-834](https://datadoghq.atlassian.net/browse/OTAGENT-834)