aboutsummaryrefslogtreecommitdiff
path: root/appservice
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-03-13 16:45:14 +0100
committerGitHub <noreply@github.com>2023-03-13 16:45:14 +0100
commit232aef016c928fddd57ac84ff1c9827db4eb68df (patch)
treeb8563d9f4f6768915266cce07734025dd3f21adc /appservice
parent689b5ee72fe2ff6226c2afc5b209889f772f0819 (diff)
Add basic runtime tracing (#2996)
This allows us in almost all places to use regions to further trace down long running tasks. Also removes an unused function.
Diffstat (limited to 'appservice')
-rw-r--r--appservice/query/query.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/appservice/query/query.go b/appservice/query/query.go
index 2348eab4..0466f81d 100644
--- a/appservice/query/query.go
+++ b/appservice/query/query.go
@@ -25,10 +25,10 @@ import (
"strings"
"sync"
- "github.com/opentracing/opentracing-go"
log "github.com/sirupsen/logrus"
"github.com/matrix-org/dendrite/appservice/api"
+ "github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/setup/config"
)
@@ -50,8 +50,8 @@ func (a *AppServiceQueryAPI) RoomAliasExists(
request *api.RoomAliasExistsRequest,
response *api.RoomAliasExistsResponse,
) error {
- span, ctx := opentracing.StartSpanFromContext(ctx, "ApplicationServiceRoomAlias")
- defer span.Finish()
+ trace, ctx := internal.StartRegion(ctx, "ApplicationServiceRoomAlias")
+ defer trace.EndRegion()
// Determine which application service should handle this request
for _, appservice := range a.Cfg.Derived.ApplicationServices {
@@ -117,8 +117,8 @@ func (a *AppServiceQueryAPI) UserIDExists(
request *api.UserIDExistsRequest,
response *api.UserIDExistsResponse,
) error {
- span, ctx := opentracing.StartSpanFromContext(ctx, "ApplicationServiceUserID")
- defer span.Finish()
+ trace, ctx := internal.StartRegion(ctx, "ApplicationServiceUserID")
+ defer trace.EndRegion()
// Determine which application service should handle this request
for _, appservice := range a.Cfg.Derived.ApplicationServices {