Skip to content

run dns resolution in the same tracing-span as the caller #3870

Open
@joshka

Description

@joshka

Is your feature request related to a problem? Please describe.
This is an issue for hyper-util which doesn't have an issues tab

hyperium/hyper-util#134 introduced a fix with the following 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.

But there's a tracing / tracing subscriber issue with dropping a span on a different thread than it was created when there's multiple dispatchers in play. A followup PR will revert this change hyperium/hyper-util#179

The impact of the revert will be that DNS trace logs are outside of any span that requests are made within

Describe the solution you'd like
Once the tracing issue is resolved / worked around, re-implement the fix

Describe alternatives you've considered
It might be possible to implement this instead of as a child span aligned with the current span instead as a span created for the entire DNS handling mechanism which is then never dropped.

Additional context
The overall purpose of this was to make it possible to make it easier to filter out trace messages from causing an infinite tracing loop when tracing uses a subscriber that uses hyper-util. Whatever solution that comes up should be aligned with that goal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature. This is adding a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions