You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made the mistake a few times now of thinking a metric doesn't exist and finding it is in tokio::runtime::RuntimeMetrics rather than this crate.
Some examples of this are:
active_tasks_count
num_blocking_threads
num_idle_blocking_threads
blocking_queue_depth
io_driver_fd_registered_count
io_driver_fd_deregistered_count
Is there a way to expose all of the available tokio metrics here and keep them in sync?
Currently we use tokio-metrics for most metrics and then manually get the missing ones from the runtime handle:
structAdditionalTokioRuntimeMetrics{active_tasks_count:usize,num_blocking_threads:usize,num_idle_blocking_threads:usize,blocking_queue_depth:usize,}// NOTE: some metrics are not available from `tokio_metrics::RuntimeMetrics` so instead we// get it from `tokio::runtime::RuntimeMetrics`fnget_additional_tokio_metrics(runtime: tokio::runtime::RuntimeMetrics,) -> AdditionalTokioRuntimeMetrics{AdditionalTokioRuntimeMetrics{active_tasks_count: runtime.active_tasks_count(),num_blocking_threads: runtime.num_blocking_threads(),num_idle_blocking_threads: runtime.num_idle_blocking_threads(),blocking_queue_depth: runtime.blocking_queue_depth(),}}
Hoping to remove this snippet of code and rely exclusively on tokio-metrics.
The text was updated successfully, but these errors were encountered:
I've made the mistake a few times now of thinking a metric doesn't exist and finding it is in tokio::runtime::RuntimeMetrics rather than this crate.
Some examples of this are:
active_tasks_count
num_blocking_threads
num_idle_blocking_threads
blocking_queue_depth
io_driver_fd_registered_count
io_driver_fd_deregistered_count
Is there a way to expose all of the available tokio metrics here and keep them in sync?
Currently we use
tokio-metrics
for most metrics and then manually get the missing ones from the runtime handle:Hoping to remove this snippet of code and rely exclusively on
tokio-metrics
.The text was updated successfully, but these errors were encountered: