From e245a26f6bcb4d134015f49f621b6d639a78707f Mon Sep 17 00:00:00 2001 From: Till <2353100+S7evinK@users.noreply.github.com> Date: Mon, 5 Dec 2022 13:53:36 +0100 Subject: 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. --- federationapi/federationapi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'federationapi/federationapi.go') diff --git a/federationapi/federationapi.go b/federationapi/federationapi.go index 85425122..87eb751f 100644 --- a/federationapi/federationapi.go +++ b/federationapi/federationapi.go @@ -43,8 +43,8 @@ import ( // AddInternalRoutes registers HTTP handlers for the internal API. Invokes functions // on the given input API. -func AddInternalRoutes(router *mux.Router, intAPI api.FederationInternalAPI) { - inthttp.AddRoutes(intAPI, router) +func AddInternalRoutes(router *mux.Router, intAPI api.FederationInternalAPI, enableMetrics bool) { + inthttp.AddRoutes(intAPI, router, enableMetrics) } // AddPublicRoutes sets up and registers HTTP handlers on the base API muxes for the FederationAPI component. -- cgit v1.2.3