Grafana Pie Chart Panel

Hello,

I’m looking for a way, how we can build a pie chart panel in grafana,
I have logs coming to loki -

  • testlogpushed executionTime: 99ms*
  • testlogpushed executionTime: 150ms*
  • testlogpushed executionTime: 190ms*
  • testlogpushed executionTime: 200ms*

I’m looking to build a pie chart that represents, different ranges, like 0-100, 100-200, 200-300, ranges and should have count values representing number of logs, that fall under this range ,
example:

0-100 : 50 logs with executiontime ranging between 0-100ms
100-200 : 30 logs with executiontime ranging between 100-200ms
200-300 : 30 logs with executiontime ranging between 200-300ms

Thanks,

maybe you can leverage regex or pattern to extract the data and do your counts and group bys

{filename="/tmp/jazz.log"} | pattern `<message> <_> <timer>`

–regex

{filename="/tmp/jazz.log"} 
| regexp `(?P<message>\w+) (?P<label>\w+:) (?P<elaspsed>\d+)`