Labels add dimensions
A bare metric name gives one number. Labels, which are key value pairs attached to a metric, turn it into a multidimensional cube you can slice and group. The label keys are the dimensions.
What labels let you do
- Filter by selecting series where a label matches a value.
- Group by a dimension to aggregate, such as requests per region.
- Join across metrics that share labels.
Good labeling discipline
- Use a small, stable set of dimensions per metric.
- Prefer bounded values like status class over raw status text.
- Keep label keys consistent across metrics so you can group uniformly.
The cost side
Each label value combination is a separate series, so labels trade query flexibility for storage and index cost. Choose dimensions that you will actually slice by.
Key idea
Labels are the dimensions that make metrics sliceable, but each combination is its own series, so pick a small bounded set you will truly query.