You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PrometheusMetricsBuilder consumes Registry not allowing to pass default prometheus registry.
This prevents usage of very convinient lazy static metrics from prometheus package
// This will register to prometheus::default_registry()lazy_static!{static ref HIGH_FIVE_COUNTER:IntCounter =
register_int_counter!("highfives","Number of high fives received").unwrap();}
...
let prometheus = PrometheusMetricsBuilder::new("api").endpoint("/metrics").registry(prometheus::default_registry())// <<<<<<<<<<<<<<<<<<<<<< ERROR.build().map_err(|e| RunServiceError::Prometheus(e.to_string()))?;
Though, from the first glance it should be perfectly possible to accept registry by reference instead
The text was updated successfully, but these errors were encountered:
PrometheusMetricsBuilder consumes Registry not allowing to pass default prometheus registry.
This prevents usage of very convinient lazy static metrics from prometheus package
Though, from the first glance it should be perfectly possible to accept registry by reference instead
The text was updated successfully, but these errors were encountered: