mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-11 09:09:34 +00:00
refactor: add extra data to sentry logs
This commit is contained in:
committed by
Carlos Valente
parent
3877e207d0
commit
81f0e61953
@@ -28,9 +28,11 @@ class ErrorBoundary extends React.Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Sentry.withScope((scope) => {
|
Sentry.withScope((scope) => {
|
||||||
scope.setExtras('error', error);
|
scope.setExtras({
|
||||||
scope.setExtras('store', runtimeStore.getState());
|
error,
|
||||||
scope.setExtras('hasSocket', { hasConnected, shouldReconnect, reconnectAttempts });
|
store: runtimeStore.getState(),
|
||||||
|
hasSocket: { hasConnected, shouldReconnect, reconnectAttempts },
|
||||||
|
});
|
||||||
const eventId = Sentry.captureException(error);
|
const eventId = Sentry.captureException(error);
|
||||||
this.setState({ eventId, info });
|
this.setState({ eventId, info });
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user