mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-08-23 22:26:29 +00:00
added Prometheus instrumentation
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"net/http"
|
||||
"runtime"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
@@ -20,6 +21,7 @@ func New(options ...func(*Server)) *Server {
|
||||
|
||||
s.mux.HandleFunc("/", s.index)
|
||||
s.mux.HandleFunc("/healthz/", s.healthz)
|
||||
s.mux.Handle("/metrics", promhttp.Handler())
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user