fix(dogstatsd): Move the DSD prefix/filter component in front of the DSD enrich component#1575
Conversation
…nent to apply blocklist after remapping
Binary Size Analysis (Agent Data Plane)Target: 8965868 (baseline) vs a14cfcb (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
anon.2bef91b57997dcd336602b8dc2fe8990.2.llvm.18408503694074454322 |
+1.48 KiB | 1 |
anon.622dc811fe301019123f4e07631bd6c7.254.llvm.5230852459485666564 |
-1.48 KiB | 1 |
anon.8b81b8eb1ac445faa9e02aa301dced4e.1497.llvm.9961062273437274874 |
+1.24 KiB | 1 |
anon.622dc811fe301019123f4e07631bd6c7.18.llvm.5230852459485666564 |
-1.24 KiB | 1 |
anon.3fe086334a9f556d4cce3a92b5daae2f.31.llvm.6333889900533524017 |
-1.17 KiB | 1 |
anon.42e15881a3807d9e08454c3c9df27af0.105.llvm.17600934669959620026 |
+1.17 KiB | 1 |
anon.fec2ea894473053223f8a6b75ad6be44.168.llvm.4132632335714289129 |
-1.15 KiB | 1 |
anon.4a57507c4069b300dc7151613f5e4bf3.34.llvm.8370593609202636011 |
+1.15 KiB | 1 |
anon.4a57507c4069b300dc7151613f5e4bf3.412.llvm.8370593609202636011 |
+812 B | 1 |
anon.4a57507c4069b300dc7151613f5e4bf3.412.llvm.3553081907174791088 |
-811 B | 1 |
anon.facd3c337c8dcd330a569aa225085f1f.108.llvm.13032308475770315230 |
+745 B | 1 |
anon.42e15881a3807d9e08454c3c9df27af0.306.llvm.12346359758138022109 |
-744 B | 1 |
anon.ae03c1848ea9a743a5638bf33cf10665.1001.llvm.1832993645551364698 |
+726 B | 1 |
anon.622dc811fe301019123f4e07631bd6c7.356.llvm.5230852459485666564 |
-725 B | 1 |
anon.8b81b8eb1ac445faa9e02aa301dced4e.211.llvm.13941091674706208656 |
-652 B | 1 |
anon.8b81b8eb1ac445faa9e02aa301dced4e.211.llvm.9961062273437274874 |
+651 B | 1 |
anon.5cb9e416818518d6dd42723dba5b4056.92.llvm.9320009235808464563 |
-643 B | 1 |
anon.4a57507c4069b300dc7151613f5e4bf3.107.llvm.8370593609202636011 |
+642 B | 1 |
anon.8b81b8eb1ac445faa9e02aa301dced4e.944.llvm.9961062273437274874 |
+642 B | 1 |
anon.9e23f8b9adb79cf5b15b5fcc24d10a90.415.llvm.10719386448939319901 |
+642 B | 1 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
[NEW] +1.60Ki [NEW] +462 core::ptr::drop_in_place<alloc::boxed::Box<tokio::runtime::task::core::Cell<tokio::runtime::blocking::task::BlockingTask<tokio::fs::read::read<&std::path::PathBuf>::{{closure}}::{{closure}}>,tokio::runtime::blocking::schedule::BlockingSchedule>>>::hcdc9678dd5143f40
[NEW] +1.48Ki [NEW] +76 anon.2bef91b57997dcd336602b8dc2fe8990.2.llvm.18408503694074454322
[NEW] +1.24Ki [NEW] +91 anon.8b81b8eb1ac445faa9e02aa301dced4e.1497.llvm.9961062273437274874
[NEW] +1.17Ki [NEW] +22 anon.42e15881a3807d9e08454c3c9df27af0.105.llvm.17600934669959620026
[NEW] +1.15Ki [NEW] +92 anon.4a57507c4069b300dc7151613f5e4bf3.34.llvm.8370593609202636011
[NEW] +1.09Ki [NEW] +315 core::ptr::drop_in_place<tokio::sync::mpsc::bounded::Permit<saluki_core::health::LivenessResponse>>::h5d6a395a3a192271
[NEW] +1015 [NEW] +177 core::ptr::drop_in_place<tokio_stream::stream_ext::map::Map<tokio_stream::once::Once<containerd_protos::containerd_include::containerd::services::namespaces::v1::ListNamespacesRequest>,core::result::Result<containerd_protos::containerd_include::containerd::services::namespaces::v1::ListNamespacesRequest,tonic::status::Status>::Ok>>::h6fbef66dac65c78c
+5.2% +817 +5.2% +817 _<chrono::format::formatting::DelayedFormat<I> as core::fmt::Display>::fmt::h52f0b306efca5f53
[NEW] +813 [NEW] +29 core::error::Error::provide::hed2c01f29b70d88a
[NEW] +812 [NEW] +84 anon.4a57507c4069b300dc7151613f5e4bf3.412.llvm.8370593609202636011
-0.1% -610 [ = ] 0 [1905 Others]
[DEL] -811 [DEL] -84 anon.4a57507c4069b300dc7151613f5e4bf3.412.llvm.3553081907174791088
[DEL] -813 [DEL] -29 core::error::Error::provide::h9955c78991d9d3fc
-25.0% -817 -25.9% -817 chrono::format::formatting::write_rfc3339::hb315d0edc0939794
[DEL] -1015 [DEL] -177 core::ptr::drop_in_place<tokio_stream::stream_ext::map::Map<tokio_stream::once::Once<datadog_protos::agent_include::datadog::remoteagent::v1::RefreshRemoteAgentRequest>,core::result::Result<datadog_protos::agent_include::datadog::remoteagent::v1::RefreshRemoteAgentRequest,tonic::status::Status>::Ok>>::h4d080964f8da579e
[DEL] -1.10Ki [DEL] -315 core::ptr::drop_in_place<tokio::sync::mpsc::bounded::Permit<saluki_config::dynamic::event::ConfigUpdate>>::h5aec464b3def0b96
[DEL] -1.15Ki [DEL] -92 anon.fec2ea894473053223f8a6b75ad6be44.168.llvm.4132632335714289129
[DEL] -1.17Ki [DEL] -22 anon.3fe086334a9f556d4cce3a92b5daae2f.31.llvm.6333889900533524017
[DEL] -1.24Ki [DEL] -91 anon.622dc811fe301019123f4e07631bd6c7.18.llvm.5230852459485666564
[DEL] -1.48Ki [DEL] -76 anon.622dc811fe301019123f4e07631bd6c7.254.llvm.5230852459485666564
[DEL] -1.60Ki [DEL] -462 core::ptr::drop_in_place<alloc::boxed::Box<tokio::runtime::task::core::Cell<tokio::runtime::blocking::task::BlockingTask<tokio::fs::read_to_string::read_to_string<&std::path::Path>::{{closure}}::{{closure}}>,tokio::runtime::blocking::schedule::BlockingSchedule>>>::h934106080d0e7e92
-0.0% -624 [ = ] 0 TOTAL
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: 8c7b8575-72ee-44b9-8a9e-13c2a26e2251 Baseline: 8965868 Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +2.33 | [-2.35, +7.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | +0.01 | [-0.12, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | -2.51 | [-2.84, -2.18] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | +6.61 | [-51.01, +64.24] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_cpu | % cpu utilization | +2.33 | [+0.41, +4.25] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | +2.33 | [-2.35, +7.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | +1.41 | [+1.21, +1.62] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | +1.02 | [-0.29, +2.33] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | +0.44 | [+0.23, +0.66] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | +0.26 | [+0.11, +0.41] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | +0.17 | [+0.05, +0.30] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | +0.13 | [-0.03, +0.29] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | +0.07 | [-0.07, +0.21] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | +0.01 | [-0.18, +0.20] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | +0.01 | [-0.12, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_memory | memory utilization | +0.00 | [-0.24, +0.24] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.06, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.19, +0.19] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.06, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | -0.02 | [-0.07, +0.04] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | -0.04 | [-0.12, +0.03] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | -0.10 | [-0.25, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_throughput | ingress throughput | -0.12 | [-0.20, -0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_memory | memory utilization | -0.13 | [-0.29, +0.03] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | -0.16 | [-0.31, -0.00] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | -0.16 | [-0.30, -0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | -0.19 | [-0.25, -0.14] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_throughput | ingress throughput | -0.25 | [-0.32, -0.17] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | -0.33 | [-0.50, -0.16] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | -0.44 | [-0.58, -0.30] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_transform_5mb_memory | memory utilization | -0.48 | [-0.63, -0.33] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_ottl_filtering_5mb_cpu | % cpu utilization | -0.81 | [-3.04, +1.42] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | -1.63 | [-7.00, +3.73] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | -1.88 | [-7.77, +4.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_memory | memory utilization | -2.51 | [-2.84, -2.18] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | -3.81 | [-32.48, +24.85] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_cpu | % cpu utilization | -4.12 | [-6.15, -2.09] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | -5.75 | [-56.43, +44.94] | 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 | 121.48MiB ≤ 140MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | 40.41MiB ≤ 50MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | 60.48MiB ≤ 75MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | 179.50MiB ≤ 200MiB | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | 27.59MiB ≤ 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".
tobz
left a comment
There was a problem hiding this comment.
I think this makes sense to me if that's how we're doing it in the Core Agent.
Saying it out loud to try and not forget, but this is something that would be good to have a correctness test for... but I think we currently lack the ability to have lading spit out metrics with certain prefixes, which makes this infeasible to currently test.
Not a blocker to merging.
|
@tobz yup im working on adding the correctness test right now |
Ohhh, nice. I forgot about the support for specific metrics that got added to help with ASTA testing. 🙌🏻 |
…DSD enrich component (#1575) ## Summary <!-- Please provide a brief summary about what this PR does. This should help the reviewers give feedback faster and with higher quality. --> Move the DogStatsD mapper before dsd_prefix_filter. [Issue](https://datadoghq.atlassian.net/browse/DADP-67) This makes ADP match the Core Agent order: map the metric name first, then apply statsd_metric_namespace and metric blocklist/filterlist rules. This fixes cases where blocklist entries for mapped metric names were not applied. ## Change Type - [x] Bug fix - [ ] New feature - [ ] Non-functional (chore, refactoring, docs) - [ ] Performance ## How did you test this PR? <!-- Please how you tested these changes here --> The new correctness test sends the same DogStatsD traffic through Core Agent and ADP, then compares the emitted metrics. It generates two raw metric names: `mapper.blocklist.raw` `mapper.blocklist.keep` The DogStatsD mapper rewrites them as: `mapper.blocklist.raw` -> `mapper.blocklist.mapped` `mapper.blocklist.keep` -> `mapper.blocklist.allowed` The config blocklists only the mapped name: ``` statsd_metric_blocklist: - mapper.blocklist.mapped ``` So the expected result is: `mapper.blocklist.mapped` is dropped after remapping `mapper.blocklist.allowed` is still emitted If ADP applies the blocklist before the mapper, it checks `mapper.blocklist.raw`, misses the blocklist, then remaps it to `mapper.blocklist.mapped` and emits it. The correctness test catches that because Core Agent drops it but ADP would leak it. ## 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> b121f8f
Summary
Move the DogStatsD mapper before dsd_prefix_filter.
Issue
This makes ADP match the Core Agent order: map the metric name first, then apply statsd_metric_namespace and metric blocklist/filterlist rules. This fixes cases where blocklist entries for mapped metric names were not applied.
Change Type
How did you test this PR?
The new correctness test sends the same DogStatsD traffic through Core Agent and ADP, then compares the emitted metrics.
It generates two raw metric names:
mapper.blocklist.rawmapper.blocklist.keepThe DogStatsD mapper rewrites them as:
mapper.blocklist.raw->mapper.blocklist.mappedmapper.blocklist.keep->mapper.blocklist.allowedThe config blocklists only the mapped name:
So the expected result is:
mapper.blocklist.mappedis dropped after remappingmapper.blocklist.allowedis still emittedIf ADP applies the blocklist before the mapper, it checks
mapper.blocklist.raw, misses the blocklist, then remaps it tomapper.blocklist.mappedand emits it. The correctness test catches that because Core Agent drops it but ADP would leak it.References