Add Sentry support (#1803)

* Add Sentry support

* Use HTTP Sentry properly maybe

* Capture panics

* Log fed Sentry stuff correctly

* British english linter
This commit is contained in:
Kegsay 2021-03-24 10:25:24 +00:00 committed by GitHub
parent 802f1c96f8
commit af41f6d454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 223 additions and 5 deletions

View file

@ -21,6 +21,7 @@ import (
"strings"
"time"
"github.com/getsentry/sentry-go"
fsAPI "github.com/matrix-org/dendrite/federationsender/api"
"github.com/matrix-org/dendrite/internal/eventutil"
"github.com/matrix-org/dendrite/roomserver/api"
@ -51,6 +52,7 @@ func (r *Joiner) PerformJoin(
) {
roomID, joinedVia, err := r.performJoin(ctx, req)
if err != nil {
sentry.CaptureException(err)
perr, ok := err.(*api.PerformError)
if ok {
res.Error = perr