Skip to main content
This guide assumes you already have time-series panels that report latency percentiles such as P50, P95, and P99. Percentile charts are excellent for detecting regressions and triggering alerts, because they reduce a distribution to a few meaningful numbers. However, a single percentile line compresses an entire distribution into one value and can hide how latency actually changed. Did the whole traffic shift a little slower, or did a small subset of requests become very slow? A histogram or a heatmap can reveal those differences. For example, a P50 of 80 ms and a P99 of 2 s could mean many different things: perhaps 95% of responses are under 100 ms and a tiny cluster takes 2 s, or perhaps the entire distribution stretched between those values. Histograms and heatmaps help you disambiguate those scenarios. What to look for:
  • Uniform shift: every request is slightly slower.
  • Bimodal distribution: two common latency clusters, which often indicate two code paths or backends.
  • Small slow cluster: a minority of requests that are much slower — often points to a specific failing dependency or code path.
Grafana’s histogram panel consumes Prometheus histogram buckets and renders the distribution. When latency buckets are provided, the histogram places latency on the x-axis and frequency on the y-axis, making it easy to see whether most requests are clustered at 100 ms or spread across multiple modes.
A Grafana histogram panel showing frequency on the y-axis and time/latency buckets on the x-axis (50ms to 5s). Orange rounded bars indicate highest frequency around 100ms and much lower frequencies at larger time buckets.
That single-distribution clarity is immediately actionable: when you see one small slow cluster, you can investigate a specific code path or downstream dependency rather than applying broad performance changes. However, a histogram aggregated across the dashboard time range is a rollup — it loses the time dimension. If you aggregate bucket data over an hour, you get one distribution that hides when the change occurred. Heatmaps solve this by preserving time. In a heatmap, time runs along the x-axis, latency buckets along the y-axis, and color encodes frequency for each time/latency cell. Warmer colors indicate higher frequency. This view lets you see when distributions changed, whether the shift was gradual, sudden, intermittent, or tied to a deployment. A common SRE workflow:
  1. Use percentiles to detect a regression or an SLO breach.
  2. Open a heatmap to understand when the change happened.
  3. Inspect histograms for specific intervals to see the aggregate distribution during the incident window.
  4. Drill into logs, traces, or instrumentation once you understand whether the issue is systemic or path-specific.
A slide titled "Troubleshooting With Latency Percentiles and Heatmaps" showing a left-hand line chart of latency percentiles (p50, p95, p99) over time and a right-hand colorful heatmap of latency distributions with a color legend. The charts plot response times in milliseconds across a time axis from about 01:30 to 04:30.
Use percentiles for broad detection and alerting; use histograms to inspect an aggregated distribution for a specific range; and use heatmaps to preserve the time dimension and see how distributions evolve.
Quick comparison References and further reading Use this pattern in your observability workflow to go from detection (percentiles) to diagnosis (heatmaps + histograms) to remediation (traces/logs + fixes).

Watch Video

Practice Lab