How do you visualize a Prometheus histogram as a heatmap in Grafana?
IntermediateConceptGrafana
Answer
Query the bucket rates grouped by le, set the query Format to Heatmap, and use the Heatmap panel:
sum by (le) (increase(http_request_duration_seconds_bucket{job="api"}[$__rate_interval]))
Grafana converts cumulative buckets into per-bucket counts. Each column is a time slice and color shows how many requests fell into each latency band, revealing bimodal latency that a p99 line hides.
More on Grafana
What is Grafana and what is it not?BeginnerWhat is a Grafana datasource and how do you provision one?BeginnerWhat are dashboard variables and what types exist?IntermediateHow do multi-value and "All" variables work in PromQL queries?IntermediateWhat are Grafana's built-in time variables?IntermediateWhat does "dashboards as code" mean and what are the options?Intermediate