1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/**
* Importing these separately from `platform/detection` and `lib/app-info` to
* avoid future conflicts and/or circular deps
*/
import {init} from '@sentry/react-native'
import pkgJson from '#/../package.json'
/**
* Examples:
* - `dev`
* - `1.99.0`
*/
const release = process.env.SENTRY_RELEASE || pkgJson.version
/**
* The latest deployed commit hash
*/
const dist = process.env.SENTRY_DIST || 'dev'
init({
enabled: !__DEV__ && !!process.env.SENTRY_DSN,
autoSessionTracking: false,
dsn: process.env.SENTRY_DSN,
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
environment: process.env.NODE_ENV,
dist,
release,
ignoreErrors: [
/*
* Unknown internals errors
*/
`t is not defined`,
`Can't find variable: t`,
/*
* Un-useful errors
*/
`Network request failed`,
],
/**
* Does not affect traces of error events or other logs, just disables
* automatically attaching stack traces to events. This helps us group events
* and prevents explosions of separate issues.
*
* @see https://docs.sentry.io/platforms/react-native/configuration/options/#attach-stacktrace
*/
attachStacktrace: false,
})
|