Setting environment reported to Sentry separate from NODE_ENV

For preview and prod, NODE_ENV is "production"
This commit is contained in:
Jeff Avallone
2018-02-15 17:55:37 -05:00
parent f3e3e7922c
commit d634985698
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import Raven from 'raven-js';
const setupRaven = () => {
Raven.config(process.env.SENTRY_KEY, {
whitelistUrls: [/https:\/\/(.*\.)?regexper\.com/],
environment: process.env.NODE_ENV,
environment: process.env.DEPLOY_ENV,
debug: (process.env.NODE_ENV !== 'production'),
release: process.env.BUILD_ID
});
+1 -1
View File
@@ -15,7 +15,7 @@ describe('setupRaven', () => {
});
it('sets the environment', () => {
process.env.NODE_ENV='test environment';
process.env.DEPLOY_ENV='test environment';
setupRaven();
expect(Raven.config).toHaveBeenCalledWith(expect.anything(), expect.objectContaining({
environment: 'test environment'