-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[KP] log details of the failed elasticsearch client requests when logQueries:true #73672
Conversation
Pinging @elastic/kibana-platform (Team:Platform) |
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 feel an integration test is necessary on this
I didn't manage to reproduce response error logging in the legacy client. It might make sense not to log them by default, since it can be a part of the logic flow, so it shouldn't bother the end-user. @spalger was it muted in the LP due to the same reasoning? |
I have no idea actually, sorry, I don't remember this happening. |
const body = params.body ? `\n${ensureString(params.body)}` : ''; | ||
return `${event.statusCode}\n${params.method} ${url}${body}`; |
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.
It's consistent with the legacy client format (and was not introduced by this PR), but I wonder if this line break between the status code and the rest of the log message really makes sense.
400 GET /_path [undefined]: Response Error
seems better than
400
GET /_path [undefined]: Response 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.
@pgayvallet I added a comment about the format 41dad79
💚 Build SucceededMetrics [docs]Distributable file count
History
To update your PR or re-run it, just comment with: |
…Queries:true (elastic#73672) * log request details in case of errors * update test * log errors in the new client only when logQueries: true * add comment about log format
Summary
closes #84447
before:
after (requires logQueries: true):
Checklist
For maintainers