-
Notifications
You must be signed in to change notification settings - Fork 107
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
Match rule regexp doesn't process last tag when tag support is activated. #398
Comments
hmm, ok, I didn't know this was possible |
a logic error would only exlude the last tag defined in the metric, instead of all of them, which obviously leads to wrong routing (or non-matches)
I think you want something to match the tags, which currently doesn't exist. What you experienced is actually a bug, the routing for the metrics was messed up. Tags by the current design are forwarded, but not handled in any way. If you give a description of what you need, I might be able to implement something. |
I want to be able route metrics based on tags. For example: match “env=prod” |
Could you share your concerns about tags to be a part of a metric name? As a workaround I've added ";=" to the list of allowed symbols and got desired behavior. But could it potentially lead to some problems? |
The main concern is routing matters for consistent-hash based clusters. Metric
Now I just made up that syntax. Idea is that you can match the tag names, and their values via regex, to control the routing. Alternative is something like:
where it would consider the full input string up to the first space, as you've been doing now. The latter approach is likely easier to implement on this end. |
a logic error would only exlude the last tag defined in the metric, instead of all of them, which obviously leads to wrong routing (or non-matches)
a logic error would only exlude the last tag defined in the metric, instead of all of them, which obviously leads to wrong routing (or non-matches)
When tag support is activated match rule regexp processing is performed up until last ";". So if metrics look like metric.example;tag1=value1;tag2=value2;tag3=value3 you can't route based on tag3=value3, because only "metric.example;tag1=value1;tag2=value2" substring is taken to account.
The text was updated successfully, but these errors were encountered: