There are some contributions here that would make more sense upstream. This is an issue to keep track of those changes - https://github.com/grafana/mimir-prometheus/pull/940