What is the difference between a Prometheus Gauge, Counter, and Histogram metric type?

Medium Topic: Observability May 24, 2026

Counter: A cumulative value that only increases (or resets to zero on restart). Use for: total requests, total errors, bytes sent. Never use for values that can go down.

Gauge: A value that can go up or down. Use for: current memory usage, active connections, queue depth, temperature.

Histogram: Samples observations and counts them in configurable buckets. Use for: request latency, response sizes. Allows you to calculate percentiles (p50, p95, p99) — critical for SLOs.

← Previous What are the three pillars of observability? Next → How do you avoid alert fatigue in a...

Practice Similar Questions

Back to Observability Topics