opensearch-project / opensearch-py

Python Client for OpenSearch
https://opensearch.org/docs/latest/clients/python/
Apache License 2.0
338 stars 170 forks source link

Fix: avoid decoding body unless it needs to be logged. #571

Closed dblock closed 10 months ago

dblock commented 10 months ago

Description

Avoid calling body.decode() unless we explicitly want the body to be logged.

Issues Resolved

Closes https://github.com/opensearch-project/opensearch-py/issues/485.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

codecov[bot] commented 10 months ago

Codecov Report

Merging #571 (117447c) into main (7878364) will increase coverage by 0.10%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #571      +/-   ##
==========================================
+ Coverage   71.64%   71.74%   +0.10%     
==========================================
  Files          87       87              
  Lines        7886     7886              
==========================================
+ Hits         5650     5658       +8     
+ Misses       2236     2228       -8     
Files Coverage Δ
opensearchpy/_async/http_aiohttp.py 83.45% <ø> (ø)
opensearchpy/connection/base.py 94.32% <100.00%> (ø)

... and 2 files with indirect coverage changes