-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
SQL: add trace logging for search responses coming from server #50530
Conversation
Pinging @elastic/es-search (:Search/SQL) |
|
||
protected static void logSearchResponse(SearchResponse response, Logger logger) { | ||
List<Aggregation> aggs = Collections.emptyList(); | ||
if (response.getAggregations() != null) { |
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: wondering if expanding this branch over the for
loop wouldn't also simplify (i.e. remove) the in-loop conditional, by allowing to always append ", "
and then strip last two chars outside the loop.
But otherwise 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.
Thanks. I do have a slight preference towards the current approach. I'll merge it as is.
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
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
(cherry picked from commit 38eb485)
This PR improves the logging of ES search responses by outputting several meta details, excluding the documents themselves.