Glossary

Cardinality

Cardinality is the number of distinct combinations of label values for a metric, and it is the primary driver of metric storage cost.

Short answer

What is cardinality?

Cardinality is the number of distinct combinations of label values for a metric, and it is the primary driver of metric storage cost.

Explained two ways

Plain and technical

In plain terms

Every unique combination of labels on a metric creates a separate series to store. Adding a label with many possible values (a user ID, for example) can multiply your storage cost enormously.

Technically

Each unique label combination is an independent time series with its own storage and memory footprint. Unbounded labels such as identifiers or full URL paths produce unbounded cardinality. The standard remedy is to move high-cardinality attributes onto traces and logs, which handle them naturally, and link back from metrics using exemplars.

Example

What it looks like in practice

A request counter labelled with route, method and status has bounded cardinality. The same counter labelled with a user identifier creates one series per user, which for a million users is a million series.
Keep going

More definitions

See these concepts in a running system

A 30-minute walkthrough against your own infrastructure rather than a slide about the theory.