remove reference to promhttp in etcd-version-monitor

This commit is contained in:
wuyafang 2019-10-23 15:56:01 +08:00
parent 2adadf9218
commit 6f0e74a8a1
2 changed files with 1 additions and 3 deletions

View File

@ -18,7 +18,6 @@ go_library(
deps = [
"//staging/src/k8s.io/component-base/metrics:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/prometheus/client_golang/prometheus/promhttp:go_default_library",
"//vendor/github.com/prometheus/client_model/go:go_default_library",
"//vendor/github.com/prometheus/common/expfmt:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",

View File

@ -26,7 +26,6 @@ import (
"time"
"github.com/gogo/protobuf/proto"
"github.com/prometheus/client_golang/prometheus/promhttp"
dto "github.com/prometheus/client_model/go"
"github.com/prometheus/common/expfmt"
"github.com/spf13/pflag"
@ -402,6 +401,6 @@ func main() {
// Serve our metrics on listenAddress/metricsPath.
klog.Infof("Listening on: %v", listenAddress)
http.Handle(metricsPath, promhttp.HandlerFor(gatherer, promhttp.HandlerOpts{}))
http.Handle(metricsPath, metrics.HandlerFor(gatherer, metrics.HandlerOpts{}))
klog.Errorf("Stopped listening/serving metrics: %v", http.ListenAndServe(listenAddress, nil))
}