mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
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.
This commit is contained in:
parent
b65f89e61e
commit
e245a26f6b
20 changed files with 164 additions and 154 deletions
|
@ -37,8 +37,8 @@ import (
|
|||
|
||||
// AddInternalRoutes registers HTTP handlers for the internal API. Invokes functions
|
||||
// on the given input API.
|
||||
func AddInternalRoutes(router *mux.Router, intAPI api.UserInternalAPI) {
|
||||
inthttp.AddRoutes(router, intAPI)
|
||||
func AddInternalRoutes(router *mux.Router, intAPI api.UserInternalAPI, enableMetrics bool) {
|
||||
inthttp.AddRoutes(router, intAPI, enableMetrics)
|
||||
}
|
||||
|
||||
// NewInternalAPI returns a concerete implementation of the internal API. Callers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue