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

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

Conversation

@punkeel

@punkeel punkeel commented May 10, 2026

Copy link
Copy Markdown

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.
@cratelyn cratelyn added C-chore Category: chore. a general chore or maintenance task. A-rt Area: runtime components. S-waiting-on-review Status: waiting on review. labels Sep 24, 2026
@cratelyn
cratelyn self-requested a review September 24, 2026 18:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rt Area: runtime components. C-chore Category: chore. a general chore or maintenance task. S-waiting-on-review Status: waiting on review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants