Is your proposal related to a problem?
Currently, it's not possible to do specific relabel config for a specific tenant. Relabel config is global to all tenants.
Describe the solution you'd like
Either allow user to define relabel config by tenant or inject tenant id label before relabel config is applied.
Describe alternatives you've considered
I tried the following relabel config, but it does not work:
- action: drop
source_labels: [tenant_id, __name__]
separator: "@"
regex: mysuper-tenant@(mysupermetric)
Because label tenant id is added after the relabel config:
Additional context
To me, a relabel config by tenant is easier to maintain, than a huge regex in global relabel config 😅
But it bring some reflections: if there is a tenant relabel config for a tenant, is it applied after / before global relabel config OR it is overriding the global relabel config.
Happy to see your point of view about this use-case or if I missed something already allowing to do this 😄
Is your proposal related to a problem?
Currently, it's not possible to do specific relabel config for a specific tenant. Relabel config is global to all tenants.
Describe the solution you'd like
Either allow user to define relabel config by tenant or inject tenant id label before relabel config is applied.
Describe alternatives you've considered
I tried the following relabel config, but it does not work:
Because label tenant id is added after the relabel config:
thanos/pkg/receive/handler.go
Line 622 in 519da47
Additional context
To me, a relabel config by tenant is easier to maintain, than a huge regex in global relabel config 😅
But it bring some reflections: if there is a tenant relabel config for a tenant, is it applied after / before global relabel config OR it is overriding the global relabel config.
Happy to see your point of view about this use-case or if I missed something already allowing to do this 😄