Add tracing to user API (#1948)

Use the trace version in tests so we can just implement the required API functions.
This commit is contained in:
kegsay 2021-08-03 11:23:25 +01:00 committed by GitHub
parent d4aa311c74
commit e3df612953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 136 additions and 236 deletions

View file

@ -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,