aboutsummaryrefslogtreecommitdiff
path: root/cmd/dendrite-monolith-server/main.go
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2021-08-03 11:23:25 +0100
committerGitHub <noreply@github.com>2021-08-03 11:23:25 +0100
commite3df6129537427ae7dae52a4d04dfc8822d8c2ab (patch)
tree50fc037437622b7f0d1f6a47f23132b4ac3e74b1 /cmd/dendrite-monolith-server/main.go
parentd4aa311c744ff59c5c92713e34e3ddb375841c3c (diff)
Add tracing to user API (#1948)
Use the trace version in tests so we can just implement the required API functions.
Diffstat (limited to 'cmd/dendrite-monolith-server/main.go')
-rw-r--r--cmd/dendrite-monolith-server/main.go6
1 files changed, 6 insertions, 0 deletions
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,