thanos icon indicating copy to clipboard operation
thanos copied to clipboard

Replace xrate/xincrease functions with anchored/smoothed modifiers

Open sylr opened this issue 6 months ago • 2 comments

Prometheus has added modifiers to reproduced the behavior of thanos' xrate/xincrease functions.

# Thanos
xincrease(abstraction_www_http_request_total[5m])

# Prometheus
increase(abstraction_www_http_request_total[5m] anchored)

Additional context

https://prometheus.io/docs/prometheus/latest/feature_flags/#extended-range-selectors

sylr avatar Oct 25 '25 21:10 sylr

Do you think it would be enough to implement these functions in the PromQL engine or how do you think we should nudge our users towards these modifiers?

GiedriusS avatar Oct 27 '25 07:10 GiedriusS

I very much think that Thanos would benefit to be 100% prometheus compliant and I would nudge users to use anchored/smoothed.

Personally I cherish to be able to run my queries (or grafana dashboards) on prometheus and Thanos in-distinctively.

I love the fact that Thanos tried to solve a problem for prometheus users and since your two projects share maintainers I was once hopeful xrate/xincrease would be backported upstream.

However, since prometheus chose a different path, I would re-align Thanos on upstream prometheus.

Cheers.

sylr avatar Oct 27 '25 08:10 sylr