Glossary · Observability
What Are Metrics (Counter, Gauge, Histogram)?
Dilip Namdev
May 2026
5 min read
Counters, gauges and histograms are the three metric shapes, and choosing the right one determines what questions you can answer.
Metrics are numeric measurements recorded over time. The three core instrument types are the counter (a cumulative value that only increases), the gauge (a value that goes up and down), and the histogram (a distribution of values bucketed for percentile analysis).
The three instrument types
Each metric type captures a different kind of measurement, and using the wrong one loses information, for example, recording latency as a gauge throws away the distribution you need for percentiles.
| Type | What it measures | Examples |
|---|---|---|
| Counter | A cumulative value that only goes up (reset on restart); you take its rate | Requests served, errors, bytes sent |
| Gauge | A value that can rise and fall, sampled at a point in time | Memory in use, queue depth, temperature |
| Histogram | A distribution of values into buckets, so you can compute percentiles | Request latency, payload size |
How it fits Opstral
Telemetry Ops ingests OpenTelemetry metrics of all three types, and Sentinel AI uses them, rates from counters, levels from gauges, latency percentiles from histograms, as inputs to detection and resolution.
Frequently asked questions
When should I use a histogram instead of a gauge?
Use a histogram when you care about the distribution, especially latency, because it lets you compute p95 and p99. A gauge only captures a single sampled value and cannot give you percentiles.
What is a counter used for?
Counting things that accumulate, like requests or errors; you typically graph the rate of a counter rather than its raw value.