Agent-side filtering for DogStatsD custom metrics is in Preview.
Overview
Agent-side filtering enables you to filter out unused or unwanted DogStatsD custom metrics directly at the Datadog Agent, before sending them to Datadog. This can significantly reduce both indexed and ingested custom metric volume.
Filtering is performed at the Agent level but centrally managed through the Datadog UI, giving teams full visibility and control. You can create, update, and manage filtering policies in Datadog, streamlining metric governance while maintaining transparency.
Creating and updating filtering policies requires the metric_tags_write RBAC permission. All users can view filtering policies.
Prerequisites
Upgrade to Datadog Agent v7.67.0 or higher (v7.70.0 or higher is recommended).
Metric filtering policies are applied to all Agents v7.67.0+ with Remote Configuration enabled. Older Agent versions, or Agents with Remote Configuration disabled, do not apply filtering policies.
Policy updates are deployed to Agents in 1-2 minutes.
From the Metrics Settings page
Click + Create Policy.
Click Filter metrics.
Provide a description for the new policy.
Select the metrics to filter from the Metrics to Filter dropdown, or click Upload CSV.
If you choose to upload a CSV, select the file and click Open. You can use multiple CSVs to create the policy.
When you’re satisfied with the list of metrics to filter, click Save and Filter.
From the Metrics Summary page
Create a metric filtering policy from the Metrics Summary page using any of the following methods:
Enter a metric query in the search bar.
Click the three vertical dots button on the right-hand side of the screen.
Click Filter metrics.
In the Choose policy dropdown, click New Policy. Provide a description for the policy.
Review the Metrics to Filter. Click X on the right side of any row to remove a metric from the list, or click + Include More Metrics to add metrics to the list.
Click Save and Filter.
Click the three vertical dots button on the right-hand side of the screen.
Click Filter metrics.
In the Choose policy dropdown, click New Policy. Provide a description for the policy.
Enter a metric query in the Metrics to Filter field, or select metrics individually from the dropdown. Click X on the right side of any row to remove a metric from the list.
Click Save and Filter.
Click the three vertical dots button on the right-hand side of the screen.
Click Filter metrics.
In the Choose policy dropdown, click New Policy. Provide a description for the policy.
Click Upload CSV to the right of the Metrics to Filter field.
Select the CSV file, and click Open.
Review the metrics listed. Click X on the right side of any row to remove a metric from the list. If needed, upload additional CSV files, or add metrics through the Metrics to Filter field.
Select the metrics to filter from the Metrics to Filter dropdown, or click Upload CSV.
If you choose to upload a CSV, select the file and click Open.
Click Save and Filter.
From the Metrics Summary page
Edit a metric filtering policy from the Metrics Summary page using any of the following methods:
Enter a metric query in the search bar.
Click the three vertical dots button on the right-hand side of the screen.
Click Filter metrics.
In the Choose policy dropdown, select the policy to edit.
Review the Metrics to Filter and Existing metrics in policy lists. Click X on the right side of any row to remove a metric from the list, or click + Include More Metrics to add metrics to the list.
Click Save and Filter.
Click the three vertical dots button on the right-hand side of the screen.
Click Filter metrics.
In the Choose policy dropdown, select the policy to edit.
Select metrics individually from the Metrics to Filter dropdown. Click X on the right side of any row to remove a metric from the list.
Click Save and Filter.
Click the three vertical dots button on the right-hand side of the screen.
Click Filter metrics.
In the Choose policy dropdown, select the policy to edit.
Click Upload CSV to the right of the Metrics to Filter field.
Select the CSV file, and click Open.
Review the Metrics to Filter and Existing metrics in policy lists. Click X on the right side of any row to remove a metric from the list, or click + Include More Metrics to add metrics to the list.
{"data":[{"type":"filtered_metrics","id":"metric.name.one","attributes":{"updated_timestamp":1745954352}},{"type":"filtered_metrics","id":"metric.name.two""attributes":{"updated_timestamp":1745954389}}// ... up to ~10,000 entries
],"links":{"self":"/api/unstable/remote_config/products/metric_control/filtered_metrics/policies/{policy-id}?page[offset]=200&page[limit]=100","next":"/api/unstable/remote_config/products/metric_control/filtered_metrics/policies/{policy-id}?page[offset]=300&page[limit]=100","prev":"/api/unstable/remote_config/products/metric_control/filtered_metrics/policies/{policy-id}?page[offset]=100&page[limit]=100","first":"/api/unstable/remote_config/products/metric_control/filtered_metrics/policies/{policy-id}?page[offset]=0&page[limit]=100","last":"/api/unstable/remote_config/products/metric_control/filtered_metrics/policies/{policy-id}?page[offset]=9900&page[limit]=100"},"meta":{"agent_coverage_percent":100,"agents_with_latest_policy_count":4,"deployment_failure":{"failed_agent_count":0,"failure_message":""},"deployment_status":"Deployed to all Agents","deployment_strategy":"all","policy_name":"test_policy_1","total":7,"total_agent_count":4,"updated_by":"user@datadoghq.com","updated_timestamp":1758912365}}
{"data":[{"id":"06b-fab-47e","type":"filtered_metrics","attributes":{"count":85,"deployment_status":"Deployed to all Agents","deployment_strategy":"all","policy_name":"policy one","updated_by":"user@datadoghq.com","updated_timestamp":1758547485,"version":4}},{"id":"07b-201-47e","type":"filtered_metrics","attributes":{"count":8,"deployment_status":"Deployed to all Agents","deployment_strategy":"all","policy_name":"policy two","updated_by":"user@datadoghq.com","updated_timestamp":1758547212,"version":1}}]}
Preview limitations
This initial preview release includes the following limitations:
A maximum of 10,000 metric names can be filtered out.
Resource usage impact on the Agent is limited to up to 10MB of memory (RSS), and no increase to CPU usage.
Only DogStatsD metrics are supported.
Further reading
Additional helpful documentation, links, and articles: