Bläddra i källkod

renamed sentry constants to follow the global convention

Abhinav 3 år sedan
förälder
incheckning
4cdc93e345
5 ändrade filer med 15 tillägg och 12 borttagningar
  1. 2 2
      configUtil.js
  2. 6 3
      next.config.js
  3. 3 3
      sentry.client.config.js
  4. 3 3
      sentry.server.config.js
  5. 1 1
      src/constants/sentry/index.ts

+ 2 - 2
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,
 };

+ 6 - 3
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,
+    }
 );

+ 3 - 3
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,

+ 3 - 3
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,

+ 1 - 1
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';