Skip to content
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

Allow naming tasks to differentiate actors in tokio-console. #4451

Merged
merged 5 commits into from
Jan 25, 2024

Conversation

fulmicoton
Copy link
Contributor

By default, tokio-console labels its task using its spawning point. Since all actors are spawned from the same place they end up with the same label.

This introduce an API to optionally name tasks.
For actors, the actor's struct Name is used automatically.

If tokio-console is not enabled, this is no cost.

By default, tokio-console labels its task using its spawning point.
Since all actors are spawned from the same place they end up with the
same label.

This introduce an API to optionally name tasks.
For actors, the actor's struct Name is used automatically.

If tokio-console is not enabled, this is no cost.
Copy link
Contributor

@trinity-1686a trinity-1686a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

task names appear to be PascalCase, snake_case and kebab-case. Can you make them all the same case family please?

By default, tokio-console labels its task using its spawning point.
Since all actors are spawned from the same place they end up with the
same label.

This introduce an API to optionally name tasks.
For actors, the actor's struct Name is used automatically.

If tokio-console is not enabled, this is no cost.
@fulmicoton fulmicoton enabled auto-merge (squash) January 25, 2024 02:49
@fulmicoton fulmicoton merged commit 9eef3bb into main Jan 25, 2024
4 checks passed
@fulmicoton fulmicoton deleted the named_tasks branch January 25, 2024 05:55
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.

2 participants