What are common mistakes with `histogram_quantile()`?
AdvancedConceptPromQL & Recording Rules
Answer
- Dropping
leduring aggregation: result is empty or nonsense. - Applying it to raw bucket counters without
rate(): you get the quantile since process start. - Averaging quantiles:
avg(histogram_quantile(...))per pod is not the fleet p99. - Quantile landing in the
+Infbucket: it returns the upper bound of the last finite bucket, so p99 "stuck at 10s" means your buckets are too small. - Buckets changed between versions of the app: mixed
lesets give wrong results until old series age out.
More on PromQL & Recording Rules
What are the PromQL data types?BeginnerWhat label matchers does PromQL support?BeginnerExplain `rate()`.Beginner`rate()` vs `irate()`: what is the difference?IntermediateWhat does `increase()` return and why is it sometimes a non-integer?IntermediateWhy must you `rate()` before `sum()`, never the reverse?Intermediate