metrique 0.1.25

Library for generating wide event metrics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use metrique::{CloseValue, ServiceMetrics};
use metrique::unit_of_work::metrics;
use metrique::writer::{EntrySink, GlobalEntrySink};

#[metrics]
struct MyMetrics {
    operation: &'static str,
}

fn main() {
    let metrics = MyMetrics {
        operation: "example",
    };
    // Missing RootEntry::new around metrics.close()
    ServiceMetrics::sink().append(metrics.close());
}