Skip to content

feat(agent-data-plane): add per-metric tag value filtering - #2158

Draft
lukesteensen wants to merge 2 commits into
mainfrom
experimental/tag-value-aggregation
Draft

feat(agent-data-plane): add per-metric tag value filtering#2158
lukesteensen wants to merge 2 commits into
mainfrom
experimental/tag-value-aggregation

Conversation

@lukesteensen

Copy link
Copy Markdown
Contributor

Summary

Note

This is an experimental proposal. In addition to implementation feedback, we are looking for
feedback on whether the configuration schema presents tag-value aggregation coherently.

Add per-metric tag-value filtering to metric_tag_filterlist before aggregation.

  • Allow configured tag values and remove or replace mismatches with a sentinel.
  • Require complete tag values to match a regular expression and replace non-matches.
  • Reject invalid or conflicting rules at startup; retain the last valid rules after invalid runtime updates.
  • Document current behavior and configuration-schema trade-offs.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

  • Ran all 51 tag-filterlist unit tests, including new coverage for allowlists, regular expressions, conflicts, origin tags, and dynamic updates.
  • Ran all 17 configuration-system tests.
  • Ran cargo check --workspace.
  • Ran cargo check --workspace --tests.
  • Ran workspace Clippy with warnings denied.
  • Ran formatting and git diff --check.

References

N/A

@lukesteensen lukesteensen added the type/experiment A change that is still currently being worked on or tested to prove viability. label Jul 17, 2026
@dd-octo-sts dd-octo-sts Bot added the area/docs Reference documentation. label Jul 17, 2026
@datadog-datadog-prod-us1-2

Copy link
Copy Markdown
Contributor

Pipelines

Unblock PR with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/saluki | check-docs   View in Datadog   GitLab

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5ee7dad | Docs | Datadog PR Page | Give us feedback!

@pr-commenter

pr-commenter Bot commented Jul 17, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 5e5efc9 · Comparison: 5ee7dad · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.60 MiB (baseline) vs 41.75 MiB (comparison)
Size Change: +160.83 KiB (+0.38%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
agent_data_plane::components::tag_filterlist +38.75 KiB 54
core +36.10 KiB 4117
figment +27.83 KiB 134
hashbrown +26.55 KiB 336
datadog_agent_commons::ipc::client -19.71 KiB 5
http_body_util -17.93 KiB 78
tonic +17.77 KiB 230
anon.7982b035c2501c8c015ba477222e7e44.7.llvm.16557284064573298568 -17.53 KiB 1
anon.1ef370b01afc3c06002d6efb66f80e95.853.llvm.4556770598221099425 +17.53 KiB 1
backon +16.62 KiB 2
alloc +10.89 KiB 608
tracing -10.08 KiB 13
saluki_common::resource_tracking::groups +9.09 KiB 13
axum +7.23 KiB 120
h2 +6.66 KiB 224
serde_json +6.59 KiB 127
anyhow +5.76 KiB 479
http +5.61 KiB 103
agent_data_plane::components::ottl_transform_processor -5.61 KiB 38
std -5.06 KiB 82
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +2.1%  +159Ki  +2.8%  +158Ki    [12859 Others]
  [NEW] +44.5Ki  [NEW] +44.4Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h3f138673993c17a5
  [NEW] +29.9Ki  [NEW] +29.8Ki    agent_data_plane::cli::dogstatsd::handle_dogstatsd_command::_{{closure}}::ha6527156150104f8
  [NEW] +28.2Ki  [NEW] +28.0Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::h75fc88cc95fe3068
  [NEW] +25.1Ki  [NEW] +24.9Ki    _<agent_data_plane::components::host_tags::HostTagsConfiguration as saluki_core::components::transforms::builder::SynchronousTransformBuilder>::build::_{{closure}}::h7dfd0f97fba7a60c
  [NEW] +25.0Ki  [NEW] +24.8Ki    agent_data_plane::internal::remote_agent::run_remote_agent_registration_loop::_{{closure}}::h4de6434850c2e827
  [NEW] +21.4Ki  [NEW] +21.2Ki    agent_data_plane::internal::env::ADPEnvironmentProvider::from_configuration::_{{closure}}::hc6140f422cee1eaa
  [NEW] +21.1Ki  [NEW] +21.0Ki    agent_data_plane::cli::debug::handle_debug_command::_{{closure}}::hb91c7e121632577d
  [NEW] +19.1Ki  [NEW] +19.0Ki    agent_data_plane::internal::env::workload::build_collector::_{{closure}}::h2ff3dd93fec26967
  [NEW] +18.3Ki  [NEW] +18.2Ki    _<backon::retry::Retry<B,T,E,Fut,FutureFn,SF$C&C$NF,AF> as core::future::future::Future>::poll::h329866718dea74d0
  [NEW] +17.5Ki  [NEW]     +76    anon.1ef370b01afc3c06002d6efb66f80e95.853.llvm.4556770598221099425
  [DEL] -17.5Ki  [DEL]     -76    anon.7982b035c2501c8c015ba477222e7e44.7.llvm.16557284064573298568
  [DEL] -19.6Ki  [DEL] -19.3Ki    datadog_agent_commons::ipc::client::RemoteAgentClient::from_client_configuration::_{{closure}}::_{{closure}}::_{{closure}}::h18654b85723a9839
  [DEL] -19.7Ki  [DEL] -19.6Ki    agent_data_plane::internal::env::workload::build_collector::_{{closure}}::h68611de26ec2eb21
  [DEL] -20.6Ki  [DEL] -20.5Ki    agent_data_plane::cli::debug::handle_debug_command::_{{closure}}::he56831c79dc35528
  [DEL] -21.5Ki  [DEL] -21.4Ki    agent_data_plane::internal::env::ADPEnvironmentProvider::from_configuration::_{{closure}}::h898bbdbcf376c435
  [DEL] -23.4Ki  [DEL] -23.2Ki    _<agent_data_plane::components::host_tags::HostTagsConfiguration as saluki_core::components::transforms::builder::SynchronousTransformBuilder>::build::_{{closure}}::hd971eda288ba5bd9
  [DEL] -25.0Ki  [DEL] -24.8Ki    agent_data_plane::internal::remote_agent::run_remote_agent_registration_loop::_{{closure}}::h1d86af97b2fd3319
  [DEL] -28.1Ki  [DEL] -27.9Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::hc7701488cdaf9708
  [DEL] -30.1Ki  [DEL] -29.9Ki    agent_data_plane::cli::dogstatsd::handle_dogstatsd_command::_{{closure}}::hd837c28d99cadabd
  [DEL] -43.9Ki  [DEL] -43.8Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h940827480ed79a43
  +0.4%  +160Ki  +0.5%  +159Ki    TOTAL

@pr-commenter

pr-commenter Bot commented Jul 17, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: b6e98b35-906d-4cd0-956d-0e5b0cf3062c
Baseline: 5e5efc94 · Comparison: 5ee7dad2 · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_idle memory ⚪ +0.86 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ +0.46 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ +0.45 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ +0.21 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ +0.18 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 137 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 43.1 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 65.2 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 191 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 29.2 MiB ≤ 40 MiB metrics profiles logs
Explanation

A 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 (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Reference documentation. type/experiment A change that is still currently being worked on or tested to prove viability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant