Skip to content

Commit

Permalink
Add server name to errors reported to sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr committed Dec 5, 2017
1 parent 2c50585 commit 2950878
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ module.exports = {
filename: './build/server.manifest.json',
})
);
// Tell Sentry which server the errors are coming from
config.plugins.push(
new webpack.DefinePlugin({
'process.env.SENTRY_NAME': JSON.stringify(dir),
})
);
config.resolve.modules.push(nodePath);
return config;
},
Expand Down
2 changes: 2 additions & 0 deletions shared/raven/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
// $FlowFixMe
import Raven from 'raven';

console.log(process.env.SENTRY_NAME);
Raven.config(
'https://3bd8523edd5d43d7998f9b85562d6924:[email protected]/154812',
{
environment: process.env.NODE_ENV,
name: process.env.SENTRY_NAME,
}
).install();

Expand Down

0 comments on commit 2950878

Please sign in to comment.