From e5f5da429782ffdf03893036ac4965a3fba682fd Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sat, 1 Dec 2018 14:38:03 -0800 Subject: [PATCH] Update Prometheus to 0.9.1 (#2360) Signed-off-by: Yong Tang --- Makefile | 2 +- plugin/metrics/metrics.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7f7951147..c39d5f671 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ godeps: go get -u github.com/prometheus/client_golang/prometheus (cd $(GOPATH)/src/github.com/mholt/caddy && git checkout -q v0.11.1) (cd $(GOPATH)/src/github.com/miekg/dns && git checkout -q v1.1.0) - (cd $(GOPATH)/src/github.com/prometheus/client_golang && git checkout -q v0.8.0) + (cd $(GOPATH)/src/github.com/prometheus/client_golang && git checkout -q v0.9.1) .PHONY: travis travis: diff --git a/plugin/metrics/metrics.go b/plugin/metrics/metrics.go index 6b496cccc..159eec014 100644 --- a/plugin/metrics/metrics.go +++ b/plugin/metrics/metrics.go @@ -5,7 +5,6 @@ import ( "context" "net" "net/http" - "os" "sync" "time" @@ -40,7 +39,7 @@ func New(addr string) *Metrics { } // Add the default collectors met.MustRegister(prometheus.NewGoCollector()) - met.MustRegister(prometheus.NewProcessCollector(os.Getpid(), "")) + met.MustRegister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{})) // Add all of our collectors met.MustRegister(buildInfo)