#[cfg(feature = "metrics-prometheus")]
pub use prometheus;
#[cfg(feature = "metrics-prometheus")]
#[derive(Clone)]
pub struct GarrisonMetrics {
pub(crate) login_total: prometheus::CounterVec,
pub(crate) token_validation_duration: prometheus::Histogram,
pub(crate) permission_query_total: prometheus::CounterVec,
pub(crate) role_query_total: prometheus::CounterVec,
pub(crate) registry: prometheus::Registry,
}
#[cfg(feature = "metrics-prometheus")]
mod metrics_impl;
#[cfg(feature = "audit-inklog")]
pub mod inklog;
#[cfg(feature = "otlp")]
pub mod otlp;
#[cfg(feature = "otlp")]
pub mod errors;
#[cfg(feature = "audit-inklog")]
pub use inklog::{init_inklog_logging, init_inklog_logging_with_fallback};
#[cfg(feature = "otlp")]
pub use otlp::init_otlp_tracing;
#[cfg(feature = "otlp")]
pub use otlp::shutdown_otlp_tracing;
#[cfg(feature = "audit-inklog")]
#[must_use = "InklogInit holds the LoggerManager guard; dropping it may unregister the log subscriber"]
pub struct InklogInit {
pub(crate) guard: Option<::inklog::LoggerManager>,
pub(crate) degraded: bool,
}
#[cfg(feature = "otlp")]
#[derive(Debug, thiserror::Error)]
pub enum GarrisonOtelError {
#[error("OTLP exporter construction failed: {0}")]
Exporter(String),
#[error("Tracer provider setup failed: {0}")]
Provider(String),
}
#[cfg(not(feature = "metrics-prometheus"))]
pub type GarrisonMetrics = ();
#[cfg(test)]
mod tests;