Use new env in Sentry setup file
This commit is contained in:
@@ -6,25 +6,26 @@
|
|||||||
import {init} from '@sentry/react-native'
|
import {init} from '@sentry/react-native'
|
||||||
|
|
||||||
import pkgJson from '#/../package.json'
|
import pkgJson from '#/../package.json'
|
||||||
|
import * as env from '#/env'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Examples:
|
* Examples:
|
||||||
* - `dev`
|
* - `dev`
|
||||||
* - `1.99.0`
|
* - `1.99.0`
|
||||||
*/
|
*/
|
||||||
const release = process.env.SENTRY_RELEASE || pkgJson.version
|
const release = env.SENTRY_RELEASE || pkgJson.version
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The latest deployed commit hash
|
* The latest deployed commit hash
|
||||||
*/
|
*/
|
||||||
const dist = process.env.SENTRY_DIST || 'dev'
|
const dist = env.SENTRY_DIST || 'dev'
|
||||||
|
|
||||||
init({
|
init({
|
||||||
enabled: !__DEV__ && !!process.env.SENTRY_DSN,
|
enabled: !env.IS_DEV && !!env.SENTRY_DSN,
|
||||||
autoSessionTracking: false,
|
autoSessionTracking: false,
|
||||||
dsn: process.env.SENTRY_DSN,
|
dsn: 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
|
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,
|
environment: env.ENV,
|
||||||
dist,
|
dist,
|
||||||
release,
|
release,
|
||||||
ignoreErrors: [
|
ignoreErrors: [
|
||||||
|
|||||||
Reference in New Issue
Block a user