···22import {AppState, AppStateStatus} from 'react-native'
33import AsyncStorage from '@react-native-async-storage/async-storage'
44import {createClient, SegmentClient} from '@segment/analytics-react-native'
55+import * as Sentry from '@sentry/react-native'
56import {sha256} from 'js-sha256'
66-import {Native} from 'sentry-expo'
7788-import {useSession, SessionAccount} from '#/state/session'
88+import {logger} from '#/logger'
99+import {SessionAccount, useSession} from '#/state/session'
910import {ScreenPropertiesMap, TrackPropertiesMap} from './types'
1010-import {logger} from '#/logger'
11111212type AppInfo = {
1313 build?: string | undefined
···7272 if (account.did) {
7373 const did_hashed = sha256(account.did)
7474 client.identify(did_hashed, {did_hashed})
7575- Native.setUser({id: did_hashed})
7575+ Sentry.setUser({id: did_hashed})
7676 logger.debug('Ping w/hash')
7777 } else {
7878 logger.debug('Ping w/o hash')
+4-4
src/lib/analytics/analytics.web.tsx
···11import React from 'react'
22import {createClient} from '@segment/analytics-react'
33+import * as Sentry from '@sentry/react-native'
34import {sha256} from 'js-sha256'
44-import {Browser} from 'sentry-expo'
5566-import {ScreenPropertiesMap, TrackPropertiesMap} from './types'
77-import {useSession, SessionAccount} from '#/state/session'
86import {logger} from '#/logger'
77+import {SessionAccount, useSession} from '#/state/session'
88+import {ScreenPropertiesMap, TrackPropertiesMap} from './types'
991010type SegmentClient = ReturnType<typeof createClient>
1111···7070 if (account.did) {
7171 const did_hashed = sha256(account.did)
7272 client.identify(did_hashed, {did_hashed})
7373- Browser.setUser({id: did_hashed})
7373+ Sentry.setUser({id: did_hashed})
7474 logger.debug('Ping w/hash')
7575 } else {
7676 logger.debug('Ping w/o hash')
+2-2
src/lib/sentry.ts
···5566import {Platform} from 'react-native'
77import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application'
88-import {init} from 'sentry-expo'
88+import {init} from '@sentry/react-native'
991010import {BUILD_ENV, IS_DEV, IS_TESTFLIGHT} from 'lib/app-info'
1111···3030}${IS_DEV ? 'dev' : ''}`
31313232init({
3333+ enabled: !__DEV__,
3334 autoSessionTracking: false,
3435 dsn: 'https://05bc3789bf994b81bd7ce20c86ccd3ae@o4505071687041024.ingest.sentry.io/4505071690514432',
3536 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
3636- enableInExpoDevelopment: false, // enable this to test in dev
3737 environment: BUILD_ENV ?? 'development',
3838 dist,
3939 release,
+6-8
src/logger/__tests__/logger.test.ts
···11+import {beforeAll, describe, expect, jest, test} from '@jest/globals'
22+import * as Sentry from '@sentry/react-native'
13import {nanoid} from 'nanoid/non-secure'
22-import {jest, describe, expect, test, beforeAll} from '@jest/globals'
33-import {Native as Sentry} from 'sentry-expo'
4455import {Logger, LogLevel, sentryTransport} from '#/logger'
66···1616 LOG_DEBUG: '',
1717}))
18181919-jest.mock('sentry-expo', () => ({
2020- Native: {
2121- addBreadcrumb: jest.fn(),
2222- captureException: jest.fn(),
2323- captureMessage: jest.fn(),
2424- },
1919+jest.mock('@sentry/react-native', () => ({
2020+ addBreadcrumb: jest.fn(),
2121+ captureException: jest.fn(),
2222+ captureMessage: jest.fn(),
2523}))
26242725beforeAll(() => {
+1-1
src/logger/sentry/index.ts
···11-export {Native as Sentry} from 'sentry-expo'
11+export * as Sentry from '@sentry/react-native'
+1-1
src/logger/sentry/index.web.ts
···11-export {Browser as Sentry} from 'sentry-expo'
11+export * as Sentry from '@sentry/react-native'