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

feat(routes): allow multitenancy through different labels #192

Closed mutefiRe closed 4 months ago

mutefiRe commented 4 months ago

In a larger system, maintaining consistent tenant identifiers across all metrics isn't always practical. For example, some metrics might use tenant_id while others rely on page_id, depending on the reporting service. Therefore, the proxy needs to decide which label to enforce for each metric.

Instead of using the label parameter in the NewRoutes function, we inject the label name in the same way as the label values. As a result, the ExtractLabeler handles determining which label name to enforce.

mutefiRe commented 4 months ago

hi! Sorry this PR was not supposed to target this repository for now.