From e3df6129537427ae7dae52a4d04dfc8822d8c2ab Mon Sep 17 00:00:00 2001 From: kegsay Date: Tue, 3 Aug 2021 11:23:25 +0100 Subject: Add tracing to user API (#1948) Use the trace version in tests so we can just implement the required API functions. --- cmd/dendrite-monolith-server/main.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/dendrite-monolith-server/main.go') diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go index 3785371a..9974fe66 100644 --- a/cmd/dendrite-monolith-server/main.go +++ b/cmd/dendrite-monolith-server/main.go @@ -30,6 +30,7 @@ import ( "github.com/matrix-org/dendrite/setup/mscs" "github.com/matrix-org/dendrite/signingkeyserver" "github.com/matrix-org/dendrite/userapi" + uapi "github.com/matrix-org/dendrite/userapi/api" "github.com/sirupsen/logrus" _ "github.com/mattn/go-sqlite3" @@ -114,6 +115,11 @@ func main() { keyAPI := keyserver.NewInternalAPI(&base.Cfg.KeyServer, fsAPI) userAPI := userapi.NewInternalAPI(accountDB, &cfg.UserAPI, cfg.Derived.ApplicationServices, keyAPI) keyAPI.SetUserAPI(userAPI) + if traceInternal { + userAPI = &uapi.UserInternalAPITrace{ + Impl: userAPI, + } + } eduInputAPI := eduserver.NewInternalAPI( base, cache.New(), userAPI, -- cgit v1.2.3