-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Query: fix exemplar proxying for receivers with multiple tenants #7326
Query: fix exemplar proxying for receivers with multiple tenants #7326
Conversation
4218d63
to
5ae2d70
Compare
Signed-off-by: Pedro Tanaka <[email protected]>
When using the exemplars proxy to search for exemplars on receivers, if one receiver had tenants that did not match the selector on the external label it would get skipped completely even if it had a tenant that actually matched Signed-off-by: Pedro Tanaka <[email protected]>
Signed-off-by: Pedro Tanaka <[email protected]>
e25690e
to
20a608a
Compare
pkg/exemplars/proxy.go
Outdated
for m := range matcherSet { | ||
labelMatchers = append(labelMatchers, m) | ||
for _, m := range matcherSet { | ||
if isExternalLabel(m.Name, extLbls) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should propagate labels matchers here, but check them in tsdb.go
. Otherwise all tenants in a receiver will match whenever a single tenant matches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it will fail when proxying via sidecar? Because we are also passing the query as is there. We could leave this as a follow up and maintain behavior for now.
I think the best approach is to cover on all places, but would require ppl upgrading all components if they are running on distributed mode. Otherwise exemplars queries will not match anything.
Signed-off-by: Pedro Tanaka <[email protected]>
Changes
Verification