GrafanaRequestsFailing: fix many-to-one matching must be explicit error #2592
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey folks 👋🏻
I got paged because this alert started failing to evaluate with the
many-to-one matching must be explicit (group_left/group_right)
error.The left-hand side keeps the "status_code" label in the time series, which can lead to one single handler having multiple time series. When divided by the right-hand expression, it won't contain the status_code, leading to a many-to-one error.
I solved this by removing the
status_code
from the left-hand side. If I'm not mistaken, that also means we can get rid ofignoring
. It could have been addressed withgroup_left
, but the proposed expression seemed easier to follow. The expression should retain the "trigger on a per-route basis" intent.I think this has always been incorrect, but I'm I'm surprised no one has experienced it.
I also noticed the runbook does not exist, so I removed it to avoid confusion