From 7dc22019a533a668e4ee98f29a299d3ceb9f839c Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Tue, 14 Jan 2020 15:21:38 +0300 Subject: [PATCH] Fix typo in sentry dsn naming --- .env.tpl | 4 ++-- config.js | 2 +- packages/app/index.tsx | 2 +- packages/app/services/logger/logger.ts | 6 +++--- webpack.config.js | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.env.tpl b/.env.tpl index 23ddee3..b2b1b94 100644 --- a/.env.tpl +++ b/.env.tpl @@ -1,4 +1,4 @@ -SENTRY_CDN=https://@sentry.io/ +SENTRY_DSN=https://@sentry.io/ CROWDIN_API_KEY=abc @@ -7,4 +7,4 @@ GA_ID=UA-XXXXX-Y API_HOST=https://dev.account.ely.by VERSION=dev -ENVIRONMENT=dev \ No newline at end of file +ENVIRONMENT=dev diff --git a/config.js b/config.js index db1f41f..27f73da 100644 --- a/config.js +++ b/config.js @@ -9,6 +9,6 @@ module.exports = { environment: env.ENVIRONMENT || env.NODE_ENV, apiHost: env.API_HOST || 'https://dev.account.ely.by', ga: env.GA_ID && { id: env.GA_ID }, - sentryCdn: env.SENTRY_CDN, + sentryDSN: env.SENTRY_DSN, crowdinApiKey: env.CROWDIN_API_KEY, }; diff --git a/packages/app/index.tsx b/packages/app/index.tsx index 6203b34..9e71dad 100644 --- a/packages/app/index.tsx +++ b/packages/app/index.tsx @@ -21,7 +21,7 @@ const win: { [key: string]: any } = window as any; history.init(); logger.init({ - sentryCdn: (window as any).SENTRY_CDN as string, + sentryDSN: (window as any).SENTRY_DSN as string, }); const store = storeFactory(); diff --git a/packages/app/services/logger/logger.ts b/packages/app/services/logger/logger.ts index d57f6ad..b30207e 100644 --- a/packages/app/services/logger/logger.ts +++ b/packages/app/services/logger/logger.ts @@ -6,9 +6,9 @@ const isTest = process.env.NODE_ENV === 'test'; const isProduction = process.env.NODE_ENV === 'production'; class Logger { - init({ sentryCdn }: { sentryCdn: string }) { - if (sentryCdn) { - Raven.config(sentryCdn, { + init({ sentryDSN }: { sentryDSN: string }) { + if (sentryDSN) { + Raven.config(sentryDSN, { logger: 'accounts-js-app', level: 'info', environment: process.env.APP_ENV, diff --git a/webpack.config.js b/webpack.config.js index e0265ff..bcfc73e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -79,8 +79,8 @@ const webpackConfig = { plugins: [ new WebpackBar(), new webpack.DefinePlugin({ - 'window.SENTRY_CDN': config.sentryCdn - ? JSON.stringify(config.sentryCdn) + 'window.SENTRY_DSN': config.sentryDSN + ? JSON.stringify(config.sentryDSN) : undefined, 'window.GA_ID': config.ga && config.ga.id ? JSON.stringify(config.ga.id) : undefined,