diff --git a/index.js b/index.js index c4e30f4de..bd0938e1b 100644 --- a/index.js +++ b/index.js @@ -6,24 +6,26 @@ import App from './src'; import { LOCATION_TASK_NAME, MAX_PERMIT_ACCURACY } from './src/constants'; import { setLocation } from './src/store/atoms/location'; -Sentry.init({ - dsn: SENTRY_DSN, - enableAutoSessionTracking: true, - tracesSampleRate: 1.0, - profilesSampleRate: 1.0, - replaysSessionSampleRate: 0.1, - replaysOnErrorSampleRate: 1.0, - integrations: [ - Sentry.mobileReplayIntegration({ - maskAllText: true, - blockAllMedia: true, - privacyOptions: { - maskAllInputs: true, - blockClass: ['sensitive-screen', 'payment-view'], - }, - }), - ], -}); +if (process.env.NODE_ENV === 'production') { + Sentry.init({ + dsn: SENTRY_DSN, + enableAutoSessionTracking: true, + tracesSampleRate: 1.0, + profilesSampleRate: 1.0, + replaysSessionSampleRate: 0.1, + replaysOnErrorSampleRate: 1.0, + integrations: [ + Sentry.mobileReplayIntegration({ + maskAllText: true, + blockAllMedia: true, + privacyOptions: { + maskAllInputs: true, + blockClass: ['sensitive-screen', 'payment-view'], + }, + }), + ], + }); +} if (!TaskManager.isTaskDefined(LOCATION_TASK_NAME)) { TaskManager.defineTask(LOCATION_TASK_NAME, ({ data, error }) => {