Skip to content

Non-spawned tasks (tracing futures) #6011

Answered by hawkw
DzenanJupic asked this question in Ideas
Discussion options

You must be logged in to vote

I don't think adding duplicates of the task span to arbitrary futures is as useful as enhancing the console to display arbitrary traces. This specific span is intended to be used for tracking tasks spawned on the runtime. Wrapping other futures in a task span would incorrectly indicate that they are also spawned as tasks, when they are not.

Furthermore, providing a general purpose utility for instrumenting futures with spans is not tokio::task's responsibility. tracing itself provides a much more full-featured API for constructing spans to instrument arbitrary futures. I think enhancing the console's ability to display user-defined tracing instrumentation is a better approach.

With that s…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@DzenanJupic
Comment options

@hawkw
Comment options

Answer selected by DzenanJupic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants