Increase the data points showed in Grafana Loki dashboard

Hi, i have a time series dashboard that shows my apps rate in a range of 24h

sum by(message_headers_Unica_User) (rate({job="web_services", service="orphan-accounts"} |= “request” | json [1s]))

I prefer to use a log-range of [1s] because it gives me integer numbers and more precise measurements rates.

The problem is that the dashboard does not shows all data points. For example, in the picture above only 23 data points are returned by the query :frowning_face:

However if I reduce the time range to 12 hours more data points are returned

I have set Max data points to 86400 = 24hx60mx60s to have one data point at every second in the range of 24 hours


I have set the Maximum lines in Loki datasource configuration


but nothing works.

I would like to have one data point at every second (if any) in the range of 24 hours. I don’t care about performance.

Note: I’ve notice that this issue only happens when there is few logs. When there is a considerable and constant amount of logs along the time one data point per secong is showed in the dashboard :smiley:

The only solution that I’ve found is to increase the log-range to 5 or 10 and it works but I have decimal rates and less precision.

What am I missing?