Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #71 from magopian/10-add-sentry
Browse files Browse the repository at this point in the history
Add raven-js to collect javascript errors on sentry
  • Loading branch information
rehandalal committed Apr 4, 2018
2 parents 4fa721e + b8f2575 commit 6d61374
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"js-cookie": "^2.2.0",
"lodash.get": "^4.4.2",
"photon-ant": "^0.1.4",
"raven-js": "^3.24.0",
"react": "^16.2.0",
"react-copy-to-clipboard": "^5.0.1",
"react-dom": "^16.2.0",
Expand All @@ -28,6 +29,8 @@
"start": "react-app-rewired start",
"start:normandy": "react-app-rewired start --app=normandy",
"build": "react-app-rewired build",
"build-stage": "REACT_APP_SENTRY_PUBLIC_DSN='https://7f037ccfad184848848bd5077d9ecf07@sentry.prod.mozaws.net/362' build",
"build-prod": "REACT_APP_SENTRY_PUBLIC_DSN='https://4dac38d672e842a88233e9293caf2d09@sentry.prod.mozaws.net/363' build",
"test": "react-app-rewired test --env=jsdom",
"eject": "react-scripts eject",
"lint:flow": "flow",
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ import React from 'react';
import ReactDOM from 'react-dom';
import DevConsoleApp from './console/App';

import Raven from 'raven-js';

if (process.env.REACT_APP_SENTRY_PUBLIC_DSN) {
Raven.config(process.env.REACT_APP_SENTRY_PUBLIC_DSN).install();
}

ReactDOM.render(<DevConsoleApp />, document.getElementById('root'));
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6682,6 +6682,10 @@ range-parser@^1.0.3, range-parser@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"

raven-js@^3.24.0:
version "3.24.0"
resolved "https://registry.yarnpkg.com/raven-js/-/raven-js-3.24.0.tgz#59464d8bc4b3812ae87a282e9bb98ecad5b4b047"

raw-body@2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89"
Expand Down

0 comments on commit 6d61374

Please sign in to comment.