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

chore: refactor PromQL enforcer #225

Closed simonpasquier closed 3 weeks ago

simonpasquier commented 3 weeks ago

This change renames the Enforcer struct to PromQLEnforcer to clarify its purpose. It also removes the error type casting in favor of error wrapping.

simonpasquier commented 3 weeks ago

You've got a good point regarding not returning the bad PromQL expression. I'll change this (it will also be consistent with the Prometheus API).