diff --git a/examples/addsvc/cmd/addsvc/main.go b/examples/addsvc/cmd/addsvc/main.go index 247a028..290d111 100644 --- a/examples/addsvc/cmd/addsvc/main.go +++ b/examples/addsvc/cmd/addsvc/main.go @@ -17,6 +17,7 @@ stdopentracing "github.com/opentracing/opentracing-go" zipkin "github.com/openzipkin/zipkin-go-opentracing" stdprometheus "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" "google.golang.org/grpc" "sourcegraph.com/sourcegraph/appdash" appdashot "sourcegraph.com/sourcegraph/appdash/opentracing" @@ -198,7 +199,7 @@ m.Handle("/debug/pprof/profile", http.HandlerFunc(pprof.Profile)) m.Handle("/debug/pprof/symbol", http.HandlerFunc(pprof.Symbol)) m.Handle("/debug/pprof/trace", http.HandlerFunc(pprof.Trace)) - m.Handle("/metrics", stdprometheus.Handler()) + m.Handle("/metrics", promhttp.Handler()) logger.Log("addr", *debugAddr) errc <- http.ListenAndServe(*debugAddr, m) diff --git a/examples/shipping/main.go b/examples/shipping/main.go index a4b42f7..e348e46 100644 --- a/examples/shipping/main.go +++ b/examples/shipping/main.go @@ -12,6 +12,7 @@ "time" stdprometheus "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/go-kit/kit/log" kitprometheus "github.com/go-kit/kit/metrics/prometheus" @@ -142,7 +143,7 @@ mux.Handle("/handling/v1/", handling.MakeHandler(hs, httpLogger)) http.Handle("/", accessControl(mux)) - http.Handle("/metrics", stdprometheus.Handler()) + http.Handle("/metrics", promhttp.Handler()) errs := make(chan error, 2) go func() { diff --git a/examples/stringsvc2/main.go b/examples/stringsvc2/main.go index d67d2a5..60544f2 100644 --- a/examples/stringsvc2/main.go +++ b/examples/stringsvc2/main.go @@ -5,6 +5,7 @@ "os" stdprometheus "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/go-kit/kit/log" kitprometheus "github.com/go-kit/kit/metrics/prometheus" @@ -53,7 +54,7 @@ http.Handle("/uppercase", uppercaseHandler) http.Handle("/count", countHandler) - http.Handle("/metrics", stdprometheus.Handler()) + http.Handle("/metrics", promhttp.Handler()) logger.Log("msg", "HTTP", "addr", ":8080") logger.Log("err", http.ListenAndServe(":8080", nil)) } diff --git a/examples/stringsvc3/main.go b/examples/stringsvc3/main.go index 0e2b6b7..5cdb43b 100644 --- a/examples/stringsvc3/main.go +++ b/examples/stringsvc3/main.go @@ -7,6 +7,7 @@ "os" stdprometheus "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/go-kit/kit/log" kitprometheus "github.com/go-kit/kit/metrics/prometheus" @@ -63,7 +64,7 @@ http.Handle("/uppercase", uppercaseHandler) http.Handle("/count", countHandler) - http.Handle("/metrics", stdprometheus.Handler()) + http.Handle("/metrics", promhttp.Handler()) logger.Log("msg", "HTTP", "addr", *listen) logger.Log("err", http.ListenAndServe(*listen, nil)) }