10 for an HTTP request metric or a large number for memory usage, is that a snapshot or a cumulative counter since the process started? Those are very different interpretations and change how you query and visualize metrics.
Prometheus supports four metric types — counters, gauges, histograms, and summaries. This guide focuses on the two simplest and most common types: counters and gauges.
Counters
A counter is a monotonically increasing value. It typically starts at0 when the instrumented process starts and increases until the process restarts (at which point it resets). Counters are used for values that accumulate over time, such as requests served or bytes transmitted. If a counter appears to decrease, it usually means the process restarted or the instrument was misused; Prometheus query functions are designed to handle these resets.
Example counter observed at multiple scrapes:
- Total HTTP requests served
- Total errors returned
- Total network bytes transmitted

- Per-second rate (instantaneous over range):
rate(http_requests_total[5m]) - Total increase in a time window:
increase(http_requests_total[1h])
Counters are monotonic — they only increase (except when a process restarts). Use PromQL functions like
rate() and increase() to convert cumulative counters into meaningful rates or deltas over time. These functions also handle counter resets for you.Gauges
A gauge represents a value that can go up or down and is scraped as a snapshot at the time of collection. Gauges are ideal for current-state measurements such as memory usage, the number of running processes, or queue depth. Client libraries typically expose operations to set a gauge to a specific value or to increment/decrement it. Example gauge:Counters vs. Gauges — Quick reference
When counters and gauges are not enough
Counters and gauges cover many scenarios, but they do not capture distributions (for example, the spread of request latencies across many requests). To observe distributions and percentiles you should use histograms or summaries:- Histograms expose bucketed counts, plus a
sumandcount, allowing you to compute percentiles and bucketed distributions server-side. - Summaries expose client-side calculated quantiles along with a
sumandcount.

Links and references
- Prometheus docs: https://prometheus.io/docs/
- PromQL reference: https://prometheus.io/docs/prometheus/latest/querying/basics/
- OpenMetrics format: https://openmetrics.io/