How to get dashboard load time/user spent time from Grafana server logs

Hey guys!
I want to aggregate the grafana logs, but most of the logs are a succession of logs triggered by a single action on Grafana.
I’d like to extract the time spent on a dashboard and the time taken to load the dashboard, but as this is my first time with grafana logs, I need your help. Thanks in advance

logger=cleanup t=2023-10-27T08:05:20.608264491+02:00 level=info msg="Completed cleanup jobs" duration=15.360827ms
logger=cleanup t=2023-10-27T08:15:20.607930853+02:00 level=info msg="Completed cleanup jobs" duration=15.197062ms
logger=cleanup t=2023-10-27T08:25:20.606220323+02:00 level=info msg="Completed cleanup jobs" duration=14.085464ms
logger=cleanup t=2023-10-27T08:35:20.606831501+02:00 level=info msg="Completed cleanup jobs" duration=14.134435ms
logger=cleanup t=2023-10-27T08:45:20.606897991+02:00 level=info msg="Completed cleanup jobs" duration=14.146674ms
logger=cleanup t=2023-10-27T08:55:20.606259502+02:00 level=info msg="Completed cleanup jobs" duration=13.980386ms
logger=cleanup t=2023-10-27T09:05:20.608408248+02:00 level=info msg="Completed cleanup jobs" duration=16.192033ms
logger=cleanup t=2023-10-27T09:15:20.606561428+02:00 level=info msg="Completed cleanup jobs" duration=14.21317ms
logger=cleanup t=2023-10-27T09:25:20.6059427+02:00 level=info msg="Completed cleanup jobs" duration=13.803397ms
logger=context userId=0 orgId=0 uname= t=2023-10-27T09:35:08.14093653+02:00 level=info msg="Request Completed" method=GET path=/d/chGauCx7z/4-analyser status=302 remote_addr= time_ms=1 duration=1.172906ms size=53 referer= handler=/d/:uid/:slug
logger=context userId=0 orgId=0 uname= t=2023-10-27T09:35:08.168989238+02:00 level=info msg="Request Completed" method=GET path=/login status=200 remote_addr= time_ms=4 duration=4.775995ms size=10231 referer= handler=/login
logger=http.server t=2023-10-27T09:35:10.754630901+02:00 level=info msg="Successful Login" User=admin@localhost
logger=context userId=0 orgId=0 uname= t=2023-10-27T09:35:10.755126511+02:00 level=info msg="Request Completed" method=POST path=/login status=200 remote_addr= time_ms=29 duration=29.462513ms size=187 referer= handler=/login
logger=context userId=1 orgId=4 uname=admin t=2023-10-27T09:35:10.84368137+02:00 level=info msg="Request Completed" method=GET path=/d/chGauCx7z/4-analyser status=200 remote_addr= time_ms=34 duration=34.25557ms size=12930 referer= handler=/d/:uid/:slug
logger=context userId=1 orgId=4 uname=admin t=2023-10-27T09:35:11.182156751+02:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr= time_ms=1 duration=1.077274ms size=0 referer= handler=/api/live/ws
logger=context userId=1 orgId=4 uname=admin t=2023-10-27T09:35:11.246756959+02:00 level=info msg="Request Completed" method=GET path=/avatar/46d229b033af06a191ff2267bca9ae56 status=200 remote_addr= time_ms=33 duration=33.945029ms size=327 referer="" handler=/avatar/:hash
logger=context userId=1 orgId=4 uname=admin t=2023-10-27T09:35:11.302313603+02:00 level=info msg="Request Completed" method=GET path=/api/dashboards/uid/chGauCx7z status=200 remote_addr= time_ms=11 duration=11.074436ms size=9040 referer="" handler=/api/dashboards/uid/:uid

I think you need to define what is:

  • the time spent on a dashboard
  • the time taken to load the dashboard

I can open dashboard and then I will be staring on that dashboard for hour (without any action) and you will see in Grafana server logs only when the dashboard was loaded. So how do you measure “the time spent on a dashboard”?

Only user browser knows “the time taken to load the dashboard”. You can get Grafana response time (e.g. path=/d/chGauCx7z/4-analyser status=200 remote_addr= time_ms=34 duration=34.25557ms) - but that’s not a load time. It is response time.

I would say you need to review your requirements with data, which you can get from Grafana server logs or use another source for your requirements (I would say you need Real User Monitoring - RUM for this case - of course it must be able to be integrable with Grafana - I guess Google Analytics may give you what you probably expect)

Thank you for your reply,
And how about this: most logs are a succession of logs triggered by a single action on Grafana
How do I visually or methodically know that it starts here and ends here (and so I add it up to get the response time)?
These log examples are parsed via java and sent to influxdb, and I’m told that the best way is to aggregate with java, but I think that’s what influxdb is for (aggregation), java is just for extracting and sending, that’s my point of view.