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

Reducing verbosity of various logs #3664

Merged
merged 2 commits into from
May 30, 2024
Merged

Conversation

landonxjames
Copy link
Contributor

@landonxjames landonxjames commented May 25, 2024

Motivation and Context

Our logs had several entries that were extremely verbose and made them harder to sort through. This change aims to reduce the verbosity of those logs to something more manageable.

Description

  • Removed the logging of the full IMDS Client struct, replaced with a message that it was truncated
  • Removed logging the full Configbag in a couple places in RuntimeComponentsBuilder
  • Removed logging of full ProvideCredentials objects in the CredentialsProviderChain` and replaced with just their names

There are some verbose logs I did not remove because I was not sure of their usefulness. Most notably the PartitionResolver struct logs several hundred lines of region information each time it appears. Happy to truncate that as well if those logs aren't too helpful.

Testing

This was tested locally by running the SDK logging example code with RUST_LOG=trace prepended to the cargo run command. For comparison, when saved as a .txt file, the old logs take up 2.8MB and the new logs take 273KB for the same operation.

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@landonxjames landonxjames requested review from a team as code owners May 25, 2024 03:21
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Removed the logging of the full IMDS Client struct

Removed logging the Configbag in a couple places in
RuntimeComponentsBuilder

Removed logging of full ProvideCredentials objects and replaced with
just their names

Update CHANGELOG

Removing extraneous comment
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@landonxjames landonxjames added this pull request to the merge queue May 30, 2024
Merged via the queue into main with commit 50c825b May 30, 2024
44 checks passed
@landonxjames landonxjames deleted the landonxjames/log-cleaning branch May 30, 2024 18:16
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

Successfully merging this pull request may close these issues.

3 participants