-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Name or classify tasks spawned by the subscriber runtime #109
Comments
Since using the console already requires enabling In the future, it would be nice to be able to associate tasks with runtimes, and name runtimes as well. That way, we could say things like "hide all tasks belonging to the console runtime". But that would require new instrumentation in Tokio, so it's a bigger project. |
This branch updates the `console-subscriber` crate so that the "aggregate" and "serve" tasks spawned by the console are spawned with names. This allows the user to distinguish between tasks spawned by the console subscriber and tasks spawned by other parts of the application. Note that this does *not* include the tasks spawned by Tonic to handle each accepted client connection. Those tasks are spawned inside of Tonic, rather than by the console-subscriber crate, so we can't easily add our own names to them. We could probably fix that by using Tonic's lower level APIs to spawn our own per-connection tasks, and give them names...but that seems like a follow-up PR. This is a first pass on #109 (although it isn't a *complete* solution due to the above issue with Tonic).
#117 added names to the console's |
This branch updates the `console-subscriber` crate so that the "aggregate" and "serve" tasks spawned by the console are spawned with names. This allows the user to distinguish between tasks spawned by the console subscriber and tasks spawned by other parts of the application. Note that this does *not* include the tasks spawned by Tonic to handle each accepted client connection. Those tasks are spawned inside of Tonic, rather than by the console-subscriber crate, so we can't easily add our own names to them. We could probably fix that by using Tonic's lower level APIs to spawn our own per-connection tasks, and give them names...but that seems like a follow-up PR. This is a first pass on #109 (although it isn't a *complete* solution due to the above issue with Tonic). Screenshot: 
Could the many tonic / hyper tasks be filtered out using spans and layers? |
The subscriber starts its own runtime and server, and those tasks are instrumented and shown in the Console too. That is actually useful in some situations. But it also can be distracting. It would help if we could name or classify any tasks in that runtime to help a user viewing the Console, so they understand "oh, those aren't my tasks".
The text was updated successfully, but these errors were encountered: