tooot/src/startup/sentry.ts

16 lines
374 B
TypeScript
Raw Normal View History

2022-01-02 22:28:33 +01:00
import { isDevelopment } from '@utils/checkEnvironment'
2021-10-24 00:43:00 +02:00
import Constants from 'expo-constants'
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,
2022-01-02 22:28:33 +01:00
debug: isDevelopment
2021-01-22 02:21:13 +01:00
})
2021-01-07 19:13:09 +01:00
}
export default sentry