aws-sdk-rust
aws-sdk-rust copied to clipboard
Region provider dominates log output
Describe the bug
This line adds a Debug representation of a dyn ProvideRegion as an argument of a tracing span.
Providers such as DefaultRegionChain are highly nested objects, Debug representation of which can be multiple pages of text long.
Tracing arguments in many configurations of tracing are be printed per every every log event as context.
As a result, every log message produced within this instrumented span creates a wall of output.
Expected Behavior
Tracing spans only include short arguments.
Current Behavior
When log level is set to info we get a 2-page log message per new / close span events.
Under debug logging our server logs are 90% dominated by init_s3_context{..}:load_region{...}. One S3 read produces hundreds of pages of this:
Reproduction Steps
n/a
Possible Solution
If you believe that full Debug representation of a provider is useful - instead of adding it to the span it could be logged as an event, so that it only appears in logs once.
Additional Information/Context
No response
Version
`main` branch
Environment details (OS name and version, etc.)
irrelevant
Logs
No response