about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/analytics/analytics.tsx8
-rw-r--r--src/lib/analytics/analytics.web.tsx8
-rw-r--r--src/lib/sentry.ts4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/analytics/analytics.tsx b/src/lib/analytics/analytics.tsx
index a0cc7cd6e..5f93d982f 100644
--- a/src/lib/analytics/analytics.tsx
+++ b/src/lib/analytics/analytics.tsx
@@ -2,12 +2,12 @@ import React from 'react'
 import {AppState, AppStateStatus} from 'react-native'
 import AsyncStorage from '@react-native-async-storage/async-storage'
 import {createClient, SegmentClient} from '@segment/analytics-react-native'
+import * as Sentry from '@sentry/react-native'
 import {sha256} from 'js-sha256'
-import {Native} from 'sentry-expo'
 
-import {useSession, SessionAccount} from '#/state/session'
-import {ScreenPropertiesMap, TrackPropertiesMap} from './types'
 import {logger} from '#/logger'
+import {SessionAccount, useSession} from '#/state/session'
+import {ScreenPropertiesMap, TrackPropertiesMap} from './types'
 
 type AppInfo = {
   build?: string | undefined
@@ -72,7 +72,7 @@ export function init(account: SessionAccount | undefined) {
     if (account.did) {
       const did_hashed = sha256(account.did)
       client.identify(did_hashed, {did_hashed})
-      Native.setUser({id: did_hashed})
+      Sentry.setUser({id: did_hashed})
       logger.debug('Ping w/hash')
     } else {
       logger.debug('Ping w/o hash')
diff --git a/src/lib/analytics/analytics.web.tsx b/src/lib/analytics/analytics.web.tsx
index 72b28f9c0..c7f0ed3b1 100644
--- a/src/lib/analytics/analytics.web.tsx
+++ b/src/lib/analytics/analytics.web.tsx
@@ -1,11 +1,11 @@
 import React from 'react'
 import {createClient} from '@segment/analytics-react'
+import * as Sentry from '@sentry/react-native'
 import {sha256} from 'js-sha256'
-import {Browser} from 'sentry-expo'
 
-import {ScreenPropertiesMap, TrackPropertiesMap} from './types'
-import {useSession, SessionAccount} from '#/state/session'
 import {logger} from '#/logger'
+import {SessionAccount, useSession} from '#/state/session'
+import {ScreenPropertiesMap, TrackPropertiesMap} from './types'
 
 type SegmentClient = ReturnType<typeof createClient>
 
@@ -70,7 +70,7 @@ export function init(account: SessionAccount | undefined) {
     if (account.did) {
       const did_hashed = sha256(account.did)
       client.identify(did_hashed, {did_hashed})
-      Browser.setUser({id: did_hashed})
+      Sentry.setUser({id: did_hashed})
       logger.debug('Ping w/hash')
     } else {
       logger.debug('Ping w/o hash')
diff --git a/src/lib/sentry.ts b/src/lib/sentry.ts
index 1180b0db6..37d41e3a2 100644
--- a/src/lib/sentry.ts
+++ b/src/lib/sentry.ts
@@ -5,7 +5,7 @@
 
 import {Platform} from 'react-native'
 import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application'
-import {init} from 'sentry-expo'
+import {init} from '@sentry/react-native'
 
 import {BUILD_ENV, IS_DEV, IS_TESTFLIGHT} from 'lib/app-info'
 
@@ -30,10 +30,10 @@ const dist = `${Platform.OS}.${nativeBuildVersion}.${
 }${IS_DEV ? 'dev' : ''}`
 
 init({
+  enabled: !__DEV__,
   autoSessionTracking: false,
   dsn: 'https://05bc3789bf994b81bd7ce20c86ccd3ae@o4505071687041024.ingest.sentry.io/4505071690514432',
   debug: false, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production
-  enableInExpoDevelopment: false, // enable this to test in dev
   environment: BUILD_ENV ?? 'development',
   dist,
   release,