Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ full = [
"http1",
"http2",
"tokio",
"tracing",
]

client = ["hyper/client", "tokio/net", "dep:tracing", "dep:futures-channel", "dep:tower-service"]
Expand All @@ -92,7 +91,13 @@ http2 = ["hyper/http2"]

tokio = ["dep:tokio", "tokio/rt", "tokio/time"]

tracing = ["dep:tracing"]
# Currently unused feature. This previously attached the current span to all futures executed by
# `TokioExecutor`, which would incorrectly extend application-level spans beyond their correct
# endpoints due to asynchronous background tasks running under those spans. This is documented in
# https://github.com/hyperium/hyper/issues/3904. Clients wishing to add spans to executed futures
# should manually attach them to the futures provided to `TokioExecutor::execute`, or create their
# own implementation of `Executor<Fut>` to attach spans as required by their particular context.
tracing = []

# internal features used in CI
__internal_happy_eyeballs_tests = []
Expand Down
7 changes: 0 additions & 7 deletions src/rt/tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ use std::{
use hyper::rt::{Executor, Sleep, Timer};
use pin_project_lite::pin_project;

#[cfg(feature = "tracing")]
use tracing::instrument::Instrument;

pub use self::{with_hyper_io::WithHyperIo, with_tokio_io::WithTokioIo};

mod with_hyper_io;
Expand Down Expand Up @@ -108,10 +105,6 @@ where
Fut::Output: Send + 'static,
{
fn execute(&self, fut: Fut) {
#[cfg(feature = "tracing")]
tokio::spawn(fut.in_current_span());

#[cfg(not(feature = "tracing"))]
tokio::spawn(fut);
}
}
Expand Down