How many metric types does Prometheus text format support?
Prometheus defines four core metric types in its official exposition format, which are: Counter, Gauge, Histogram, and Summary. These types represent the fundamental building blocks for expressing quantitative measurements of system performance, behavior, and state.
A Counter is a cumulative metric that only increases (e.g., number of requests served).
A Gauge represents a value that can go up and down, such as memory usage or temperature.
A Histogram samples observations (e.g., request durations) and counts them in configurable buckets, providing both counts and sum of observed values.
A Summary is similar to a histogram but provides quantile estimation over a sliding time window along with count and sum metrics.
These four types are the only officially supported metric types in the Prometheus text exposition format as defined by the Prometheus data model. Any additional metrics or custom naming conventions are built on top of these core types but do not constitute new types.
Extracted and verified from Prometheus official documentation sections on Metric Types and Exposition Formats in the Prometheus study materials.
Currently there are no comments in this discussion, be the first to comment!