runtime-otel-metrics
runtime-otel-metrics is an experimental crate that enables you to meter your tokio runtime and memory usage with OpenTelemetry. For tokio metrics it leans on tokio's unstable runtime metrics. For memory usage we use the memory-stats crate.
Usage
To use the tokio feature, you must compile with the rustc flag --cfg tokio_unstable.
// Register Tokio metrics with OpenTelemetry
register_tokio_metrics?;
// Register memory metrics
register?;