Recording rules follow the naming form level:metric:operations: level is the aggregation level and labels of the rule output, metric is the metric name unchanged except for stripping _total off counters when using rate() or irate(), and operations lists the applied operations newest first — omitting _sum when other operations exist, merging associative operations, defaulting to sum when no operation is obvious, and joining divided metrics with per plus the operation ratio for ratios. When aggregating a ratio, aggregate the numerator and denominator separately and then divide; never average a ratio or an average of averages, which is not statistically valid. When computing average observation size from a Summary's _count and _sum, keep the metric name without those suffixes and replace rate with mean in the operation. Always specify a without clause with the labels being aggregated away so other labels such as job are preserved, avoiding conflicts. Aggregating removes the without-clause labels from the output level; when there is no aggregation the levels always match, and a mismatch signals a mistake. Scope: Prometheus. Reviewed October 4, 2026.
Recording rule naming and aggregation
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- prometheus.io
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.