Skip to content

Commit

Permalink
Add a debug log entry for retries (#1352)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdisanti authored May 2, 2022
1 parent 9b6210c commit 3aab827
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,15 @@
# references = ["smithy-rs#920"]
# meta = { "breaking" = false, "tada" = false, "bug" = false }
# author = "rcoh"

[[aws-sdk-rust]]
message = "Log a debug event when a retry is going to be peformed"
references = ["smithy-rs#1352"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = "Log a debug event when a retry is going to be peformed"
references = ["smithy-rs#1352"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"
7 changes: 7 additions & 0 deletions rust-runtime/aws-smithy-client/src/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,13 @@ impl RetryHandler {
return None;
}
};

tracing::debug!(
"attempt {} failed with {:?}; retrying after {:?}",
self.local.attempts,
retry_kind,
dur
);
let sleep_future = sleep.sleep(dur);
let fut = async move {
sleep_future.await;
Expand Down

0 comments on commit 3aab827

Please sign in to comment.