Metric Cardinality and Labeling Best Practices
Learn how labels create cardinality, why high cardinality breaks metric systems, and how to design label schemes that stay fast and affordable.
What Is Cardinality?
Cardinality is the number of unique time series produced by a metric. Each distinct combination of a metric name and its label values is a separate series.
http_requests_total{method="GET"}is one series- Adding
status="200"multiplies the count
Labels Multiply
Cardinality grows by the product of the number of values per label. Three methods times five status codes times ten endpoints equals 150 series for one metric.
method: 3 values
status: 5 values
endpoint: 10 values
=> 3 * 5 * 10 = 150 seriesAll lessons in this course
- Types of Metrics Explained
- Metric Collection Strategies
- Metric Visualization and Alerting
- Metric Cardinality and Labeling Best Practices