-
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
match external labels in exemplars API #4123
match external labels in exemplars API #4123
Conversation
Signed-off-by: yeya24 <yb532204897@gmail.com>
Signed-off-by: yeya24 <yb532204897@gmail.com>
91220c4
to
835c740
Compare
835c740
to
457152f
Compare
Thanks, @yeya24, this looks amazing. I need to muster some brainpower to review this. |
457152f
to
55530c4
Compare
Signed-off-by: yeya24 <yb532204897@gmail.com>
I've tested this change locally and we are now seeing exemplars on our staging environment (querying via both layers of thanos querier). LGTM |
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.
LGTM
es := &exemplarsStream{ | ||
client: exemplarsClient, | ||
request: req, | ||
|
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.
nit
* match external labels in exemplars API Signed-off-by: yeya24 <yb532204897@gmail.com> * update changelog Signed-off-by: yeya24 <yb532204897@gmail.com> * fix lint Signed-off-by: yeya24 <yb532204897@gmail.com> * fix flaky tests Signed-off-by: yeya24 <yb532204897@gmail.com> * Fix changelog Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* match external labels in exemplars API Signed-off-by: yeya24 <yb532204897@gmail.com> * update changelog Signed-off-by: yeya24 <yb532204897@gmail.com> * fix lint Signed-off-by: yeya24 <yb532204897@gmail.com> * fix flaky tests Signed-off-by: yeya24 <yb532204897@gmail.com> * Fix changelog Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Co-authored-by: Ben Ye <yb532204897@gmail.com>
Signed-off-by: yeya24 yb532204897@gmail.com
Fixes #4116
Changes
Add logic of matching external labels in the exemplars API proxy.
The matching part is a little bit complex because the input is a query, which might contain multiple vector selectors.
We need to match each vector selector separately and construct the final query after all matches are processed.
Verification
Tested locally and one unit test.
We don't have an E2E test for exemplars now so no E2E test added.