<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Visualize metric data on Grafana Labs</title><link>https://grafana.com/docs/mimir/v2.15.x/visualize/</link><description>Recent content in Visualize metric data on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/mimir/v2.15.x/visualize/index.xml" rel="self" type="application/rss+xml"/><item><title>Visualize native histograms</title><link>https://grafana.com/docs/mimir/v2.15.x/visualize/native-histograms/</link><pubDate>Wed, 15 Apr 2026 06:27:12 +0000</pubDate><guid>https://grafana.com/docs/mimir/v2.15.x/visualize/native-histograms/</guid><content><![CDATA[&lt;h1 id=&#34;visualize-native-histograms&#34;&gt;Visualize native histograms&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Native histograms are an experimental feature of Grafana Mimir.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Prometheus native histograms are a data type in the Prometheus ecosystem that allow you to produce, store, and query a high-resolution &lt;a href=&#34;https://prometheus.io/docs/concepts/metric_types/#histogram&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;histogram&lt;/a&gt; of observations.
To learn more about the native histograms data type and how to start sending native histograms to Grafana Mimir,
refer to &lt;a href=&#34;../../send/native-histograms/&#34;&gt;Send native histograms to Mimir&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Not all visualizations support the native histogram data type. However, you can use the Prometheus Query Language (PromQL) to derive the floating point time series from a native histogram, and then use this series in a visualization.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;prometheus-query-language&#34;&gt;Prometheus Query Language&lt;/h2&gt;
&lt;p&gt;Use the Prometheus Query Language (PromQL) to query native histogram metrics. The data type of your query results depends on the query and the underlying data.&lt;/p&gt;
&lt;p&gt;For more information about PromQL, refer to &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/basics/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Querying Prometheus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following examples show common ways to derive floating point data type from native histograms data for visualizations and also how to convert existing queries using classic histograms into queries using native histograms.&lt;/p&gt;
&lt;p&gt;Note that the native histogram queries do not include the &lt;code&gt;_bucket&lt;/code&gt;, &lt;code&gt;_sum&lt;/code&gt; and &lt;code&gt;_count&lt;/code&gt; suffixes of classic histograms.&lt;/p&gt;
&lt;h3 id=&#34;query-your-histograms-count-or-sum&#34;&gt;Query your histogram’s count or sum&lt;/h3&gt;
&lt;p&gt;To query the total count of observations within a histogram, use the following queries:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;PromQL&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;# Native histograms:
histogram_count(sum(request_duration_seconds))

# Classic histograms:
sum(request_duration_seconds_count)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To query the total sum of observed values, use the following query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;PromQL&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;# Native histograms:
histogram_sum(sum(request_duration_seconds))

# Classic histograms:
sum(request_duration_seconds_sum)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;find-rate-of-observations&#34;&gt;Find rate of observations&lt;/h3&gt;
&lt;p&gt;To query the rate of all observations calculated over 5 minute time window, use the following query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;PromQL&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;# Native histograms:
histogram_count(sum(rate(request_duration_seconds[5m])))

# Classic histograms:
sum(rate(request_duration_seconds_count[5m]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To query the rate of observations between two values such as &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;2&lt;/code&gt; seconds, use the following query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;PromQL&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;# Native histograms:
histogram_fraction(0, 2, sum(rate(request_duration_seconds[5m])))
*
histogram_count(sum(rate(request_duration_seconds[5m])))

# Classic histograms:
sum(rate(request_duration_seconds_bucket{le=&amp;#34;2.5&amp;#34;}[5m]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;There is a native histogram function that estimates the fraction of the total number of observations that fall within a certain interval, such as &lt;code&gt;[0, 2]&lt;/code&gt;.
For more information, refer to &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_fraction&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;histogram fraction&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Classic histograms have no such function. Therefore, if the lower and upper bounds of the interval do not line up with the bucket boundaries of a classic histogram,
you have to estimate the fraction manually.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Only ever use the &lt;code&gt;histogram_fraction&lt;/code&gt; function by including &lt;code&gt;rate&lt;/code&gt; or &lt;code&gt;increase&lt;/code&gt; inside of it with a suitable range selector.
If you do not specify a range, such as &lt;code&gt;5m&lt;/code&gt;, the function uses the current value of the histogram.
In that case, the current value is an accumulated value over the lifespan of the histogram or since the histogram was last reset.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;quantiles&#34;&gt;Quantiles&lt;/h3&gt;
&lt;p&gt;To query an upper bound of observation values that 95% of observations fall under, use the following query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;PromQL&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;# Native histograms:
histogram_quantile(0.95, sum(rate(request_duration_seconds[5m])))

# Classic histograms:
histogram_quantile(0.95, sum by (le) (rate(request_duration_seconds_bucket[5m])))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Only ever use the &lt;code&gt;histogram_quantile&lt;/code&gt; function by including &lt;code&gt;rate&lt;/code&gt; or &lt;code&gt;increase&lt;/code&gt; inside of it with a suitable range selector.
If you do not specify a range, such as &lt;code&gt;5m&lt;/code&gt;, the function uses the current value of the histogram.
In that case, the current value is an accumulated value over the lifespan of the histogram or since the histogram was last reset.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;create-grafana-dashboards&#34;&gt;Create Grafana dashboards&lt;/h2&gt;
&lt;p&gt;The panel types &lt;a href=&#34;/docs/grafana/latest/panels-visualizations/visualizations/histogram/&#34;&gt;Histogram&lt;/a&gt; and &lt;a href=&#34;/docs/grafana/latest/panels-visualizations/visualizations/heatmap/&#34;&gt;Heatmap&lt;/a&gt; are compatible with the native histogram data type. Use these panel types to visualize a query, such as:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;PromQL&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-promql&#34;&gt;sum(rate(request_duration_seconds[$__rate_interval]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For all other panel types, for example &lt;a href=&#34;/docs/grafana/latest/panels-visualizations/visualizations/time-series/&#34;&gt;Timeseries&lt;/a&gt;, use one of the histogram functions in the &lt;a href=&#34;#prometheus-query-language&#34;&gt;Prometheus Query Language&lt;/a&gt; to visualize a derived float time series.&lt;/p&gt;
&lt;h2 id=&#34;grafana-classic-explore&#34;&gt;Grafana classic explore&lt;/h2&gt;
&lt;p&gt;In &lt;a href=&#34;/docs/grafana/latest/explore/&#34;&gt;Explore&lt;/a&gt;, use one of the histogram functions in &lt;a href=&#34;#prometheus-query-language&#34;&gt;Prometheus Query Language&lt;/a&gt; to visualize a derived float time series.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Visualizing native histogram data type directly without the histogram functions in the &lt;strong&gt;Explore&lt;/strong&gt; view is not supported at this time.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

]]></content><description>&lt;h1 id="visualize-native-histograms">Visualize native histograms&lt;/h1>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>Native histograms are an experimental feature of Grafana Mimir.&lt;/p>&lt;/blockquote>&lt;/div>
&lt;p>Prometheus native histograms are a data type in the Prometheus ecosystem that allow you to produce, store, and query a high-resolution &lt;a href="https://prometheus.io/docs/concepts/metric_types/#histogram" target="_blank" rel="noopener noreferrer">histogram&lt;/a> of observations.
To learn more about the native histograms data type and how to start sending native histograms to Grafana Mimir,
refer to &lt;a href="../../send/native-histograms/">Send native histograms to Mimir&lt;/a>.&lt;/p></description></item></channel></rss>