-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent behavoir when label already exists #162
Comments
I agree that there's room for improvement and the lack of consistency between the different endpoints is puzzling :) |
I'm not sure I have a full overview of all the different use-cases, but seems like we'd probably need at least the following options ?
That could be configured as one option, that applies to all endpoints, or two options, one for query endpoints, one for non-query endpoints. Not sure what makes most sense. |
I'd rather make it consistent across all endpoints. At the very least if In the other case, I'd lean towards replacing the label silently but no strong opinion. Regarding your curl command: Didn't you mean |
Sorry, this was a while already.. I think I probably did lowercase post: Although that was not really my main concern here, but more that prom-label-proxy is inconsistent in terms of the behavior of the label replacement on query/non-query APIs. |
The way prom-label-proxy deals with labels already existing differs between the query apis (
/api/v1/query
,/api/v1/query_range
) and the non-query apis (like:/api/v1/series
,/api/v1/labels
...), which can cause a little confusion.Given the following setup:
Query APIs
A query such as:
Is re-written to:
The user provided
tenant_id
label is silently replaced, by prom-label-proxy.With
-error-on-replace
enabled, a 400 is returned:Non-query APIs
For non-query APIs, the behavior is a bit different, instead of silently replacing the existing label, the matcher is added on. For example:
Results in the following
match[]
arguments being sent to Prometheus:-error-on-replace
has no effect on the behavior of the non-query APIs.What is the desired functionality here? It seems like it would be nice for the behavior to be consistent between all endpoints?
The text was updated successfully, but these errors were encountered: