---
title: Filter Processor
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Observability Pipelines > Processors > Filter Processor
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Filter Processor

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}
Available for:
{% icon name="icon-logs" /%}
 Logs | 
{% icon name="icon-metrics" /%}
 Metrics 
## Overview{% #overview %}

This processor sends all logs or metrics that match the filter query to the next step in the pipeline. Logs or metrics that do not match the filter query are dropped and are not sent to any subsequent processors or destinations. **Note**: For all other processor queries, logs or metrics that don't match the query are sent to the subsequent step in the pipeline. They are not dropped.

## Setup{% #setup %}

To set up the filter processor:

- Define a filter query.**Notes**:
  - Logs or metrics that match the query are sent to the next component.
  - Logs or metrics that don't match the query are dropped.
  - For more information, see [Search Syntax for Logs](https://docs.datadoghq.com/observability_pipelines/search_syntax/logs.md) or [Search Syntax for Metrics](https://docs.datadoghq.com/observability_pipelines/search_syntax/metrics.md).

## Metrics{% #metrics %}

For [component metrics](https://docs.datadoghq.com/observability_pipelines/monitoring_and_troubleshooting/pipeline_usage_metrics.md#component-metrics) and [processor buffer metrics](https://docs.datadoghq.com/observability_pipelines/monitoring_and_troubleshooting/pipeline_usage_metrics.md#processor-buffer-metrics) emitted by all processors, see the [Pipelines Usage Metrics](https://docs.datadoghq.com/observability_pipelines/monitoring_and_troubleshooting/pipeline_usage_metrics.md) documentation. To filter or group by Filter processor metrics, use the tag `component_type:opw_filter`.

## Further reading{% #further-reading %}

- [Getting Started with Search in Datadog](https://docs.datadoghq.com/getting_started/search.md)
- [Log Management Search Syntax](https://docs.datadoghq.com/logs/explorer/search_syntax.md)
