---
title: Tags Processor
description: >-
  Learn how to use the Tags processor to exclude or include specific tags in the
  Datadog tags array for logs from the Datadog Agent.
breadcrumbs: Docs > Observability Pipelines > Processors > Tags Processor
---

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

# Tags 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 
## Overview{% #overview %}

For logs coming from the Datadog Agent, use this processor to exclude or include specific tags in the Datadog tags (`ddtags`) array. Tags that are excluded or not included are dropped and may reduce your outbound log volume.

**Note**: This processor only keeps or drops tags that already exist in the `ddtags` array. It does not add new tags or attributes to a log. To add a new attribute to a log, use the [Edit Fields](https://docs.datadoghq.com/observability_pipelines/processors/edit_fields.md) processor.

## Setup{% #setup %}

To set up the processor:

1. Define a filter query. See [Logs Search Syntax](https://docs.datadoghq.com/observability_pipelines/search_syntax/logs.md) for more information.
   - Only logs matching the filter are processed.
   - All logs, regardless of whether they match the filter query, are sent to the next step in the pipeline.
1. Optionally, input a Datadog tags array for the Configure tags section. The supported formats are `["key:value", "key"]`. See [Define Tags](https://docs.datadoghq.com/getting_started/tagging.md#define-tags) for more information about the `key:value` format.
1. In the Configure tags section, choose whether to Exclude tags or Include tags. If you provided a tag array in the previous step, select the tag keys you want to configure. You can also manually add tag keys. **Note**: You can select up to 100 tags.
