-
Notifications
You must be signed in to change notification settings - Fork 529
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
Remote read first class: workflow structure #8370
Conversation
Make place for a remote read roundtripper that would wrap limits and blocking checks. Update the format of how we log the remote read query matchers in query stats and activity tracker. This will enable having the same string in the logs and also the query blocker. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
f89272f
to
381148f
Compare
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. I left few nits I would be glad if you could look at before merging. I would like to discuss with you the AddDetails()
, but we can do it async after this PR has been merged.
})) | ||
_, error := handler.Do(req.Context(), metricsRequest) | ||
if error != nil { | ||
return nil, apierror.AddDetails(error, fmt.Sprintf("remote read error (%s_%d: %s)", matchersLogKey, i, metricsRequest.GetQuery())) |
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 don't want to block on this, and we can address it separately, but I'm not 💯 convinced about the AddDetails()
here. The design smell to me is that it's very easy to forget to use AddDetails()
instead of the generic errors.Wrap()
. I would like to make this stuff work with the normal errors.Wrap()
.
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 wasn't sure that's a good idea as our Wrap
would behave differently than the standard one (not in terms of the string returned, but the structure), but I'll update in the next PR.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
What this PR does
Make place for a remote read roundtripper that would wrap limits and blocking checks.
Update the format of how we log the remote read query matchers in query stats and activity tracker. This will enable having the same string in the logs and also the query blocker.
Which issue(s) this PR fixes or relates to
Relates to https://github.com/grafana/pir-actions/issues/10 (internal, make remote read first class)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.