How do you recreate the Loki log level histogram in the explorer?

I’m learning LogQL and pretty confused as to how I should recreate what seems like a decently simple graph:

I love how log levels are broken down on the timeline and find that super useful.

I’ve looked around for examples of how this is made and spent over an hour trying to create the panel myself, unsuccessfully. How might I go about creating this?


Hello @nickb352,
I’ve the same problem on my side. Any news ?
Thank you in advance.

Nope, I’ve gotten nothing yet!

Any news about this issue?

Also interested in how to replicate this

I’ve only found in their latest blog article that the histogram is done with the query sum by (level) (count_over_time({log query}[log volume interval])). But this does not really result in something usable as far as I can say.

Source: New in Grafana 8.4: How to use full-range log volume histograms with Grafana Loki | Grafana Labs

I was able to replicate this in a limited fashion using the following Panel JSON. There’s also a screenshot in the Gist:

Hi @monsdar ,
Can you please explain how to do that? I don’t know how to use the json you provided. Are you customize the existing chart in “Explore” or build a new dashboard?