prometheus-community / prom-label-proxy

A proxy that enforces a given label in a given PromQL query.
Apache License 2.0
248 stars 95 forks source link

Tenant headers cannot be duplicated using Grafana datasources #191

Closed john-r-swyftx closed 1 week ago

john-r-swyftx commented 4 months ago

The suggested way to provide multiple values using http headers is:

You can provide multiple values for the label using several HTTP headers:

➜  ~ curl -H 'X-Tenant=something' -H 'X-Tenant=anything' http://127.0.0.1:8080/api/v1/query\?query="up"
{"status":"success","data":{"resultType":"vector","result":[]}}%

Grafana datasources do not support more than one http header with the same name being set. Screenshot 2024-02-20 at 4 01 52 pm

will just send one THANOS_TENANT header.

Grafana for Loki allows the format - A|B for its tenant headers. Can this be supported with prom-label-proxy?

Or is there a way around this I haven't seen yet? I am trying to query across 2 tenants

simonpasquier commented 2 weeks ago

I assume that it will be fixed in the upcoming prom-label-proxy version, thanks to https://github.com/prometheus-community/prom-label-proxy/pull/223.