-
Notifications
You must be signed in to change notification settings - Fork 532
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
Improve observability of enqueuing requests to query-scheduler #5818
Conversation
…rror reported when the scheduler reports an error.
@@ -222,9 +226,12 @@ func (f *Frontend) RoundTripGRPC(ctx context.Context, req *httpgrpc.HTTPRequest) | |||
retries := f.cfg.WorkerConcurrency + 1 // To make sure we hit at least two different schedulers. | |||
|
|||
enqueueAgain: | |||
level.Debug(spanLogger).Log("msg", "enqueuing request") |
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.
Note to reviewers: I've deliberately added this request started event and the "request succeeded" event below despite adding the span in enqueueRequest
, as it's possible there's a delay between a request being added to f.requestsCh
and it being picked up and enqueued by a worker.
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.
Nice, thank you!
req.response <- &frontendv2pb.QueryResultRequest{ | ||
HttpResponse: &httpgrpc.HTTPResponse{ | ||
Code: http.StatusInternalServerError, | ||
Body: []byte(resp.Error), |
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.
Nice catch!
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
Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
What this PR does
This PR improves the observability of query-frontend interactions with query-schedulers.
In particular:
nil
, is now logged when the scheduler returns an error (here)Example trace looks like this now:
Note to reviewers: I'd suggest reviewing each commit separately.
Which issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]