Setting environment reported to Sentry separate from NODE_ENV
For preview and prod, NODE_ENV is "production"
This commit is contained in:
parent
f3e3e7922c
commit
d634985698
@ -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
|
||||
});
|
||||
|
@ -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'
|
||||
|
@ -50,6 +50,7 @@ module.exports = {
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development',
|
||||
DEPLOY_ENV: 'development',
|
||||
GA_PROPERTY: null,
|
||||
SENTRY_KEY: null,
|
||||
BANNER: process.env.NODE_ENV === 'production' ? null : (process.env.NODE_ENV || 'development'),
|
||||
|
Loading…
Reference in New Issue
Block a user