Explore
Metrics Aggregations
Histogram
2 min
a histogram is an aggregated metric type that represents the distribution of recorded values by grouping them into predefined buckets (ranges) each recorded value is placed into a bucket based on its range an opentelemetry histogram maintains the following for each measurement bucket counts how many values fell into each range sum total of all recorded values count total number of measurements storage in kloudmate when an opentelemetry histogram is ingested into kloudmate, it is stored as three separate metrics bucket time series naming format \<histogram metric name> bucket example http server duration bucket this is the most commonly used metric each time series represents a bucket range the value is the count of measurements that fell into that bucket, and the bucket boundary is stored using the prometheus style le (less than or equal) attribute/label sum time series naming format \<histogram metric name> sum represents the total sum of all recorded measurements count time series naming format \<histogram metric name> count represents the total number of recorded measurements quantiles the most useful aggregations derived from histogram buckets are quantiles (percentiles) quantiles from histograms are calculated using the https //clickhouse com/docs/sql reference/aggregate functions/reference/quantileprometheushistogram clickhouse function, which is functionally equivalent to prometheus’ https //prometheus io/docs/prometheus/latest/querying/functions/#histogram quantile the function operates on histogram bucket time series and estimates percentiles such as p99, p95, p90, p75, and p50 based on the bucket distribution it uses cumulative bucket counts along with the bucket boundaries ( le ) to interpolate quantile values applying a quantile (e g , p90) on a histogram metric in the explore page is equivalent to histogram quantile(0 90, rate(http request duration seconds bucket\[]))