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

Requests per second per service over the last 5 minutes?

BeginnerProductionRapid-Fire PromQL & LogQL
Answer
sum by (service) (rate(http_requests_total[5m]))

rate() first on the raw counter (it handles resets), then sum by to drop pod and instance labels.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Rapid-Fire PromQL & LogQL