Skip to content

Commit

Permalink
Add tracing for resolved endpoint (#784)
Browse files Browse the repository at this point in the history
* Add tracing for resolved endpoint

* update changelog
  • Loading branch information
rcoh committed Oct 20, 2021
1 parent 64a9d92 commit 8f623f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions aws/SDK_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vNext (Month Day, Year)
**New this week**

- Moved the contents of `aws-auth` into the `aws-http` runtime crate (smithy-rs#783)
- Add tracing output for resolved AWS endpoint (smithy-rs#784)

v0.0.21-alpha (October 15th, 2021)
==================================
Expand Down
1 change: 1 addition & 0 deletions aws/rust-runtime/aws-endpoint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ smithy-http = { path = "../../../rust-runtime/smithy-http"}
aws-types = { path = "../aws-types" }
http = "0.2.3"
regex = { version = "1", default-features = false, features = ["std"]}
tracing = "0.1"
3 changes: 2 additions & 1 deletion aws/rust-runtime/aws-endpoint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use std::sync::Arc;
/// - The URI of the endpoint (needed to actually send the request)
/// - The name of the service (needed downstream for signing)
/// - The signing region (which may differ from the actual region)
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct AwsEndpoint {
endpoint: Endpoint,
credential_scope: CredentialScope,
Expand Down Expand Up @@ -186,6 +186,7 @@ impl MapRequest for AwsEndpointStage {
let endpoint = provider
.resolve_endpoint(region)
.map_err(AwsEndpointStageError::EndpointResolutionError)?;
tracing::debug!(endpoint = ?endpoint, base_region = ?region, "resolved endpoint");
let signing_region = endpoint
.credential_scope
.region
Expand Down

0 comments on commit 8f623f6

Please sign in to comment.