Adding Sentry.io

This commit is contained in:
Jeff Avallone
2018-02-11 10:41:03 -05:00
parent 6bf094a4c1
commit b009d078b6
7 changed files with 29 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ const PageTemplate = ({ title, children }) => (
<title>Regexper{ title && (' - ' + title) }</title>
</head>
<body>
<body data-build-id={ process.env.BUILD_ID }>
<header id="main" data-banner={ process.env.BANNER }>
<h1>
<a href="/">Regexper</a>
+2
View File
@@ -1,4 +1,6 @@
import '../../style.css';
import { setupGA } from '../../analytics';
import { setupRaven } from '../../sentry';
setupRaven();
setupGA();
+3 -1
View File
@@ -6,10 +6,12 @@ import App from '../../components/App';
import '../../style.css';
import { setupServiceWorker } from '../../service-worker';
import { setupGA } from '../../analytics';
import { setupRaven } from '../../sentry';
setupRaven();
setupGA();
if (process.env.NODE_ENV === 'production') {
setupServiceWorker();
}
setupGA();
ReactDOM.render(<App/>, document.getElementById('root'));
+12
View File
@@ -0,0 +1,12 @@
import Raven from 'raven-js';
const setupRaven = () => {
Raven.config(process.env.SENTRY_KEY, {
whitelistUrls: [/https:\/\/(.*\.)?regexper\.com/],
environment: process.env.NODE_ENV,
debug: (process.env.NODE_ENV !== 'production'),
release: process.env.BUILD_ID
});
};
export { setupRaven };