From 33da7163646f51567f4c24a67b6bb03e56d690e6 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 23 May 2018 11:09:04 +0100 Subject: [PATCH] bla2 --- .../dendrite/common/basecomponent/base.go | 4 -- .../matrix-org/dendrite/common/httpapi.go | 4 +- vendor/manifest | 46 ++++++------------- 3 files changed, 14 insertions(+), 40 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/common/basecomponent/base.go b/src/github.com/matrix-org/dendrite/common/basecomponent/base.go index 28f71a608..ed7cb7ab8 100644 --- a/src/github.com/matrix-org/dendrite/common/basecomponent/base.go +++ b/src/github.com/matrix-org/dendrite/common/basecomponent/base.go @@ -27,7 +27,6 @@ import ( "github.com/matrix-org/dendrite/clientapi/auth/storage/devices" "github.com/matrix-org/dendrite/common" - "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/gorilla/mux" sarama "gopkg.in/Shopify/sarama.v1" @@ -137,9 +136,6 @@ func (b *BaseDendrite) SetupAndServeHTTP(addr string) { common.SetupHTTPAPI(http.DefaultServeMux, common.WrapHandlerInCORS(b.APIMux)) logrus.Infof("Starting %s server on %s", b.componentName, addr) - http.Handle("/metrics", promhttp.Handler()) - logrus.Infof("Starting %s Prometheus server at /metrics", b.componentName) - err := http.ListenAndServe(addr, nil) if err != nil { diff --git a/src/github.com/matrix-org/dendrite/common/httpapi.go b/src/github.com/matrix-org/dendrite/common/httpapi.go index 5a3065d75..86b6a0b6b 100644 --- a/src/github.com/matrix-org/dendrite/common/httpapi.go +++ b/src/github.com/matrix-org/dendrite/common/httpapi.go @@ -10,7 +10,7 @@ import ( "github.com/matrix-org/util" opentracing "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" - "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" ) // MakeAuthAPI turns a util.JSONRequestHandler function into an http.Handler which checks the access token in the request. @@ -87,8 +87,6 @@ func MakeFedAPI( // SetupHTTPAPI registers an HTTP API mux under /api and sets up a metrics // listener. func SetupHTTPAPI(servMux *http.ServeMux, apiMux http.Handler) { - // This is deprecated. - servMux.Handle("/metrics", prometheus.Handler()) // nolint: megacheck, staticcheck servMux.Handle("/metrics", promhttp.Handler()) servMux.Handle("/api/", http.StripPrefix("/api", apiMux)) } diff --git a/vendor/manifest b/vendor/manifest index 5562c43fd..1efeb5de2 100644 --- a/vendor/manifest +++ b/vendor/manifest @@ -208,26 +208,18 @@ "branch": "master", "path": "/difflib" }, - { - "importpath": "github.com/prometheus/client_golang", - "repository": "https://github.com/prometheus/client_golang", - "revision": "c317fb74746eac4fc65fe3909195f4cf67c5562a", - "branch": "master" - }, - { - "importpath": "github.com/prometheus/client_model/go", - "repository": "https://github.com/prometheus/client_model", - "revision": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6", - "branch": "master", - "path": "/go" - }, - { - "importpath": "github.com/prometheus/common/expfmt", - "repository": "https://github.com/prometheus/common", - "revision": "dd2f054febf4a6c00f2343686efb775948a8bff4", - "branch": "master", - "path": "/expfmt" - }, + { + "importpath": "github.com/prometheus/client_golang/prometheus", + "repository": "https://github.com/prometheus/client_golang", + "revision": "c51dc758d4bb30acacbef9eaa2b774969a135086", + "branch": "master" + }, + { + "importpath": "github.com/prometheus/client_golang/prometheus/promhttp", + "repository": "https://github.com/prometheus/client_golang", + "revision": "c51dc758d4bb30acacbef9eaa2b774969a135086", + "branch": "master" + }, { "importpath": "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg", "repository": "https://github.com/prometheus/common", @@ -460,18 +452,6 @@ "repository": "https://gopkg.in/yaml.v2", "revision": "287cf08546ab5e7e37d55a84f7ed3fd1db036de5", "branch": "v2" - }, - { - "importpath": "github.com/prometheus/client_golang/prometheus", - "repository": "https://github.com/prometheus/client_golang", - "revision": "c51dc758d4bb30acacbef9eaa2b774969a135086", - "branch": "master" - }, - { - "importpath": "github.com/prometheus/client_golang/prometheus/promhttp", - "repository": "https://github.com/prometheus/client_golang", - "revision": "c51dc758d4bb30acacbef9eaa2b774969a135086", - "branch": "master" - } + } ] }