What does the `offset` modifier do?

IntermediateConceptPromQL & Recording Rules
Answer

offset shifts the evaluation time back for that selector, useful for comparisons with the past:

sum(rate(http_requests_total[5m]))
/
sum(rate(http_requests_total[5m] offset 1w))

This is week-over-week traffic ratio. offset must come right after the selector or range. Negative offsets (offset -1h) are allowed. The related @ modifier pins evaluation to an absolute time: http_requests_total @ 1730000000.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on PromQL & Recording Rules