Instantaneous Rate with irate()

irate() — instantaneous rate.
Instead of averaging over the entire window, it only uses the last two data points:
irate(http_requests_total{job="demo"}[5m])
It reacts faster to changes and shows more detail, making it ideal for high-resolution, zoomed-in graphs.
The time window still matters — it tells irate() how far back to look for those two samples.
rate() vs irate().
rate() — smoother, better for alerting (won't fire on short spikes)
irate() — more responsive, better for detailed dashboards