Function prometheus::register [] [src]

pub fn register(c: Box<Collector>) -> Result<()>

register registers a new Collector to be included in metrics collection. It returns an error if the descriptors provided by the Collector are invalid or if they - in combination with descriptors of already registered Collectors - do not fulfill the consistency and uniqueness criteria described in the Desc documentation.