Skip to content

chore(ci): add tag filtering correctness tests#1297

Open
rayz wants to merge 2 commits intomainfrom
rayz/tagfilter-correctness
Open

chore(ci): add tag filtering correctness tests#1297
rayz wants to merge 2 commits intomainfrom
rayz/tagfilter-correctness

Conversation

@rayz
Copy link
Copy Markdown
Contributor

@rayz rayz commented Apr 1, 2026

Summary

PR title

Change Type

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

How did you test this PR?

CI

References

@dd-octo-sts dd-octo-sts bot added the area/core Core functionality, event model, etc. label Apr 1, 2026
@rayz rayz changed the base branch from main to rayz/tagfilter-implementation April 1, 2026 17:32
@dd-octo-sts dd-octo-sts bot added area/ci CI/CD, automated testing, etc. area/test All things testing: unit/integration, correctness, SMP regression, etc. and removed area/core Core functionality, event model, etc. labels Apr 1, 2026
@rayz rayz marked this pull request as ready for review April 1, 2026 17:39
@rayz rayz requested a review from a team as a code owner April 1, 2026 17:39
Copilot AI review requested due to automatic review settings April 1, 2026 17:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new correctness test case for DogStatsD tag filtering. The test verifies that tag filtering rules are correctly applied by the Datadog Agent and the ADP (Adaptive Data Plane) implementation. The PR introduces test configuration files, updates the CI/CD pipeline, and refactors the metrics normalization logic to ensure that metrics with the same tags in different orders are correctly recognized and merged as a single metric.

Changes:

  • Added a new correctness test case for DogStatsD tag filtering (dsd-tag-filterlist)
  • Refactored metrics normalization to normalize context tags before grouping metrics, ensuring tag order independence
  • Added unit test to verify correct metric deduplication when tags are in different order
  • Added Makefile target and GitLab CI job to execute the new test

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/correctness/dsd-tag-filterlist/config.yaml Test orchestration configuration defining baseline Agent (public Datadog Agent v7.76.2) and comparison target (ADP)
test/correctness/dsd-tag-filterlist/datadog.yaml Agent configuration with specific tag filtering rules (exclude/include/miss patterns)
test/correctness/dsd-tag-filterlist/millstone.yaml Metric generation configuration with fixed metric names and tag values to test filtering behavior
Makefile Added new test-correctness-dsd-tag-filterlist target following existing pattern
.gitlab/e2e.yml Added GitLab CI job for the new test, correctly not extending .test-correctness-adp-baseline since it uses a different baseline image
bin/correctness/ground-truth/src/analysis/metrics/types.rs Refactored normalization logic and added unit test for tag order normalization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tobz tobz force-pushed the rayz/tagfilter-implementation branch 3 times, most recently from 751d3a2 to 6fd3517 Compare April 3, 2026 14:44
@tobz tobz force-pushed the rayz/tagfilter-implementation branch from 6fd3517 to 35ed30b Compare April 6, 2026 16:29
@rayz rayz changed the base branch from rayz/tagfilter-implementation to main April 6, 2026 17:04
@rayz rayz force-pushed the rayz/tagfilter-correctness branch from a5b6896 to 3afa1d7 Compare April 6, 2026 17:26
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 6, 2026

Binary Size Analysis (Agent Data Plane)

Target: 5612418 (baseline) vs dadad04 (comparison) diff
Analysis Type: Stripped binaries (debug symbols excluded)
Baseline Size: 26.47 MiB
Comparison Size: 26.47 MiB
Size Change: +0 B (+0.00%)
Pass/Fail Threshold: +5%
Result: PASSED ✅

Changes by Module

Module File Size Symbols

Detailed Symbol Changes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 6, 2026

Regression Detector (Agent Data Plane)

Regression Detector Results

Run ID: 26e9fd2d-9d17-4c3d-8cd6-7bb6353ab586

Baseline: 5612418
Comparison: dadad04
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 +13.77 [+13.34, +14.20] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_throughput ingress throughput +0.02 [-0.11, +0.15] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_cpu % cpu utilization -0.14 [-5.24, +4.95] 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 +13.77 [+13.34, +14.20] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_cpu % cpu utilization +3.55 [-28.51, +35.61] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_cpu % cpu utilization +2.31 [+0.19, +4.43] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_cpu % cpu utilization +2.22 [-0.13, +4.58] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_cpu % cpu utilization +1.31 [-53.48, +56.09] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_cpu % cpu utilization +0.42 [-1.73, +2.56] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_memory memory utilization +0.31 [+0.13, +0.49] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_medium memory utilization +0.31 [+0.11, +0.50] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_cpu % cpu utilization +0.24 [-56.89, +57.36] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_throughput ingress throughput +0.19 [+0.05, +0.32] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_throughput ingress throughput +0.04 [-0.09, +0.16] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_throughput ingress throughput +0.02 [-0.11, +0.15] 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)
otlp_ingest_traces_ottl_filtering_5mb_throughput ingress throughput -0.00 [-0.02, +0.02] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_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.04, +0.03] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_throughput ingress throughput -0.00 [-0.13, +0.12] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_memory memory utilization -0.01 [-0.18, +0.15] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_heavy memory utilization -0.03 [-0.17, +0.10] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_memory memory utilization -0.06 [-0.23, +0.11] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_memory memory utilization -0.09 [-0.27, +0.10] 1 (metrics) (profiles) (logs)
quality_gates_rss_idle memory utilization -0.10 [-0.13, -0.08] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_memory memory utilization -0.11 [-0.35, +0.14] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_cpu % cpu utilization -0.13 [-1.59, +1.33] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_memory memory utilization -0.13 [-0.30, +0.04] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_cpu % cpu utilization -0.14 [-5.24, +4.95] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_memory memory utilization -0.18 [-0.51, +0.16] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_memory memory utilization -0.38 [-0.64, -0.13] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_low memory utilization -0.40 [-0.59, -0.21] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_ultraheavy memory utilization -0.61 [-0.74, -0.48] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_cpu % cpu utilization -0.64 [-6.78, +5.50] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_memory memory utilization -1.01 [-1.24, -0.78] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_cpu % cpu utilization -1.93 [-7.92, +4.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 115.48MiB ≤ 140MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_low memory_usage 10/10 33.98MiB ≤ 50MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_medium memory_usage 10/10 54.18MiB ≤ 75MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 169.87MiB ≤ 200MiB (metrics) (profiles) (logs)
quality_gates_rss_idle memory_usage 10/10 21.28MiB ≤ 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".

Copy link
Copy Markdown
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

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

Diff looks good now, only test code 👍

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

Labels

area/ci CI/CD, automated testing, etc. area/test All things testing: unit/integration, correctness, SMP regression, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants