pub fn new() -> PromResult<Self> {
        let registry = Registry::new();
        let inner = MetricsInner::new(&registry)?;

        // register program metrics (if on linux)
        #[cfg(target_os = "linux")]
        registry.register(Box::new(ProcessCollector::for_self()))?;

        Ok(Self { registry, inner })
    }
/// Creates the new prometheus regiestry and registers all needed collectors
Creates the new prometheus regiestry and registers all needed collectors
Creates the new prometheus regiestry and registers all needed collectors
pub fn new() -> PromResult<Self> {
        let registry = Registry::new();
        let inner = MetricsInner::new(&registry)?;
        // register program metrics (if on linux)
        #[cfg(target_os = "linux")]
        registry.register(Box::new(ProcessCollector::for_self()))?;
        Ok(Self { registry, inner })
    }
pub fn new ( ) -> PromResult < Self > { let registry = Registry :: new ( ) ; let inner = MetricsInner :: new ( & registry ) ? ; // register program metrics (if on linux) # [ cfg ( target_os " " ) ] registry . register ( Box :: new ( ProcessCollector :: for_self ( ) ) ) ? ; Ok ( Self { registry , inner } ) }
Creates the new prometheus regiestry and registers all needed collectors
Creates the new prometheus regiestry and registers all needed collectors