aboutsummaryrefslogtreecommitdiff
path: root/federationapi/queue
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-10-10 17:36:26 +0200
committerGitHub <noreply@github.com>2022-10-10 17:36:26 +0200
commitb000db81ca889b350663493c27eb58654c75e295 (patch)
tree435897680228e7b5eba3185ac39a392a4ab442b7 /federationapi/queue
parent39581af3ba657032fbf66ba3719a1cb334c0519b (diff)
Send E2EE related errors to sentry (#2784)
Only sends errors if we're not retrying them in NATS. Not sure if those should be scoped/tagged with something like "E2EE".
Diffstat (limited to 'federationapi/queue')
-rw-r--r--federationapi/queue/queue.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/federationapi/queue/queue.go b/federationapi/queue/queue.go
index 88664fcf..8245aa5b 100644
--- a/federationapi/queue/queue.go
+++ b/federationapi/queue/queue.go
@@ -21,6 +21,7 @@ import (
"sync"
"time"
+ "github.com/getsentry/sentry-go"
"github.com/matrix-org/gomatrixserverlib"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
@@ -307,11 +308,13 @@ func (oqs *OutgoingQueues) SendEDU(
ephemeralJSON, err := json.Marshal(e)
if err != nil {
+ sentry.CaptureException(err)
return fmt.Errorf("json.Marshal: %w", err)
}
nid, err := oqs.db.StoreJSON(oqs.process.Context(), string(ephemeralJSON))
if err != nil {
+ sentry.CaptureException(err)
return fmt.Errorf("sendevent: oqs.db.StoreJSON: %w", err)
}