mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
bla2
This commit is contained in:
parent
d1a89e71fc
commit
33da716364
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
46
vendor/manifest
vendored
46
vendor/manifest
vendored
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue