hyperlane-plugin-metrics 22.14.1

A lock-free atomic Prometheus/OpenMetrics observability plugin for the Hyperlane framework with built-in HTTP request counters, in-flight gauges, latency histograms, custom user metric registration, and a scrapeable /metrics endpoint.
Documentation
//! hyperlane-plugin-metrics
//!
//! Lock-free atomic Prometheus/OpenMetrics observability plugin for Hyperlane
//! with built-in HTTP request counters, in-flight gauges, fixed-bucket latency
//! histograms, custom metric handles, and a scrapeable `/metrics` endpoint.

mod r#const;
mod r#fn;
mod r#impl;
mod r#static;
mod r#struct;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {r#const::*, r#struct::*};

pub(crate) use {r#fn::*, r#static::*};

use std::{
    array::from_fn,
    fmt::{self, Write},
    str::from_utf8,
    sync::{
        Arc, OnceLock, RwLock,
        atomic::{AtomicI64, AtomicU64, Ordering},
    },
    time::Instant,
};

use {
    hyperlane::{
        AUTHORIZATION, CACHE_CONTROL, CONTENT_TYPE, Context, HashMapXxHash3_64, HttpStatus,
        Request, RequestHeadersValue, ResponseData, ResponseError, ServerHook, Status, Stream,
        hash_map_xx_hash3_64,
    },
    lombok_macros::*,
};