diff --git a/src/common/exec.rs b/src/common/exec.rs index 40860ee1..4cc9c460 100644 --- a/src/common/exec.rs +++ b/src/common/exec.rs @@ -25,6 +25,7 @@ impl Exec { Exec::Executor(Arc::new(inner)) } + #[track_caller] pub(crate) fn execute(&self, fut: F) where F: Future + Send + 'static, @@ -47,6 +48,7 @@ impl hyper::rt::Executor for Exec where F: Future + Send + 'static, { + #[track_caller] fn execute(&self, fut: F) { Exec::execute(self, fut); } diff --git a/src/rt/tokio.rs b/src/rt/tokio.rs index bd5fd50f..ae04a7bc 100644 --- a/src/rt/tokio.rs +++ b/src/rt/tokio.rs @@ -107,6 +107,7 @@ where Fut: Future + Send + 'static, Fut::Output: Send + 'static, { + #[track_caller] fn execute(&self, fut: Fut) { #[cfg(feature = "tracing")] tokio::spawn(fut.in_current_span());