diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-12-05 13:53:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 13:53:36 +0100 |
commit | e245a26f6bcb4d134015f49f621b6d639a78707f (patch) | |
tree | 87bd54e9d6ad35a225fe8f6dd9bb102c161e5f2e /roomserver/roomserver.go | |
parent | b65f89e61e95b295e46ac3ade3c860b56126fa90 (diff) |
Enable/Disable internal metrics (#2899)
Basically enables us to use `test.WithAllDatabases` when testing
internal HTTP APIs, as this would otherwise result in Prometheus
complaining about already registered metric names.
Diffstat (limited to 'roomserver/roomserver.go')
-rw-r--r-- | roomserver/roomserver.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/roomserver/roomserver.go b/roomserver/roomserver.go index 1f707735..0f6b48bf 100644 --- a/roomserver/roomserver.go +++ b/roomserver/roomserver.go @@ -16,18 +16,19 @@ package roomserver import ( "github.com/gorilla/mux" + "github.com/sirupsen/logrus" + "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/internal" "github.com/matrix-org/dendrite/roomserver/inthttp" "github.com/matrix-org/dendrite/roomserver/storage" "github.com/matrix-org/dendrite/setup/base" - "github.com/sirupsen/logrus" ) // AddInternalRoutes registers HTTP handlers for the internal API. Invokes functions // on the given input API. -func AddInternalRoutes(router *mux.Router, intAPI api.RoomserverInternalAPI) { - inthttp.AddRoutes(intAPI, router) +func AddInternalRoutes(router *mux.Router, intAPI api.RoomserverInternalAPI, enableMetrics bool) { + inthttp.AddRoutes(intAPI, router, enableMetrics) } // NewInternalAPI returns a concerete implementation of the internal API. Callers |