-
Notifications
You must be signed in to change notification settings - Fork 235
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
Backtracking causes wrong mapping of labels #168
Comments
@fffonion could you take a look at this? |
Thanks for reporting this. Looking. |
@matthiasr I've created a PR addressing this bug. Could you take a look at #169 ? @pnyheim The test case in |
@fffonion Thanks for the quick fix. @matthiasr The thing is, we actually use graphite_exporter, so what is the process for getting this fix in there once it makes it into statsd_exporter? Do I create an Issue over there? |
No need to open an issue, I'll update the vendoring and make a release for both. |
this brings in prometheus/statsd_exporter#169 which fixes prometheus/statsd_exporter#168: clobbering of captures when unsuccessfully backtracking Signed-off-by: Matthias Rampke <[email protected]>
this brings in prometheus/statsd_exporter#169 which fixes prometheus/statsd_exporter#168: clobbering of captures when unsuccessfully backtracking Signed-off-by: Matthias Rampke <[email protected]>
When I have the following mappings defined.
And then send in the following 2 metrics
I expect the following result
But instead I get
It's as if after backtracking, it remembers that
$1
mached the first part,full
- but when going down the second path, the first part is not a*
, and should not match it - but rather match on the 3rd partanothertest
- which is now dropped entirely from the result.I was able to verify this in the
mapper_test.go
by adding the following scenario.Also, I think there is something wrong with the scenario starting with the comment
Where the label of the second metric should either have produced an error or be the literal
${1}_foo
because there is no*
-parts to the metric.A workaround for me is to set
glob_disable_ordering
to true, but I'm not sure if that has any other implications on our mappings - as we have quite a lot of them.The text was updated successfully, but these errors were encountered: