Be more verbose when logging state resets
This commit is contained in:
parent
143285708b
commit
4ae7335b01
|
@ -285,6 +285,8 @@ func (u *latestEventsUpdater) latestState(ctx context.Context, roomInfo *types.R
|
|||
"new_state_nid": u.newStateNID,
|
||||
"old_latest": u.oldLatest.EventIDs(),
|
||||
"new_latest": u.latest.EventIDs(),
|
||||
"rewrites_state": u.rewritesState,
|
||||
"state_at_event": fmt.Sprintf("%#v", u.stateAtEvent),
|
||||
}).Warnf("State reset detected (removing %d events)", removed)
|
||||
sentry.WithScope(func(scope *sentry.Scope) {
|
||||
scope.SetLevel("warning")
|
||||
|
@ -295,6 +297,8 @@ func (u *latestEventsUpdater) latestState(ctx context.Context, roomInfo *types.R
|
|||
"Old latest": u.oldLatest.EventIDs(),
|
||||
"New latest": u.latest.EventIDs(),
|
||||
"State removed": removed,
|
||||
"State rewritten": fmt.Sprintf("%v", u.rewritesState),
|
||||
"State at event": fmt.Sprintf("%#v", u.stateAtEvent),
|
||||
})
|
||||
sentry.CaptureMessage("State reset detected")
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue