`histogram_quantile` returns `NaN`
IntermediateTroubleshootingPromQL and recording rules
Answer
Likely causes → No requests in the window (all bucket rates are 0), so the quantile is undefined.
Diagnose → sum(rate(http_request_duration_seconds_count[5m])) is 0.
Fix → Accept it as "no traffic", or filter: ... and sum(rate(..._count[5m])) > 0. In Grafana, set the panel to show NaN as null/gap.
Prevent → Alerts on latency should be combined with a minimum traffic condition.
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