Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/send-data/metrics/label-handling-and-limits.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/send-data/metrics/label-handling-and-limits/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Label handling and limits
Grafana Cloud Metrics enforces limits on label names and values to ensure efficient ingestion and querying. In some cases, it automatically adjusts values that exceed those limits.
Label name limits
The maximum label name length is 1024 characters. Label names may contain ASCII letters, numbers, and underscores. You cannot have a label name starting and ending with double underscores (__).
Label value limits
The maximum label value length is 2048 characters. This limit also applies to the metric name.
Automatic label value truncation
If a label value exceeds the maximum length, Grafana Cloud Metrics by default automatically truncates the value and appends a hash, so that the total length is 2048 characters. If you want Grafana Cloud to return an error instead, contact customer support.
This behavior ensures that:
- Metrics continue to be ingested instead of being rejected.
- Truncated values remain unique and avoid collisions.
You don’t need to configure this setting. However, be aware that very long label values may appear shortened with a suffix to preserve uniqueness.
Label count limits
Each series can have a maximum number of labels, which varies by configuration. If a series exceeds this limit, Grafana Cloud rejects the sample.
See also
Was this page helpful?
Related resources from Grafana Labs


