Browse Source

tools: update metrics to use promhttp

Update function-tester/etcd-tester/main.go to use promhttp.Handler() instead of prometheus.Handler()
tylerauerbeck 8 years ago
parent
commit
993a0cf569
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tools/functional-tester/etcd-tester/main.go

+ 2 - 2
tools/functional-tester/etcd-tester/main.go

@@ -24,7 +24,7 @@ import (
 	"github.com/coreos/etcd/pkg/debugutil"
 	"github.com/coreos/etcd/pkg/debugutil"
 
 
 	"github.com/coreos/pkg/capnslog"
 	"github.com/coreos/pkg/capnslog"
-	"github.com/prometheus/client_golang/prometheus"
+	"github.com/prometheus/client_golang/prometheus/promhttp"
 	"golang.org/x/time/rate"
 	"golang.org/x/time/rate"
 )
 )
 
 
@@ -138,7 +138,7 @@ func main() {
 
 
 	sh := statusHandler{status: &t.status}
 	sh := statusHandler{status: &t.status}
 	http.Handle("/status", sh)
 	http.Handle("/status", sh)
-	http.Handle("/metrics", prometheus.Handler())
+	http.Handle("/metrics", promhttp.Handler())
 
 
 	if *enablePprof {
 	if *enablePprof {
 		for p, h := range debugutil.PProfHandlers() {
 		for p, h := range debugutil.PProfHandlers() {