Skip to content

feat(dogstatsd): Add post aggregation histogram filter component#1558

Merged
aqian01 merged 5 commits into
mainfrom
andrewq/add_missing_telemetry_amcc
May 4, 2026
Merged

feat(dogstatsd): Add post aggregation histogram filter component#1558
aqian01 merged 5 commits into
mainfrom
andrewq/add_missing_telemetry_amcc

Conversation

@aqian01
Copy link
Copy Markdown
Contributor

@aqian01 aqian01 commented May 1, 2026

Summary

DogStatsD histograms are expanded after aggregation into metrics like .max, .avg, .count, and .95percentile.

This filter runs after aggregation so we can drop those generated histogram metrics, since they do not exist yet when the original DogStatsD sample is received.

This PR adds an ADP-only DogStatsD post-aggregate filter transform that runs immediately after dsd_agg.

Change Type

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

How did you test this PR?

Unit tests

References

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 1, 2026

Binary Size Analysis (Agent Data Plane)

Target: 507d913 (baseline) vs fae4876 (comparison) diff
Analysis Type: Stripped binaries (debug symbols excluded)
Baseline Size: 36.78 MiB
Comparison Size: 36.95 MiB
Size Change: +179.28 KiB (+0.48%)
Pass/Fail Threshold: +5%
Result: PASSED ✅

Changes by Module

Module File Size Symbols
figment +73.50 KiB 33
core +30.34 KiB 1636
agent_data_plane::components::dogstatsd_post_aggregate_filter +26.61 KiB 23
axum +21.98 KiB 31
saluki_app::api::APIBuilder -21.39 KiB 8
alloc +15.10 KiB 116
serde_core +13.50 KiB 68
[sections] +12.65 KiB 8
agent_data_plane::cli::run +12.48 KiB 5
prost +11.12 KiB 33
saluki_env::workload::providers -10.10 KiB 2
bytes -8.18 KiB 19
tower +7.68 KiB 26
saluki_core::state::reflector +6.54 KiB 3
saluki_config::dynamic::watcher +6.14 KiB 3
agent_data_plane::components::tag_filterlist -5.88 KiB 7
saluki_config::GenericConfiguration::try_get_typed +5.14 KiB 4
ottl::parser::arena -5.12 KiB 4
tonic_prost -5.07 KiB 7
quick_cache +5.04 KiB 8

Detailed Symbol Changes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.9%  +111Ki  +1.5% +65.9Ki    [6719 Others]
  [NEW] +34.7Ki  [NEW] +34.6Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::hd550f8201c462891
  [NEW] +21.2Ki  [NEW] +21.0Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::h722cdd348b224acf
  +100% +18.9Ki  +100% +18.8Ki    saluki_env::workload::providers::remote_agent::build_collector::_{{closure}}::hc014c2e4b066be19
  [NEW] +14.2Ki  [NEW] +14.1Ki    _<figment::value::de::ConfiguredValueDe<I> as serde_core::de::Deserializer>::deserialize_struct::h9d779790736af4a3
  [NEW] +12.6Ki  [NEW] +12.5Ki    h2::server::Connection<T,B>::poll_closed::h6ef09ff3c0430f9e
  [NEW] +12.5Ki  [NEW] +12.4Ki    h2::server::Connection<T,B>::poll_closed::hd75f66186bf27b9e
  [NEW] +11.5Ki  [NEW] +11.2Ki    _<agent_data_plane::components::dogstatsd_post_aggregate_filter::DogStatsDPostAggregateFilter as saluki_core::components::transforms::Transform>::run::_{{closure}}::ha89a4503494ea75e
  +6.5% +9.66Ki  +6.5% +9.66Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::hcb488865a6b60fa9
 +17e2% +7.04Ki +28e2% +7.04Ki    _<hyper::server::conn::http1::Connection<I,S> as core::future::future::Future>::poll::h536fc097bc7c8eea
 +17e2% +6.97Ki +28e2% +6.97Ki    _<hyper::server::conn::http1::Connection<I,S> as core::future::future::Future>::poll::h586c4cdd2c008b4d
  +0.6% +6.30Ki  +0.6% +6.30Ki    [section .gcc_except_table]
 +11e2% +5.92Ki +13e2% +5.92Ki    saluki_core::state::reflector::Store<P>::process::h46df878273936e68
  [DEL] -5.70Ki  [DEL] -5.44Ki    agent_data_plane::components::ottl_filter_processor::config::_::_<impl serde_core::de::Deserialize for agent_data_plane::components::ottl_filter_processor::config::OttlFilterConfig>::deserialize::hc32e333e236cfcf0
  [DEL] -5.93Ki  [DEL] -5.75Ki    _<agent_data_plane::state::metrics::AggregatedMetricsProcessor as saluki_core::state::reflector::Processor>::process::hbdc920fddb89b26a
  [DEL] -7.29Ki  [DEL] -7.19Ki    h2::proto::connection::Connection<T,P,B>::poll::h8850b0c08737abb9
  [DEL] -7.45Ki  [DEL] -7.34Ki    h2::proto::connection::Connection<T,P,B>::poll::h2e92fe94476bb271
 -63.9% -8.29Ki -64.7% -8.29Ki    _<alloc::collections::btree::map::BTreeMap<K,V> as figment::coalesce::Coalescible>::coalesce::hf23dc7a18c0e6819
  [DEL] -14.9Ki  [DEL] -14.8Ki    hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_catch::h86548adaece2a975
  [DEL] -15.1Ki  [DEL] -15.0Ki    hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_catch::hf80a26e82cdb47d5
 -50.7% -29.0Ki -50.8% -29.0Ki    saluki_env::workload::providers::remote_agent::RemoteAgentWorkloadProvider::from_configuration::_{{closure}}::h0143b1bd6ee51cad
  +0.5%  +179Ki  +0.4%  +133Ki    TOTAL

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 1, 2026

