Adding Sentry.io
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import '../../style.css';
|
||||
import { setupGA } from '../../analytics';
|
||||
import { setupRaven } from '../../sentry';
|
||||
|
||||
setupRaven();
|
||||
setupGA();
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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 };
|
||||
Reference in New Issue
Block a user