Implement process uptime metric (#666)
* Implement process uptime metric * Add clarification comment * Add another clarification comment
This commit is contained in:
@@ -3,17 +3,12 @@ package metrics
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func Handler() http.Handler {
|
||||
return promhttp.Handler()
|
||||
}
|
||||
|
||||
func StartServer(logger *logrus.Logger, path string, addr string) error {
|
||||
logger.WithField("addr", addr).WithField("path", path).Info("starting prometheus metrics server")
|
||||
|
||||
http.Handle(path, Handler())
|
||||
http.Handle(path, NewHandler())
|
||||
return http.ListenAndServe(addr, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user