-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Log ES queries #2821
Comments
FWIW, the logging configuration itself is not being set on I ran into this when my ES was throwing access errors. All that's currently logged is (in effect):
Looks like the client exposes a number of helpers that could set these values client.SetErrorLog. With SetInfoLog and SetTraceLog knobs as well. |
Nice! Thanks for the tip @dekimsey, I think this is better than the initial proposal. I just tried out setting trace level logs and could see the query logged out, along with the results. I'll have a go at putting together a PR based on your suggestion. |
Requirement - what kind of business use case are you trying to solve?
Lack of visibility into Elasticsearch queries executed by readers.
See: #2816 (comment)
Proposal - what do you suggest to solve the problem or improve the existing situation?
Add a package-level helper function that can be used when logging service, operation and span queries:
Any open questions to address
Logging queries requires the ability to build the query beforehand and, ideally, reuse this same query object to execute against Elasticsearch.
Unfortunately, for service and operation queries, existing code uses SearchService which does not provide a means to set a query source for execution, leading to duplicating the query object, unlike span searches which use
MultiSearch()
that allows setting the query source in its individual search requests.The text was updated successfully, but these errors were encountered: