2021-10-24 00:43:00 +02:00
|
|
|
import Constants from 'expo-constants'
|
2021-02-02 22:50:38 +01:00
|
|
|
import * as Updates from 'expo-updates'
|
2021-01-07 19:13:09 +01:00
|
|
|
import * as Sentry from 'sentry-expo'
|
2021-01-20 00:39:39 +01:00
|
|
|
import log from './log'
|
2021-01-07 19:13:09 +01:00
|
|
|
|
|
|
|
const sentry = () => {
|
|
|
|
log('log', 'Sentry', 'initializing')
|
2021-01-23 02:41:50 +01:00
|
|
|
Sentry.init({
|
2021-05-15 23:08:13 +02:00
|
|
|
dsn: Constants.manifest?.extra?.sentryDSN,
|
2021-01-22 02:21:13 +01:00
|
|
|
enableInExpoDevelopment: false,
|
2021-01-31 03:09:35 +01:00
|
|
|
debug:
|
|
|
|
__DEV__ ||
|
2021-02-02 22:50:38 +01:00
|
|
|
['development'].some(channel => Updates.releaseChannel.includes(channel))
|
2021-01-22 02:21:13 +01:00
|
|
|
})
|
2021-01-07 19:13:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export default sentry
|