Skip to content
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

Can not log request body if CompressRequestBody enabled in Client #912

Open
m-chrome opened this issue Oct 21, 2024 · 0 comments
Open

Can not log request body if CompressRequestBody enabled in Client #912

m-chrome opened this issue Oct 21, 2024 · 0 comments

Comments

@m-chrome
Copy link

m-chrome commented Oct 21, 2024

Version

github.com/elastic/go-elasticsearch/v8 v8.15.0

Elasticsearch version: 8.2.2

Description

If client option CompressRequestBody is enabled, request body becomes empty in logger request here, because it already read in gzip compressor. Is it bug or normal behavior?

How to reproduce

  1. Implement interface Logger from elastictransport, where RequestBodyEnabled returns true
  2. Enable client option CompressRequestBody
  3. Set logger from step 1 in client
  4. Perform client.Bulk with some not empty body and see empty request body in logger from step 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant