nexus-sdk 2.1.1

Rust SDK for Nexus protocol types, RPC access, and transaction construction.
Documentation
lazy_static::lazy_static! {
    pub(super) static ref STREAM_RECONNECTIONS: prometheus::Counter =
        prometheus::register_counter!(
            "poller_stream_reconnections",
            "Number of event stream reconnections"
        )
        .unwrap();

    pub(super) static ref REPLAY_REQUESTS: prometheus::Counter =
        prometheus::register_counter!(
            "poller_event_replay_requests",
            "Number of event replay requests"
        )
        .unwrap();

    pub(super) static ref REPLAY_RANGE_DURATION: prometheus::Histogram =
        prometheus::register_histogram!(
            "poller_event_replay_range_duration",
            "Duration of one complete checkpoint replay range [s]",
            vec![0.01, 0.05, 0.1, 0.5, 1.0, 5.0, 10.0, 30.0]
        )
        .unwrap();

    pub(super) static ref REPLAY_RANGE_EVENTS: prometheus::Histogram =
        prometheus::register_histogram!(
            "poller_event_replay_range_events",
            "Number of decoded query events retained by one replay range",
            vec![0.0, 1.0, 10.0, 100.0, 1_000.0, 10_000.0]
        )
        .unwrap();

    pub(super) static ref FILTERED_EVENTS_RECEIVED: prometheus::Counter =
        prometheus::register_counter!(
            "poller_filtered_events_received",
            "Number of events received after the query filter"
        )
        .unwrap();

    pub(super) static ref EVENT_PARSE_DURATION: prometheus::Histogram =
        prometheus::register_histogram!(
            "poller_event_parse_duration",
            "Duration of query event decoding [s]",
            vec![0.00001, 0.0001, 0.0005, 0.001, 0.005, 0.01, 0.05]
        )
        .unwrap();

    pub(super) static ref EVENTS_PER_PAGE: prometheus::Histogram =
        prometheus::register_histogram!(
            "poller_events_per_page",
            "Number of query events per event page",
            vec![0.0, 1.0, 10.0, 100.0, 1_000.0, 10_000.0]
        )
        .unwrap();

    pub(super) static ref EVENT_PAGE_CHANNEL_LEN: prometheus::Gauge =
        prometheus::register_gauge!(
            "poller_event_page_channel_len",
            "Number of event pages waiting for the consumer"
        )
        .unwrap();

    pub(super) static ref SEND_PAGE_BACKPRESSURE_DURATION: prometheus::Histogram =
        prometheus::register_histogram!(
            "poller_send_page_backpressure_duration",
            "Duration blocked while sending an event page [s]",
            vec![0.0001, 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1.0, 5.0, 10.0]
        )
        .unwrap();
}