mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
08bbb1537e
* Implement process uptime metric * Add clarification comment * Add another clarification comment
15 lines
320 B
Go
15 lines
320 B
Go
package metrics
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
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, NewHandler())
|
|
return http.ListenAndServe(addr, nil)
|
|
}
|