-
Notifications
You must be signed in to change notification settings - Fork 812
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 the frontend slow query logs. #2520
Improve the frontend slow query logs. #2520
Conversation
Need rebase on #2521 |
This will help for the log to be more readable, parsable. Signed-off-by: Cyril Tovena <[email protected]>
78d190f
to
ba49762
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've also rebased master.
pkg/querier/frontend/frontend.go
Outdated
"time_taken", queryResponseTime.String(), | ||
} | ||
for k, v := range r.URL.Query() { | ||
append(logMessage, fmt.Sprintf("qs_%s", k), strings.Join(v, ",")) |
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.
There's a bug here. logMessage
is not updated with the result of append()
. I fix it for you.
Signed-off-by: Marco Pracucci <[email protected]>
For other reviewers, this is an example log:
|
Signed-off-by: Peter Štibraný <[email protected]>
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, with a nit.
Signed-off-by: Peter Štibraný <[email protected]>
This will help for the log to be more readable, parsable. I've also added the traceID using the context logger.
Signed-off-by: Cyril Tovena [email protected]