-
Hello all, Apologies if this is already documented somewhere but I couldn't find it. What are the best practices for monitoring/observability/metrics/profiling of a running Tokio-based app? We have a production service that has been hitting some memory pressure when it receives a large number of simultaneous requests, and profiling hasn't shown any smoking guns in our application code yet. I'm trying to rule out some kind of pernicious configuration in our Tokio runtime - is there a good way to instrument Tokio to report information about the internal state (number of active/blocked/suspended tasks, etc.) to an external metrics service? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The two main tools that exist at this moment is the As for metrics that track performance numbers more generally, we are working on tools for those (see #3845), but those are not available yet. |
Beta Was this translation helpful? Give feedback.
The two main tools that exist at this moment is the
tracing
crate and thetokio-console
tool. The first tool is a logging and tracing crate that works well with async code, and the second tool is a "task manager" that can view all tasks on the runtime and can tell you if they are blocked and such.As for metrics that track performance numbers more generally, we are working on tools for those (see #3845), but those are not available yet.