near-dyn-configs 0.30.3

Dynamic configure helpers for the near codebase
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use near_o11y::metrics::{IntCounter, IntGauge, try_create_int_counter, try_create_int_gauge};
use std::sync::LazyLock;

pub static CONFIG_RELOADS: LazyLock<IntCounter> = LazyLock::new(|| {
    try_create_int_counter(
        "near_config_reloads_total",
        "Number of times the configs were reloaded during the current run of the process",
    )
    .unwrap()
});

pub static CONFIG_RELOAD_TIMESTAMP: LazyLock<IntGauge> = LazyLock::new(|| {
    try_create_int_gauge(
        "near_config_reload_timestamp_seconds",
        "Timestamp of the last reload of the config",
    )
    .unwrap()
});