metric type
also: metric category, time series type
In monitoring systems, a metric type is the classification of a monitored value (counter, gauge, histogram, or summary) that determines how the data is collected, stored, and aggregated over time.
A metric type defines the behavior and semantic meaning of a measured value in observability and monitoring contexts. Different types handle data differently: a counter only increases (like total requests), a gauge can go up or down (like memory usage), a histogram samples observations into buckets (like request latency), and a summary calculates quantiles over time (like response time percentiles).
Choosing the correct metric type is essential because it affects how the monitoring system aggregates and interprets data. For example, if you accidentally use a gauge for total HTTP requests instead of a counter, the system won't correctly calculate the rate of requests per second.
Prometheus is a common system that uses explicit metric types: http_requests_total as a counter, memory_usage_bytes as a gauge, and request_duration_seconds as a histogram. Understanding metric types helps write meaningful monitoring queries and alerts.