Switch to debug logging for credential fetches (#3546)

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 is contained in:
Tom Forbes 2024-04-13 00:10:45 +01:00 committed by GitHub
parent 67704a27a9
commit 96c1cd1fea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -28,3 +28,9 @@ message = "Make `SigningSettings` and its fields implement `Clone` and `Copy`"
references = ["smithy-rs#3533"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "avandesa"
[[aws-sdk-rust]]
message = "Change some credentials related info log messages to debug."
references = ["smithy-rs#3546"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "orf"

View File

@ -160,12 +160,12 @@ impl ProviderChain {
}
}
};
tracing::info!(base = ?repr.base(), "first credentials will be loaded from {:?}", repr.base());
tracing::debug!(base = ?repr.base(), "first credentials will be loaded from {:?}", repr.base());
let chain = repr
.chain()
.iter()
.map(|role_arn| {
tracing::info!(role_arn = ?role_arn, "which will be used to assume a role");
tracing::debug!(role_arn = ?role_arn, "which will be used to assume a role");
AssumeRoleProvider {
role_arn: role_arn.role_arn.into(),
external_id: role_arn.external_id.map(Into::into),

View File

@ -354,7 +354,7 @@ impl ResolveCachedIdentity for LazyCache {
// `cache.get_or_load`, logging inside `cache.get_or_load` ensures that it is emitted
// only once for the first thread that succeeds in populating a cache value.
let printable = DateTime::from(expiration);
tracing::info!(
tracing::debug!(
new_expiration=%printable,
valid_for=?expiration.duration_since(time_source.now()).unwrap_or_default(),
partition=?partition,