Use new env in Sentry setup file

This commit is contained in:
Eric Bailey
2025-07-22 17:29:52 -05:00
parent acbbbcf725
commit da3da43acc
+6 -5
View File
@@ -6,25 +6,26 @@
import {init} from '@sentry/react-native'
import pkgJson from '#/../package.json'
import * as env from '#/env'
/**
* Examples:
* - `dev`
* - `1.99.0`
*/
const release = process.env.SENTRY_RELEASE || pkgJson.version
const release = env.SENTRY_RELEASE || pkgJson.version
/**
* The latest deployed commit hash
*/
const dist = process.env.SENTRY_DIST || 'dev'
const dist = env.SENTRY_DIST || 'dev'
init({
enabled: !__DEV__ && !!process.env.SENTRY_DSN,
enabled: !env.IS_DEV && !!env.SENTRY_DSN,
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
environment: process.env.NODE_ENV,
environment: env.ENV,
dist,
release,
ignoreErrors: [