forked from mirror/client_golang
[docs] enhanced the basic example
To protect people from starting their exporter multiple times, one has to evaluate the error returned by http.ListenAndServe().
This commit is contained in:
parent
3fb8ace93b
commit
473bcd5aa1
|
@ -59,7 +59,7 @@
|
||||||
// // The Handler function provides a default handler to expose metrics
|
// // The Handler function provides a default handler to expose metrics
|
||||||
// // via an HTTP server. "/metrics" is the usual endpoint for that.
|
// // via an HTTP server. "/metrics" is the usual endpoint for that.
|
||||||
// http.Handle("/metrics", promhttp.Handler())
|
// http.Handle("/metrics", promhttp.Handler())
|
||||||
// http.ListenAndServe(":8080", nil)
|
// log.Fatal(http.ListenAndServe(":8080", nil))
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue