Interview Prep/Monitoring & Observability/Rapid-Fire PromQL & LogQL

p99 latency per route from a histogram?

IntermediateProductionRapid-Fire PromQL & LogQL
Answer
histogram_quantile(0.99,
  sum by (le, route) (rate(http_request_duration_seconds_bucket[5m])))

Keep le in the by clause. For native histograms drop _bucket and le: histogram_quantile(0.99, sum by (route) (rate(http_request_duration_seconds[5m]))).

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Rapid-Fire PromQL & LogQL