Skip to content
Unverified Commit aac9becf authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Avoid logging signable body by default whose data can be very large (#3917)

## Motivation and Context
While investigating a connect timeout issue for uploading object(s) in
[`aws-s3-transfer-manager-rs`](https://github.com/awslabs/aws-s3-transfer-manager-rs),
we saw that the size of trace log was about 70 GB and that the last 1 GB
only had 30 lines, with each line having couple MB's body to be logged
(due to [this
location](https://github.com/awslabs/aws-sdk-rust/blob/953cd6c7af04f02938a0dcf36f793ebe7a06cc57/sdk/aws-sigv4/src/http_request/sign.rs#L224)).

## Description
This PR disables logging the actual body data in `SignableBody` by
default. Customers can set the `LOG_SIGNABLE_BODY` environment variable
to log the body data if they want to, as described in the comment within
the `Debug` implementation.

## Testing
- Added a small unit test
- Tests in CI

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent df77d5ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment