Prometheus / Mimir : Dynamic tenant id from metric label like Loki
Background
Mimir support multi tenancy like Loki with header in the request, I suppose Loki.write read tenant label in the logs to replace
default tenant_id in the endpoint (like Promtail does).
Today I use cortex-tenant as proxy between Prometheus and Mimir, I use writeRelabelConfig to regex the namespace label and create the tenant label. Cortex-tenant read the tenant label in metric and add the header to the request.
It could be better to implement this directly from Alloy instead use proxy only for doing that's job.
Proposal
This functionality can be implemented in prometheus.remote_write or with a specific mimir.remote_write.
@Ronan-WeScale could this be a duplicate of #521 ?
@wilfriedroset of course, sorry for duplicate, I tried to search before create this issue.
But https://github.com/grafana/alloy/issues/521 seem stuck from long time.