Regression Detector (Agent Data Plane)

Regression Detector Results

Run ID: e2dde32e-85f2-470a-88b9-1b71ce2d75f4

Baseline: 507d913
Comparison: ac12914
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
otlp_ingest_logs_5mb_memory memory utilization +2.86 [+2.43, +3.30] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_throughput ingress throughput -0.00 [-0.12, +0.12] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_cpu % cpu utilization -0.68 [-5.53, +4.18] 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 +2.86 [+2.43, +3.30] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_throughput ingress throughput +2.85 [+2.74, +2.97] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_cpu % cpu utilization +1.96 [-0.20, +4.13] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_cpu % cpu utilization +0.88 [-5.18, +6.94] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_memory memory utilization +0.78 [+0.63, +0.93] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_medium memory utilization +0.73 [+0.56, +0.90] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_memory memory utilization +0.66 [+0.51, +0.82] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_memory memory utilization +0.47 [+0.32, +0.61] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_ultraheavy memory utilization +0.45 [+0.31, +0.58] 1 (metrics) (profiles) (logs)
quality_gates_rss_idle memory utilization +0.35 [+0.31, +0.40] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_heavy memory utilization +0.31 [+0.18, +0.44] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_memory memory utilization +0.30 [+0.15, +0.45] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_memory memory utilization +0.21 [+0.05, +0.38] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_memory memory utilization +0.19 [-0.05, +0.43] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_memory memory utilization +0.09 [-0.07, +0.25] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_low memory utilization +0.06 [-0.10, +0.22] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_throughput ingress throughput +0.02 [-0.05, +0.10] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_throughput ingress throughput +0.01 [-0.16, +0.17] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_throughput ingress throughput +0.00 [-0.04, +0.04] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_throughput ingress throughput +0.00 [-0.06, +0.06] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_throughput ingress throughput -0.00 [-0.12, +0.12] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_throughput ingress throughput -0.00 [-0.05, +0.05] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_throughput ingress throughput -0.00 [-0.19, +0.19] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_throughput ingress throughput -0.02 [-0.09, +0.05] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_memory memory utilization -0.06 [-0.22, +0.09] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_cpu % cpu utilization -0.16 [-1.50, +1.19] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_throughput ingress throughput -0.23 [-0.31, -0.15] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_cpu % cpu utilization -0.24 [-2.19, +1.71] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_cpu % cpu utilization -0.68 [-5.53, +4.18] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_memory memory utilization -0.79 [-0.95, -0.64] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_cpu % cpu utilization -1.69 [-7.26, +3.87] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_cpu % cpu utilization -1.71 [-57.33, +53.92] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_cpu % cpu utilization -2.18 [-4.44, +0.08] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_cpu % cpu utilization -4.48 [-32.46, +23.49] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_cpu % cpu utilization -9.24 [-59.01, +40.53] 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 122.12MiB ≤ 140MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_low memory_usage 10/10 40.33MiB ≤ 50MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_medium memory_usage 10/10 60.45MiB ≤ 75MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 177.57MiB ≤ 200MiB (metrics) (profiles) (logs)
quality_gates_rss_idle memory_usage 10/10 27.50MiB ≤ 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:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. 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.

  3. Its configuration does not mark it "erratic".

@aqian01 aqian01 force-pushed the andrewq/add_missing_telemetry_amcc branch from b677a0d to 79e72a5 Compare May 1, 2026 19:54
@dd-octo-sts dd-octo-sts Bot added area/components Sources, transforms, and destinations. transform/aggregate Aggregate transform. labels May 4, 2026
@aqian01 aqian01 marked this pull request as ready for review May 4, 2026 14:12
@aqian01 aqian01 requested a review from a team as a code owner May 4, 2026 14:12
@aqian01
Copy link
Copy Markdown
Contributor Author

