integrations-core icon indicating copy to clipboard operation
integrations-core copied to clipboard

accept a list for skip all metrics matching a label

Open steveny91 opened this issue 2 months ago • 2 comments

What does this PR do?

This PR is in conjunction with a PR to change the config model for the exclude_metrics_by_label. Currently this params accepts both a dict and a list:

{
  "target_label_key": true,
  "target_label_value_list": ["bar", "baz"]
}

But this change allows for the below to keep the same behavior of existing configs.

{ 
  "target_label_key": "true",
  "target_label_key": ["true"],
  "target_label_value_list": ["bar", "baz"]
}

I think it aligns it more to the below: https://github.com/DataDog/integrations-core/pull/21583

I think the config example will change from:

   exclude_metrics_by_labels:
     worker: true
     pid:
     - '23'
     - '42'

to

   exclude_metrics_by_labels:
     worker: 
     - true
     pid:
     - '23'
     - '42'

steveny91 avatar Oct 23 '25 19:10 steveny91

Codecov Report

:x: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 91.11%. Comparing base (bcd706c) to head (8f6a3c4). :warning: Report is 5 commits behind head on master.

Additional details and impacted files
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Oct 23 '25 19:10 codecov[bot]

⚠️ Tests

⚠️ Warnings

❄️ 2 New flaky tests detected

test_common_metrics[False] from test_pg_integration.py (Datadog)
Some metrics are collected but not asserted:
Asserted Metrics:
	- dd.postgres.operation.time
	- postgresql.activity.wait_event
	- postgresql.archiver.archived_count
	- postgresql.archiver.failed_count
	- postgresql.before_xid_wraparound
	- postgresql.bgwriter.buffers_alloc
	- postgresql.bgwriter.buffers_backend
	- postgresql.bgwriter.buffers_backend_fsync
...
test_statement_metrics_and_plans[master-EXEC encryptedProc-expected_queries_patterns2-param_groups2-5-True-True-True-False-encryptedproc] from test_statements.py (Datadog)
missing expected matching rows
assert 0 == 1
 +  where 0 = len([])
 +  and   1 = len([''])

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8f6a3c4 | Docs | Was this helpful? Give us feedback!

datadog-official[bot] avatar Oct 23 '25 19:10 datadog-official[bot]