Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: run dns resolution in the same tracing-span as the caller #134

Merged
merged 5 commits into from
Aug 7, 2024

Conversation

joshka
Copy link
Contributor

@joshka joshka commented Jul 3, 2024

This makes it possible to trace the entire request, including DNS
resolution.

The use case for this is to be able to suppress specific requests from
being traced in a situation where the request is used to transmit logs
to a remote server. This would result in an infinite loop of logs being
sent to the remote server. tokio-rs/tokio#6659
has more details.

This makes it possible to trace the entire request, including DNS
resolution.

The use case for this is to be able to suppress specific requests from
being traced in a situation where the request is used to transmit logs
to a remote server. This would result in an infinite loop of logs being
sent to the remote server. tokio-rs/tokio#6659
has more details.
@joshka
Copy link
Contributor Author

joshka commented Jul 18, 2024

Ping

@@ -28,7 +29,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.uri(url)
.body(Empty::<bytes::Bytes>::new())?;

let resp = client.request(req).await?;
let span = info_span!("request", uri = %req.uri());
let resp = client.request(req).instrument(span).await?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove this too?

I agree it's useful when debugging, but I worry it distracts from the initial usage of someone just wanting to get the client working.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@seanmonstar seanmonstar merged commit df55aba into hyperium:master Aug 7, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants