What are the four Prometheus metric types?
BeginnerConceptObservability Fundamentals & Signals
Answer
- Counter: only goes up (or resets to zero on restart). Requests served, errors, bytes sent.
- Gauge: goes up and down. Memory in use, queue depth, temperature.
- Histogram: counts observations into configurable buckets plus
_sumand_count. Latency, response size. - Summary: client-side calculated quantiles plus
_sumand_count.
Note that on the wire Prometheus is mostly untyped; types are conventions and metadata, which is why naming (_total, _bucket) matters.
More on Observability Fundamentals & Signals
What is the difference between monitoring and observability?BeginnerWhat are the "three pillars" of observability, and what is the fourth signal people now add?BeginnerWhen would you reach for metrics, logs, traces or profiles during an incident?BeginnerWhy should you never use a gauge to count requests?BeginnerHistogram vs summary: what is the real difference, and which do you choose?IntermediateWhat are native (sparse) histograms in Prometheus?Advanced