Macro ckb_metrics::metrics
source · macro_rules! metrics {
(counter, $label:literal, $value:expr $(, $span_name:expr => $span_value:expr )* $(,)?) => { ... };
(gauge, $label:literal, $value:expr $(, $span_name:expr => $span_value:expr )* $(,)?) => { ... };
(timing, $label:literal, $duration:expr $(, $span_name:expr => $span_value:expr )* $(,)?) => { ... };
}Expand description
Out-of-the-box macros for metrics.
- A counter is a cumulative metric that represents a monotonically increasing value which can only be increased or be reset to zero on restart.
- A gauge is a metric that can go up and down, arbitrarily, over time.
- A timing is a metric of time consumed.