-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
New ES client doesn't log ES request body #76463
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
Not sure from where the body was logged in the legacy client. When looking at the code, I can't really see any difference between the two: Legacy client: kibana/src/core/server/elasticsearch/legacy/elasticsearch_client_config.ts Lines 207 to 211 in 585d58c
New client: kibana/src/core/server/elasticsearch/client/configure_client.ts Lines 46 to 60 in 9fa43b4
|
@lukasolson Do you mean that in the legacy client we log
We don't format them and rely on the elasticsearch client format in both cases. |
Yeah, the new client is logging the query string, while the legacy client logged the Elasticsearch query (which is in the POST body). |
@delvedor Do you confirm this difference? From what @lukasolson says, it seems the kibana/src/core/server/elasticsearch/legacy/elasticsearch_client_config.ts Lines 200 to 212 in 585d58c
|
The new client does not have an integrated logger, it has an event emitter interface which gives you full observability of what happening inside, see here. |
ok, we need to use
|
Steps to reproduce:
elasticsearch.logQueries
andlogging.verbose
totrue
inside your kibana.yml fileYou'll see something along the following lines in your logs:
Prior to switching to the new JavaScript ES client, the entire request (including the body) would be logged. It doesn't appear the request body is being logged any more.
It's possible I'm missing something in my logging config that wasn't necessary before.
The text was updated successfully, but these errors were encountered: