diff --git a/configUtil.js b/configUtil.js index e0941ea61..438114a99 100644 --- a/configUtil.js +++ b/configUtil.js @@ -1,5 +1,5 @@ const cp = require('child_process'); -const { isSentryEnabled } = require('./sentryConfigUtil'); +const { getIsSentryEnabled } = require('./sentryConfigUtil'); module.exports = { COOP_COEP_HEADERS: { @@ -51,5 +51,5 @@ module.exports = { cwd: __dirname, encoding: 'utf8', }), - isSentryEnabled: isSentryEnabled, + getIsSentryEnabled: getIsSentryEnabled, }; diff --git a/next.config.js b/next.config.js index ee9744388..1413dd1a9 100644 --- a/next.config.js +++ b/next.config.js @@ -14,12 +14,12 @@ const { CSP_DIRECTIVES, WORKBOX_CONFIG, ALL_ROUTES, - isSentryEnabled, + getIsSentryEnabled, } = require('./configUtil'); const GIT_SHA = getGitSha(); -const SENTRY_ENABLED = isSentryEnabled(); +const IS_SENTRY_ENABLED = getIsSentryEnabled(); module.exports = withSentryConfig( withWorkbox( @@ -51,5 +51,8 @@ module.exports = withSentryConfig( }, }) ), - { release: GIT_SHA, dryRun: !SENTRY_ENABLED } + { + release: GIT_SHA, + dryRun: !IS_SENTRY_ENABLED, + } ); diff --git a/sentry.client.config.js b/sentry.client.config.js index 4b39522c0..09e2fe20d 100644 --- a/sentry.client.config.js +++ b/sentry.client.config.js @@ -5,18 +5,18 @@ import { getSentryDSN, getSentryENV, getSentryRelease, - isSentryEnabled, + getIsSentryEnabled, } from 'constants/sentry'; const SENTRY_DSN = getSentryDSN(); const SENTRY_ENV = getSentryENV(); const SENTRY_RELEASE = getSentryRelease(); -const ENABLED = isSentryEnabled(); +const IS_ENABLED = getIsSentryEnabled(); Sentry.setUser({ id: getUserAnonymizedID() }); Sentry.init({ dsn: SENTRY_DSN, - enabled: ENABLED, + enabled: IS_ENABLED, environment: SENTRY_ENV, release: SENTRY_RELEASE, attachStacktrace: true, diff --git a/sentry.server.config.js b/sentry.server.config.js index 62b0029c0..5d8714c99 100644 --- a/sentry.server.config.js +++ b/sentry.server.config.js @@ -3,17 +3,17 @@ import { getSentryDSN, getSentryENV, getSentryRelease, - isSentryEnabled, + getIsSentryEnabled, } from 'constants/sentry'; const SENTRY_DSN = getSentryDSN(); const SENTRY_ENV = getSentryENV(); const SENTRY_RELEASE = getSentryRelease(); -const ENABLED = isSentryEnabled(); +const IS_ENABLED = getIsSentryEnabled(); Sentry.init({ dsn: SENTRY_DSN, - enabled: ENABLED, + enabled: IS_ENABLED, environment: SENTRY_ENV, release: SENTRY_RELEASE, autoSessionTracking: false, diff --git a/src/constants/sentry/index.ts b/src/constants/sentry/index.ts index 79aec9795..5ccfcebe1 100644 --- a/src/constants/sentry/index.ts +++ b/src/constants/sentry/index.ts @@ -7,4 +7,4 @@ export const getSentryENV = () => export const getSentryRelease = () => process.env.SENTRY_RELEASE; -export { isSentryEnabled } from '../../../sentryConfigUtil'; +export { getIsSentryEnabled } from '../../../sentryConfigUtil';