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

Reduce amount of logging from #[instrument] #2934

Merged
merged 3 commits into from
Aug 18, 2023

Conversation

ysaito1001
Copy link
Contributor

@ysaito1001 ysaito1001 commented Aug 18, 2023

Will be merged to smithy-rs-release-0.56.x branch

Addresses awslabs/aws-sdk-rust#872

Motivation and Context

With the introduction of the orchestrator, the core functions that live in aws-smithy-runtime/src/client/orchestrator.rs were annotated by #instrument. By default this emits logs at the INFO level, which caused our customer to see the excessive amount of logging after switching to the latest SDK creates 0.29.

Description

This PR reduces the log level to DEBUG wherever we use #instrument throughout the file.

Testing

No new tests have been added as part of this PR. An enhancement has been filed to check logging volume.

Here is a quick check that all instances in the file specify trace:

✗ rg "instrument"
src/client/orchestrator.rs
34:use tracing::{debug, debug_span, instrument, trace, Instrument};
160:    .instrument(debug_span!("invoke", service = %service_name, operation = %operation_name))
167:#[instrument(skip_all, level = "debug")]
186:#[instrument(skip_all, level = "debug")]
319:#[instrument(skip_all, level = "debug")]
389:                .instrument(debug_span!("read_body"))
398:    .instrument(debug_span!("deserialization"))
407:#[instrument(skip_all, level = "debug")]
419:#[instrument(skip_all, level = "debug")]

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK 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.

This commit addresses awslabs/aws-sdk-rust#872
by specifying the log level `TRACE` wherever we use `instrument` in the
file.
@ysaito1001 ysaito1001 requested a review from a team as a code owner August 18, 2023 17:20
This commit updates the log level since we usually ask customers to post
logs at `debug` and `trace` may include sensitive information.
@jdisanti jdisanti merged commit c742b5f into smithy-rs-release-0.56.x Aug 18, 2023
41 checks passed
@jdisanti jdisanti deleted the ysaito/reduce-amount-of-logging branch August 18, 2023 18:17
@github-actions
Copy link

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

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