Update sentry reporting (#3305)

This hopefully reduces the garbage we currently produce.
(Using [GlitchTip](https://glitchtip.com/) on my personal instance, this
seems to look better)
This commit is contained in:
Till 2024-01-24 19:24:04 +01:00 committed by GitHub
parent 8e4dc6b4ae
commit d58daf9665
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 7 deletions

View file

@ -298,6 +298,7 @@ func (u *latestEventsUpdater) latestState() error {
}).Warnf("State reset detected (removing %d events)", removed)
sentry.WithScope(func(scope *sentry.Scope) {
scope.SetLevel("warning")
scope.SetTag("room_id", u.event.RoomID().String())
scope.SetContext("State reset", map[string]interface{}{
"Event ID": u.event.EventID(),
"Old state NID": fmt.Sprintf("%d", u.oldStateNID),