File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,14 @@ pub fn init_metrics_handle() -> Result<PrometheusHandle, BuildError> {
5454}
5555
5656/// This method initialized metrics by installing a global metrics recorder.
57- /// It also starts listening on an http endpoint at `0.0.0.0 :9000/metrics`
58- /// for scrapers to collect metrics from. If the passed project_ref
59- /// is not none, it is set as a global label named "project".
57+ /// It also starts listening on an http endpoint at `[::] :9000/metrics`
58+ /// for scrapers to collect metrics from. This listens on all IPv4 and IPv6 interfaces.
59+ /// If the passed project_ref is not none, it is set as a global label named "project".
6060pub fn init_metrics ( project_ref : Option < String > ) -> Result < ( ) , BuildError > {
61- let mut builder = PrometheusBuilder :: new ( ) ;
61+ let mut builder = PrometheusBuilder :: new ( ) . with_http_listener ( std:: net:: SocketAddr :: new (
62+ std:: net:: IpAddr :: V6 ( std:: net:: Ipv6Addr :: UNSPECIFIED ) ,
63+ 9000 ,
64+ ) ) ;
6265
6366 if let Some ( project_ref) = project_ref {
6467 builder = builder. add_global_label ( "project" , project_ref) ;
You can’t perform that action at this time.
0 commit comments