diff options
author | Kegsay <kegan@matrix.org> | 2021-03-24 10:25:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 10:25:24 +0000 |
commit | af41f6d4549759afd7f52f780b40abe2834ab4c0 (patch) | |
tree | c13e5d27221981ac438e5880f5c93ae8999f596b /roomserver/internal/api.go | |
parent | 802f1c96f804f7a146e4e12e25b20c980a6af870 (diff) |
Add Sentry support (#1803)
* Add Sentry support
* Use HTTP Sentry properly maybe
* Capture panics
* Log fed Sentry stuff correctly
* British english linter
Diffstat (limited to 'roomserver/internal/api.go')
-rw-r--r-- | roomserver/internal/api.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/roomserver/internal/api.go b/roomserver/internal/api.go index 5b8959b0..c9f92f9f 100644 --- a/roomserver/internal/api.go +++ b/roomserver/internal/api.go @@ -4,6 +4,7 @@ import ( "context" "github.com/Shopify/sarama" + "github.com/getsentry/sentry-go" asAPI "github.com/matrix-org/dendrite/appservice/api" fsAPI "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/internal/caching" @@ -145,6 +146,7 @@ func (r *RoomserverInternalAPI) PerformInvite( ) error { outputEvents, err := r.Inviter.PerformInvite(ctx, req, res) if err != nil { + sentry.CaptureException(err) return err } if len(outputEvents) == 0 { @@ -160,6 +162,7 @@ func (r *RoomserverInternalAPI) PerformLeave( ) error { outputEvents, err := r.Leaver.PerformLeave(ctx, req, res) if err != nil { + sentry.CaptureException(err) return err } if len(outputEvents) == 0 { |