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 /federationapi | |
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 'federationapi')
-rw-r--r-- | federationapi/routing/send.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 1dd874d4..231a1686 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -23,6 +23,7 @@ import ( "sync" "time" + "github.com/getsentry/sentry-go" "github.com/matrix-org/dendrite/clientapi/jsonerror" eduserverAPI "github.com/matrix-org/dendrite/eduserver/api" keyapi "github.com/matrix-org/dendrite/keyserver/api" @@ -259,6 +260,7 @@ func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.Res // If we bail and stop processing then we risk wedging incoming // transactions from that server forever. if isProcessingErrorFatal(err) { + sentry.CaptureException(err) // Any other error should be the result of a temporary error in // our server so we should bail processing the transaction entirely. util.GetLogger(ctx).Warnf("Processing %s failed fatally: %s", e.EventID(), err) |