---
title: ''
description: Telegraf plugin for transforming metrics using Tag Limit
url: https://docs.influxdata.com/telegraf/v1/processor-plugins/tag_limit/
estimated_tokens: 398
product: Telegraf Enterprise
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/processor-plugins/tag_limit/
date: '2026-05-21T20:10:18+02:00'
lastmod: '2026-05-21T20:10:18+02:00'
---

==========

* Telegraf v1.12.0+

[Plugin source](https://github.com/influxdata/telegraf/tree/v1.39.1/plugins/processors/tag_limit/)[Download configuration](https://raw.githubusercontent.com/influxdata/telegraf/refs/tags/v1.39.1/plugins/processors/tag_limit/sample.conf)

# Tag Limit Processor Plugin

This plugin ensures that only a certain number of tags are preserved for any
given metric, and to choose the tags to preserve when the number of tags
appended by the data source is over the limit.

This can be useful when dealing with output systems (e.g. Stackdriver) that
impose hard limits on the number of tags/labels per metric or where high
levels of cardinality are computationally and/or financially expensive.

**Introduced in:** Telegraf v1.12.0**Tags:** filtering**OS support:** all

## Global configuration options

Plugins support additional global and plugin configuration settings for tasks
such as modifying metrics, tags, and fields, creating aliases, and configuring
plugin ordering. See [CONFIGURATION.md](/telegraf/v1/configuration/#plugins) for more details.

## Configuration

```toml
# Restricts the number of tags that can pass through this filter and chooses which tags to preserve when over the limit.
[[processors.tag_limit]]
  ## Maximum number of tags to preserve
  limit = 3

  ## List of tags to preferentially preserve
  keep = ["environment", "region"]
```

## Example

```
+ throughput month=Jun,environment=qa,region=us-east1,lower=10i,upper=1000i,mean=500i 1560540094000000000
+ throughput environment=qa,region=us-east1,lower=10i 1560540094000000000

```
