servlet 1.2.0

A small application runtime with an explicit operational contract
Documentation
//! Application-owned Prometheus instruments with bounded, frozen definitions.
//!
//! Create instruments in a standalone [`Registry`] and attach it with
//! [`crate::App::metrics`], or register through [`crate::setup::SetupContext::metrics`].
//! Each registry attaches to one application. Registration seals when setup ends;
//! native handles remain usable through drain and cleanup. No global registry is used.
//!
//! ```
//! use servlet::metrics::{Labels, Registry};
//! let metrics = Registry::new();
//! let ok = Labels::new(&[("outcome", "ok")])?;
//! let family = metrics.counter_family("jobs_total", "Completed jobs", &[ok.clone()])?;
//! family.get(&ok).unwrap().inc();
//! assert!(metrics.encode()?.contains("jobs_total{outcome=\"ok\"} 1"));
//! # Ok::<(), servlet::metrics::MetricError>(())
//! ```

mod error;
mod family;
mod instruments;
mod registry;
mod validation;

pub use error::MetricError;
pub use family::{Family, Labels};
pub use prometheus::{Histogram, IntCounter as Counter, IntGauge as Gauge};
pub use registry::Registry;