`histogram_quantile` result jumps wildly between refreshes
AdvancedTroubleshootingPromQL and recording rules
Answer
Likely causes → le was dropped or aggregated incorrectly (sum without(le)), buckets are mixed across services with different boundaries, or the window is too short for low traffic.
Diagnose → Check the inner expression keeps le: sum by (le, service) (rate(..._bucket[5m])).
Fix → Always aggregate with by (le, ...), do not mix histograms with different bucket layouts, widen the window.
Prevent → Wrap quantile queries in recording rules such as service:http_request_duration_seconds:p99_5m.
More on PromQL and recording rules
A PromQL query in the UI returns `Empty query result` for a metric you can see on `/metrics`Beginner`rate(http_requests_total[1m])` returns nothing but `http_requests_total` has dataBeginner`rate()` applied to a gauge shows huge spikesBeginnerBinary operation fails: `many-to-many matching not allowed: matching labels must be unique on one side`Advanced`found duplicate series for the match group {pod="api-1"} on the right hand-side of the operation`IntermediateError ratio query returns no data during quiet hoursIntermediate