What are common mistakes with `histogram_quantile()`?

AdvancedConceptPromQL & Recording Rules
Answer
  • Dropping le during 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 +Inf bucket: 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 le sets give wrong results until old series age out.
All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on PromQL & Recording Rules