Skip to content

Capturing x-amzn-RequestId for X-Ray Tracing #194

Answered by Velfi
sarmst22 asked this question in Q&A
Discussion options

You must be logged in to vote

Getting the request ID from an output or error was implemented in this PR.

For outputs:

// Import the trait to get the `request_id` method on outputs
use aws_sdk_s3::types::RequestId;
let output = client.list_buckets().send().await?;
println!("Request ID: {:?}", output.request_id());

For errors:

use aws_sdk_s3::types::RequestId;
println!("Request ID: {:?}", error.request_id());

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@sarmst22
Comment options

@sarmst22
Comment options

Comment options

You must be logged in to vote
6 replies
@mbergkvist
Comment options

@rcoh
Comment options

@sarmst22
Comment options

@sarmst22
Comment options

@rcoh
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jdisanti
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants