Interview Prep/Monitoring & Observability/PromQL and recording rules

p99 latency is reported as exactly `10` seconds for hours

IntermediateTroubleshootingPromQL and recording rules
Answer

Likely causes → Requests exceed the highest finite bucket; histogram_quantile returns the upper bound of the last finite bucket when the quantile lands in +Inf.

Diagnose →

sum by (le) (rate(http_request_duration_seconds_bucket[5m]))

Look at how many observations sit above the top le.

Fix → Add higher buckets (e.g. 15, 30, 60) or move to native histograms.

Prevent → Design buckets around SLO thresholds plus headroom above the timeout.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on PromQL and recording rules