# Metric Cardinality

> How many series a metric makes. Each mix of labels adds one.

**Field:** Infrastructure  
**Category:** Monitoring & Observability  
**Also known as:** High Cardinality, Label Cardinality, Cardinality Explosion

## Think of it like

Think of it like sorting socks. Sort by color and you get a few piles. Sort by owner and every sock needs its own pile.

## Definition

Metric cardinality is the number of separate time series a metric creates. A metric can carry labels, such as the page or the status code. Every new mix of label values starts a new series that has to be stored. A label with a few values is cheap. A label with millions of values, like a user ID, can make millions of series. That can swamp the whole system.

## Example

Emma adds a user ID label to her request count. She has 200,000 users, so one metric turns into 200,000 series. Her server runs out of memory.

## Why it matters

Cost and speed grow with the number of series. One careless label can slow every dashboard and alert.

## Common mistake

Putting IDs, emails or full web addresses in labels. Keep labels to small, fixed sets, and put the details in logs.

## Three principles

- **One series per mix.** Each mix of labels is stored apart.
- **Few values are cheap.** Status codes, regions, methods.
- **No endless labels.** User IDs belong in logs.

## Related terms

- [Metric (Monitoring)](https://learn.benibix.com/term/infrastructure/metric)
- [Prometheus](https://learn.benibix.com/term/infrastructure/prometheus)
- [Logging](https://learn.benibix.com/term/infrastructure/logging)
- [Telemetry](https://learn.benibix.com/term/infrastructure/telemetry)
- [Time Series Data](https://learn.benibix.com/term/data/time-series-data)

![One metric split by a status label into three lines for 200, 404 and 500. Beside it, the same metric split by a user ID label into a dense wall of thousands of thin lines.](https://learn.benibix.com/diagrams/inf4-cardinality.svg)

---

Source: https://learn.benibix.com/term/infrastructure/metric-cardinality
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
