Skip to content
Commitwise
Menu

Metric cardinality

The number of distinct time series a metric produces: one per combination of tag values. Unbounded tags like user ids make it explode.

Definition

A metric with tags method (5 values), status (10) and uri (50 templates) can produce 2,500 series, which is fine. Adding a customerId tag multiplies that by the number of customers, and the metrics backend runs out of memory or the bill explodes. Tags must have a small, bounded set of values; per-entity detail belongs in logs and traces.

In practice

http.server.requests tagged with the URI template /orders/{id}, not the raw path /orders/1042.

Related terms

Esc

Type to search the whole site.