From 81f0e619537b0b224d6aa165b7c14a5965a87383 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Wed, 28 Aug 2024 18:29:14 +0200 Subject: [PATCH] refactor: add extra data to sentry logs --- .../common/components/error-boundary/ErrorBoundary.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/client/src/common/components/error-boundary/ErrorBoundary.jsx b/apps/client/src/common/components/error-boundary/ErrorBoundary.jsx index 317c03d19..6eefd207c 100644 --- a/apps/client/src/common/components/error-boundary/ErrorBoundary.jsx +++ b/apps/client/src/common/components/error-boundary/ErrorBoundary.jsx @@ -28,9 +28,11 @@ class ErrorBoundary extends React.Component { }); Sentry.withScope((scope) => { - scope.setExtras('error', error); - scope.setExtras('store', runtimeStore.getState()); - scope.setExtras('hasSocket', { hasConnected, shouldReconnect, reconnectAttempts }); + scope.setExtras({ + error, + store: runtimeStore.getState(), + hasSocket: { hasConnected, shouldReconnect, reconnectAttempts }, + }); const eventId = Sentry.captureException(error); this.setState({ eventId, info }); });