-
Notifications
You must be signed in to change notification settings - Fork 13
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
admin: Include tokio runtime metrics in the default metrics export #215
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change adds a new independent crate, kubert-prometheus-tokio, that exports Tokio runtime metrics when the `tokio_unstable` compiler feature is enabled. When these unstable features are enabled, a set of tokio runtime metrics is included in the default metrics export. For example: # HELP tokio_rt_workers The number of worker threads used by the runtime. # TYPE tokio_rt_workers gauge tokio_rt_workers 16 # HELP tokio_rt_park Total number of times worker threads parked. # TYPE tokio_rt_park counter tokio_rt_park_total 1237 # HELP tokio_rt_noop Number of times workers unparked but found no new work. # TYPE tokio_rt_noop counter tokio_rt_noop_total 776 # HELP tokio_rt_steal Number of tasks stolen by workers from others. # TYPE tokio_rt_steal counter tokio_rt_steal_total 19 # HELP tokio_rt_steal_operations Number of times workers stole tasks from other. # TYPE tokio_rt_steal_operations counter tokio_rt_steal_operations_total 19 # HELP tokio_rt_remote_schedule Total number of remote schedule operations. # TYPE tokio_rt_remote_schedule counter tokio_rt_remote_schedule_total 27 # HELP tokio_rt_local_schedule Total number of local schedule operations. # TYPE tokio_rt_local_schedule counter tokio_rt_local_schedule_total 546 # HELP tokio_rt_overflow Total number of overflow operations. # TYPE tokio_rt_overflow counter tokio_rt_overflow_total 0 # HELP tokio_rt_polls The number of tasks that have been polled across all worker threads. # TYPE tokio_rt_polls counter tokio_rt_polls_total 468 # HELP tokio_rt_busy_seconds Total duration of time when worker threads were busy processing tasks. # TYPE tokio_rt_busy_seconds counter # UNIT tokio_rt_busy_seconds seconds tokio_rt_busy_seconds_total 0.08628424000000004 # HELP tokio_rt_injection_queue_depth The number of tasks currently scheduled in the runtime's injection queue. # TYPE tokio_rt_injection_queue_depth gauge tokio_rt_injection_queue_depth 0 # HELP tokio_rt_local_queue_depth The total number of tasks currently scheduled in workers' local queues. # TYPE tokio_rt_local_queue_depth gauge tokio_rt_local_queue_depth 0 # HELP tokio_rt_budget_forced_yield Number of times a worker thread was forced to yield due to budget exhaustion. # TYPE tokio_rt_budget_forced_yield counter tokio_rt_budget_forced_yield_total 0 # HELP tokio_rt_io_driver_ready Number of times the IO driver was woken up. # TYPE tokio_rt_io_driver_ready counter tokio_rt_io_driver_ready_total 80 The kubert-prometheus-tokio crate provides standalone prometheus-client integration using the tokio-metrics crate. This is achieved by spawning a background task that updates these metrics once per second. The polling interval for the default metrics endpoint cannot currently be configured.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds a new independent crate, kubert-prometheus-tokio, that exports Tokio runtime metrics when the
tokio_unstable
compiler feature is enabled. When these unstable features are enabled, a set of tokio runtime metrics is included in the default metrics export. For example:The kubert-prometheus-tokio crate provides standalone prometheus-client integration using the tokio-metrics crate. This is achieved by spawning a background task that updates these metrics once per second. The polling interval for the default metrics endpoint cannot currently be configured.