Skip to content

How to hook into raw network traffic? #416

Answered by rcoh
rosscanning asked this question in Q&A
Discussion options

You must be logged in to vote

There are a couple of ways. If you just want to see it, you can enable trace logging of the aws_smithy_http crate.

tracing_subscriber::fmt::init(); // tracing-subscriber = { version = "0.3", features = ["env-filter"] }
RUST_LOG=aws_smithy_http=trace cargo run

If you need to actually capture it, I'd suggest building something a connection that captures traffic as it runs. We have a few in the SDK already, the most sophisticated being dvr. You can then use this custom connection when constructing a client with from_conf_conn. You can see an example of doing this here.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rosscanning
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
2 participants