TL;DR: ability to set a custom lookback delta for a query would be useful when time series have drastically different resolutions.
---
Currently, Prometheus allows configuring lookback delta through configuration flag. This works well if the resolutions/scrape intervals of time series are similar, but is inconvenient if they differ a lot. E.g. if we had two time series, one with a datapoint each hour and another one with a datapoint each minute, a lookback of 2h would work for the first one, but would be way too big for the second one.
This impacts looking at downsampled data greater than 5 minutes (the default lookback period) which both Thanos and M3 frequently keep (depending on user configuration). Both support downsampling data to user configured resolutions, thus lookback delta should be selected according to what resolution is being queried when querying downsampled data. Both Thanos and M3 depend on Prometheus and use `promql.Engine` for executing queries, which doesn't allow setting custom lookback for a particular query.
While I understand that this might be more relevant for M3 and Thanos than for Prometheus, just wanted to check what the maintainers of Prometheus think about this. If this seems useful, someone from M3 should be able to submit a PR (we have already looked at the code and it doesn't look like it needs huge changes).