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

Which jobs contribute the most series?

IntermediateProductionRapid-Fire PromQL & LogQL
Answer
topk(10, count by (job) ({__name__=~".+"}))

Run it ad hoc, not on a dashboard, because it touches every series. prometheus_tsdb_head_series gives the total cheaply, and the /tsdb-status page lists top metrics and labels by cardinality.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Rapid-Fire PromQL & LogQL