From 8065e1827c49bfc2a0cc51680578aefdf4f74b1d Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 22 Jul 2025 19:27:18 -0500 Subject: [PATCH] Self review --- src/env.ts | 4 ++-- src/logger/sentry/setup/index.ts | 21 ++------------------- webpack.config.js | 3 +-- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/env.ts b/src/env.ts index 728858eeb7..1ed4bb8423 100644 --- a/src/env.ts +++ b/src/env.ts @@ -26,7 +26,7 @@ export const IS_INTERNAL = IS_DEV || IS_TESTFLIGHT * for debugging/reporting. */ export const BUNDLE_IDENTIFIER: string = - process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER ?? '' + process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER || 'dev' /** * This will always be in the format of YYMMDD, so that it always increases for @@ -48,7 +48,7 @@ export const LOG_LEVEL = (process.env.EXPO_PUBLIC_LOG_LEVEL || 'info') as | 'error' /** - * Currently unused. Enable debug for a subset of the debug logs. + * Enable debug logs for specific logger instances */ export const LOG_DEBUG: string = process.env.EXPO_PUBLIC_LOG_DEBUG || '' diff --git a/src/logger/sentry/setup/index.ts b/src/logger/sentry/setup/index.ts index f2fb152d36..ae51c14825 100644 --- a/src/logger/sentry/setup/index.ts +++ b/src/logger/sentry/setup/index.ts @@ -1,33 +1,16 @@ -/** - * 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' import * as env from '#/env' -/** - * Examples: - * - `dev` - * - `1.99.0` - */ -const release = pkgJson.version - -/** - * The latest deployed short commit hash - */ -const dist = env.BUNDLE_IDENTIFIER || 'dev' - init({ enabled: !env.IS_DEV && !!env.SENTRY_DSN, autoSessionTracking: false, 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: env.ENV, - dist, - release, + dist: env.BUNDLE_IDENTIFIER, + release: pkgJson.version, ignoreErrors: [ /* * Unknown internals errors diff --git a/webpack.config.js b/webpack.config.js index 419149d443..f198cbdef8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -53,9 +53,8 @@ module.exports = async function (env, argv) { project: 'app', authToken: process.env.SENTRY_AUTH_TOKEN, release: { - // env is undefined for Render.com builds, fall back name: version, - dist: process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER || 'dev', + dist: process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER, }, }), )