4 releases
Uses new Rust 2024
| 0.0.24 | Oct 22, 2025 |
|---|---|
| 0.0.23 | Jul 11, 2025 |
| 0.0.22 | Jun 24, 2024 |
| 0.0.21 | May 11, 2024 |
#2132 in Asynchronous
74,262 downloads per month
190KB
3K
SLoC
Monitor a tokio runtime.
Usage
use measured::MetricGroup;
#[derive(MetricGroup)]
#[metric(new())]
struct MyAppMetrics {
#[cfg(tokio_unstable)]
#[metric(namespace = "tokio")]
#[metric(init = measured_tokio::RuntimeCollector::current())]
tokio: measured_tokio::RuntimeCollector,
// other metrics
}
#[tokio::main]
async fn main() {
let metrics = MyAppMetrics::new();
// when you run metrics.collect_group_into(...), you will sample tokio to get runtime state.
# drop(metrics);
}
measured-tokio
Tokio metrics support for measured.
Dependencies
~4–15MB
~136K SLoC