diff --git a/configUtil.js b/configUtil.js index e0941ea61160e6a2bb913713f5da14cc01375563..438114a99a97661bf1546ac5ab1261f558ac3eb9 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 ee9744388f295d42d51112c22a16e143ddf39f53..1413dd1a9509a8a7b22f84ceeb714db3c2c37b35 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 4b39522c0c6c909cc476e18263619234b19625c7..09e2fe20d708a49c5d5934573c49b87afb9d3866 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 62b0029c074d9751257c212ba682221a328b78f9..5d8714c99df9d850dc0ff4f8ec728caf3244d15f 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 79aec9795a32be52dfc14b98c814e78b2c011504..5ccfcebe11bcf57e8f05138b8f4aa41a4c3f63b9 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';