aqian01 commented May 4, 2026

There is also a rounding change to match Core Agent behavior. The Agent parses histogram percentiles with int(i*100 + 0.5), so values like 0.299 map to 30percentile, not 29percentile.

Agent reference: https://github.com/DataDog/datadog-agent/blob/12213fe95538f47d98d73bd945a87b3e24189285/pkg/metrics/histogram.go#L53-L70

Copy link
Copy Markdown
Member

@tobz tobz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly nits, but one change related to one of the unit tests.

Comment thread bin/agent-data-plane/src/components/dogstatsd_post_aggregate_filter/mod.rs Outdated
Comment on lines +187 to +192
struct EffectiveFilterlist {
metric_filterlist: Vec<String>,
metric_filterlist_match_prefix: bool,
metric_blocklist: Vec<String>,
metric_blocklist_match_prefix: bool,
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saying this out loud so I don't forget it, but it's not a change we need to/should make here: since this code is now duplicated between the DSD Prefix Filter transform and the Tag Filterlist transform and this transform... it could potentially make sense for us to pull the DSD Prefix Filter transform into the agent-data-plane crate and stick these helper types in a common module where they can all be depended on.

Comment thread bin/agent-data-plane/src/components/dogstatsd_post_aggregate_filter/mod.rs Outdated
Comment thread bin/agent-data-plane/src/components/dogstatsd_post_aggregate_filter/mod.rs Outdated
@aqian01 aqian01 merged commit cf28497 into main May 4, 2026
72 of 73 checks passed
@aqian01 aqian01 deleted the andrewq/add_missing_telemetry_amcc branch May 4, 2026 16:18
dd-octo-sts Bot pushed a commit that referenced this pull request May 4, 2026
## Summary
<!-- Please provide a brief summary about what this PR does. -->
DogStatsD histograms are expanded after aggregation into metrics like
<name>.max, <name>.avg, <name>.count, and <name>.95percentile.

This filter runs after aggregation so we can drop those generated
histogram metrics, since they do not exist yet when the original
DogStatsD sample is received.

This PR adds an ADP-only DogStatsD post-aggregate filter transform that
runs immediately after `dsd_agg`.

## Change Type
- [ ] Bug fix
- [x] New feature
- [ ] Non-functional (chore, refactoring, docs)
- [ ] Performance

## How did you test this PR?
<!-- Please how you tested these changes here -->

Unit tests

## References

<!-- Please list any issues closed by this PR. -->

<!--
- Closes: <issue link>
-->

<!-- Any other issues or PRs relevant to this PR? Feel free to list them
here. --> cf28497
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request May 6, 2026
…and share filterlist helpers (#1598)

## Summary
<!-- Please provide a brief summary about what this PR does.
This should help the reviewers give feedback faster and with higher quality. -->

Follow up PR for this [comment](#1558)

Moves the DogStatsD prefix filter into ADP and adds shared filterlist helpers. The prefix and post-aggregate filters now use the same blocklist matching and filterlist fallback logic instead of duplicating it.

## Change Type
- [ ] Bug fix
- [ ] New feature
- [x] Non-functional (chore, refactoring, docs)
- [ ] Performance


## How did you test this PR?
<!-- Please how you tested these changes here -->

Existing tests still verify behaviour. 

## References

<!-- Please list any issues closed by this PR. -->

<!--
- Closes: <issue link>
-->

<!-- Any other issues or PRs relevant to this PR? Feel free to list them here. -->


Co-authored-by: andrew.qian <andrew.qian@datadoghq.com>
dd-octo-sts Bot pushed a commit that referenced this pull request May 6, 2026
…and share filterlist helpers (#1598)

## Summary
<!-- Please provide a brief summary about what this PR does.
This should help the reviewers give feedback faster and with higher quality. -->

Follow up PR for this [comment](#1558)

Moves the DogStatsD prefix filter into ADP and adds shared filterlist helpers. The prefix and post-aggregate filters now use the same blocklist matching and filterlist fallback logic instead of duplicating it.

## Change Type
- [ ] Bug fix
- [ ] New feature
- [x] Non-functional (chore, refactoring, docs)
- [ ] Performance

## How did you test this PR?
<!-- Please how you tested these changes here -->

Existing tests still verify behaviour.

## References

<!-- Please list any issues closed by this PR. -->

<!--
- Closes: <issue link>
-->

<!-- Any other issues or PRs relevant to this PR? Feel free to list them here. -->

Co-authored-by: andrew.qian <andrew.qian@datadoghq.com> 6dbc4cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/components Sources, transforms, and destinations. mergequeue-status: done transform/aggregate Aggregate transform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants