In PromQL we use range vector selectors to get range vectors for functions like rate()
. Grafana provides the dynamic variable $__interval
and it is used like this:
sum(rate(my_metric{foo="bar"}[$__interval]))
It's value is an approximation so that the resulting range vector contains one entry for about every pixel (or more). From my understanding this prevents overfetching.
So far so good. But looking at multiple dashboards available in Grafana Cloud or for example the demo dashboards by Robust Perception, nobody is using $__interval
. Instead people opt for 1m
or 5m
even if no recording rules or alerting is used.
Is there a reason for that?