Skip to content

chore(rt): preserve executor caller locations#283

Open
punkeel wants to merge 1 commit into
hyperium:masterfrom
punkeel:maxime/track-caller
Open

chore(rt): preserve executor caller locations#283
punkeel wants to merge 1 commit into
hyperium:masterfrom
punkeel:maxime/track-caller

Conversation

@punkeel
Copy link
Copy Markdown

@punkeel punkeel commented May 10, 2026

Tokio task hooks report the source location of the tokio::spawn call. When hyper-util's executor glue performs that spawn, the recorded location points at the executor implementation itself. That is technically correct, but it hides the more useful callsite: the code path in Hyper or hyper-util that asked the executor to create background work.

Mark the executor forwarding methods with track_caller so task instrumentation can attribute spawned tasks to the caller that requested execution rather than to the generic executor glue.

Tokio task hooks report the source location of the tokio::spawn call.
When hyper-util's executor glue performs that spawn, the recorded location
points at the executor implementation itself. That is technically correct, but
it hides the more useful callsite: the code path in Hyper or hyper-util that
asked the executor to create background work.

Mark the executor forwarding methods with track_caller so task instrumentation
can attribute spawned tasks to the caller that requested execution rather than
to the generic executor glue.
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.

1 participant