What is the difference between `count`, `count_over_time` and `count_values`?

IntermediateConceptPromQL & Recording Rules
Answer
  • count(up == 1): number of series at this instant (targets up now).
  • count_over_time(up[1h]): number of samples per series in the last hour (detects missed scrapes).
  • count_values("version", build_info): counts series grouped by their value, writing the value into a label; useful for "how many pods run each version" when versions are numeric.
All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on PromQL & Recording Rules