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

Export metrics about the blocking thread pool #5156

Closed
duarten opened this issue Nov 1, 2022 · 1 comment · Fixed by #5161
Closed

Export metrics about the blocking thread pool #5156

duarten opened this issue Nov 1, 2022 · 1 comment · Fixed by #5161
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-metrics Module: tokio/runtime/metrics

Comments

@duarten
Copy link
Contributor

duarten commented Nov 1, 2022

Is your feature request related to a problem? Please describe.

I'd like to have insight into how many threads are currently created in the blocking thread pool and what the main queue length is.

Describe the solution you'd like

These metrics coul be exported as tokio-metrics or there could be some API to fetch their values.

Describe alternatives you've considered

N/A

Additional context

N/A

@duarten duarten added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Nov 1, 2022
@Darksonn Darksonn added the M-metrics Module: tokio/runtime/metrics label Nov 1, 2022
@Darksonn
Copy link
Contributor

Darksonn commented Nov 1, 2022

This sounds reasonable.

carllerche pushed a commit that referenced this issue Nov 4, 2022
Publish the blocking thread pool metrics as thread-safe values, written
under the blocking thread pool's lock and able to be read in a lock-free
fashion by any reader.

Fixes #5156
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-metrics Module: tokio/runtime/metrics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants