[WIP] feat(saluki-components): add tag_filterlist transform#1247
[WIP] feat(saluki-components): add tag_filterlist transform#1247olivielpeau wants to merge 5 commits intomainfrom
Conversation
WIP: experimental and not tested e2e Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Binary Size Analysis (Agent Data Plane)Target: 1d50af4 (baseline) vs 1883d0b (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
core |
+29.52 KiB | 72 |
saluki_components::transforms::tag_filterlist |
+26.19 KiB | 18 |
serde_core |
+8.78 KiB | 8 |
agent_data_plane::cli::run |
+6.86 KiB | 1 |
[sections] |
+6.19 KiB | 6 |
hashbrown |
+5.59 KiB | 9 |
[Unmapped] |
+2.86 KiB | 1 |
saluki_config::dynamic::watcher |
-2.34 KiB | 1 |
saluki_context::hash::hash_context |
+2.15 KiB | 1 |
tokio |
+1.80 KiB | 1 |
saluki_core::topology::blueprint |
+1.19 KiB | 1 |
saluki_context::context::Context |
+887 B | 1 |
smallvec |
+753 B | 1 |
saluki_context::resolver::TagsResolver |
-574 B | 1 |
saluki_components::encoders::datadog |
+379 B | 2 |
serde_json |
+281 B | 1 |
saluki_config::secrets::resolver |
-88 B | 1 |
figment |
+76 B | 17 |
saluki_components::destinations::prometheus |
+59 B | 1 |
unicode_segmentation |
+16 B | 1 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
+2.9% +44.1Ki +2.8% +31.5Ki [520 Others]
[NEW] +12.6Ki [NEW] +12.4Ki _<core::marker::PhantomData<T> as serde_core::de::DeserializeSeed>::deserialize::h823409a611a5cfb1
[NEW] +12.4Ki [NEW] +12.2Ki _<saluki_components::transforms::tag_filterlist::TagFilterlist as saluki_core::components::transforms::Transform>::run::_{{closure}}::h1e5bf3828358757c
[NEW] +10.7Ki [NEW] +10.6Ki <saluki_core::data_model::event::Event as core::clone::Clone>::clone.10049
+6.0% +6.86Ki +6.0% +6.86Ki agent_data_plane::cli::run::create_topology::_{{closure}}::h4a1b0b37b7e2d03e
[NEW] +5.66Ki [NEW] +5.49Ki serde_core::de::impls::_<impl serde_core::de::Deserialize for alloc::vec::Vec<T>>::deserialize::h34dcebfa9500250f
[NEW] +5.52Ki [NEW] +5.38Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.8502
[NEW] +5.13Ki [NEW] +5.00Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.11186
[NEW] +4.76Ki [NEW] +4.61Ki _<core::marker::PhantomData<T> as serde_core::de::DeserializeSeed>::deserialize::h4e9adec8ddd65cfa
[NEW] +4.71Ki [NEW] +4.59Ki <rustls::error::Error as core::clone::Clone>::clone.10025
[NEW] +4.71Ki [NEW] +4.59Ki <rustls::error::Error as core::clone::Clone>::clone.11201
[NEW] +4.26Ki [NEW] +4.15Ki saluki_components::transforms::tag_filterlist::compile_filters::hd808d986c0d7a078
[NEW] +3.83Ki [NEW] +3.71Ki <webpki::error::Error as core::fmt::Debug>::fmt.11379
[NEW] +3.66Ki [NEW] +3.54Ki <rustls::error::Error as core::fmt::Debug>::fmt.9647
[DEL] -3.66Ki [DEL] -3.54Ki <rustls::error::Error as core::fmt::Debug>::fmt.9641
[DEL] -3.83Ki [DEL] -3.71Ki <webpki::error::Error as core::fmt::Debug>::fmt.11359
[DEL] -4.71Ki [DEL] -4.59Ki <rustls::error::Error as core::clone::Clone>::clone.11181
[DEL] -4.71Ki [DEL] -4.59Ki <rustls::error::Error as core::clone::Clone>::clone.10017
[DEL] -5.13Ki [DEL] -5.00Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.11166
[DEL] -5.52Ki [DEL] -5.38Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.8496
[DEL] -10.7Ki [DEL] -10.6Ki <saluki_core::data_model::event::Event as core::clone::Clone>::clone.10041
+0.3% +90.6Ki +0.3% +77.3Ki TOTAL
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: b1f6fe24-2ad2-4249-ba8d-990d465e1d49 Baseline: 1d50af4 Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +2.24 | [-2.81, +7.28] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | +0.02 | [-0.11, +0.14] | 1 | (metrics) (profiles) (logs) |
| ✅ | otlp_ingest_logs_5mb_memory | memory utilization | -11.58 | [-12.11, -11.06] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | +4.00 | [-1.96, +9.97] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +2.24 | [-2.81, +7.28] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | +1.33 | [-5.21, +7.86] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | +0.57 | [-0.78, +1.92] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_memory | memory utilization | +0.50 | [+0.16, +0.83] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | +0.49 | [+0.35, +0.62] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | +0.45 | [-30.54, +31.44] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | +0.37 | [+0.20, +0.54] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_cpu | % cpu utilization | +0.30 | [-1.84, +2.45] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | +0.24 | [+0.07, +0.42] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | +0.18 | [+0.00, +0.36] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | +0.13 | [+0.00, +0.25] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | +0.09 | [-0.09, +0.27] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | +0.06 | [-0.07, +0.18] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | +0.03 | [-0.14, +0.20] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | +0.02 | [-0.11, +0.14] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.05, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.05, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | -0.00 | [-0.02, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.13, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_throughput | ingress throughput | -0.00 | [-0.02, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_throughput | ingress throughput | -0.00 | [-0.02, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | -0.01 | [-0.03, +0.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | -0.07 | [-0.26, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | -0.07 | [-0.27, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_memory | memory utilization | -0.14 | [-0.38, +0.10] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | -0.17 | [-0.20, -0.14] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_memory | memory utilization | -0.32 | [-0.57, -0.07] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | -0.44 | [-0.58, -0.30] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_cpu | % cpu utilization | -1.12 | [-3.53, +1.30] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_cpu | % cpu utilization | -2.58 | [-4.81, -0.35] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | -2.73 | [-56.59, +51.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | -3.16 | [-3.42, -2.89] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | -4.95 | [-54.89, +45.00] | 1 | (metrics) (profiles) (logs) |
| ✅ | otlp_ingest_logs_5mb_memory | memory utilization | -11.58 | [-12.11, -11.06] | 1 | (metrics) (profiles) (logs) |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
|---|---|---|---|---|---|
| ✅ | quality_gates_rss_dsd_heavy | memory_usage | 10/10 | 112.32MiB ≤ 140MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | 33.63MiB ≤ 50MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | 52.71MiB ≤ 75MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | 167.54MiB ≤ 200MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | 21.23MiB ≤ 40MiB | (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".
Apply the same include/exclude tag filter to origin_tags using the existing `tags` list. Adds `with_origin_tags` and `with_tags_and_origin_tags` to `Context`, extracts `apply_tag_filter` helper, fast-paths empty origin_tags, and adds tests + benchmarks. Also, apply formatter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use foldhash for CompiledFilters and inner tag HashSets - Avoid String allocation on name lookup (pass &str via Borrow<str>) - Replace insert_tag (O(n) dedup) with extend (direct Vec push) since source tags are already unique - Skip context/Arc allocations when filtering produces no changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ad5686c to
1b71247
Compare
…ations Replace `b.iter` with `b.iter_batched(..., BatchSize::SmallInput)` in all 9 bench functions so that `Metric` construction happens in Criterion's setup phase and is excluded from the timed measurement. Only `filter_metric_tags` (and the `is_sketch()` guard for the non-distribution path) is now measured, giving a cleaner view of the actual transform cost. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Attempt at implementing the tag filterlist capability recently introduced in the core agent (DataDog/datadog-agent#44166) in ADP, with the aim of comparing performance with the core agent implementation.
This attempt implements tag filtering before aggregation, similar to the current core agent implementation (the other possible approach of implementing filtering after aggregation should be looked into separately and compared across representative benchmarks).
WIP:
filter_metric_tagsis the key function in the hot path)Change Type
How did you test this PR?
References