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

LogQL: error lines per app per minute in production?

BeginnerProductionRapid-Fire PromQL & LogQL
Answer
sum by (app) (count_over_time({namespace="prod"} |= "error" [1m]))

The stream selector narrows streams using the index; the |= line filter is a fast substring match applied before any parsing.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Rapid-Fire PromQL & LogQL