Concept
Cardinality
Cardinality is the number of distinct time series a metric produces: one for every unique combination of its label values. A label with a handful of values is cheap, while a label holding user IDs or raw URLs creates a new series for each one, and memory and cost grow with it. That is why metric labels are kept to small, fixed sets, and unbounded detail goes into logs and traces.
- 1 metric
- × 14 routes × 5 statuses (succeeds)
- = 70 series (succeeds)
- + a user ID label (fails)
- = millions of series (fails)
Where you'll see it
Nothing on the site names this term yet.
Related concepts
Sources: Prometheus: metric and label naming ↗ · Prometheus HTTP API: TSDB stats ↗ · Report a problem
The definition is in our own words.