Unit content
Application metrics and dimensional telemetry
A metric summarizes measurements over time so a system can be monitored quantitatively.
Common metric forms include:
- a counter, which only increases between resets, such as total requests;
- a gauge, which represents a current value such as queue depth;
- a histogram, which groups observations such as request latency into ranges.
Metrics become more useful when they carry a small set of dimensions such as operation, status or region. These labels let one measurement be aggregated or split during analysis.
Label values must remain bounded. Using a user ID or request ID as a metric label can create millions of distinct time series and make the telemetry system itself expensive or unstable.
Rates and ratios are often derived from counters—for example failed requests divided by total requests over a window.
Metrics sacrifice per-event detail in exchange for efficient aggregation, making them well suited to trends, alerts and service-level measurements.