Replace raven-js with Sentry's new JavaScript SDK
Replace the legacy raven-js package with Sentry's new JS SDK [1], with a minimal wrapper in `util/sentry.js` that exports the same interface as the previous `raven.js` module. To enable Sentry, h or the browser extension must set a `sentry` key in the sidebar app's configuration. As part of switching SDKs, the following changes were made: - The AngularJS integration was removed, as we are in the process of migrating away from Angular - The custom code for unhandled promise rejections was removed, as the new SDK handles this already - The URL rewriting logic was removed. This was done to make the setup as minimal as possible. This may need to be re-added later. - The `report` function was removed, as it was not used anywhere - The `session` module now imports `util/sentry` directly rather than using Angular dependency injection. Now that we have a convenient way to mock all CJS/ES imports, there isn't a need to use DI for utilities [1] https://docs.sentry.io/platforms/javascript/
Showing
... | @@ -11,6 +11,7 @@ | ... | @@ -11,6 +11,7 @@ |
"@babel/preset-env": "^7.1.6", | "@babel/preset-env": "^7.1.6", | ||
"@babel/preset-react": "^7.0.0", | "@babel/preset-react": "^7.0.0", | ||
"@octokit/rest": "^16.9.0", | "@octokit/rest": "^16.9.0", | ||
"@sentry/browser": "^5.6.2", | |||
"angular": "^1.7.5", | "angular": "^1.7.5", | ||
"angular-mocks": "^1.7.5", | "angular-mocks": "^1.7.5", | ||
"angular-route": "^1.7.5", | "angular-route": "^1.7.5", | ||
... | @@ -93,7 +94,6 @@ | ... | @@ -93,7 +94,6 @@ |
"puppeteer": "^1.2.0", | "puppeteer": "^1.2.0", | ||
"query-string": "^3.0.1", | "query-string": "^3.0.1", | ||
"raf": "^3.1.0", | "raf": "^3.1.0", | ||
"raven-js": "^3.7.0", | |||
"redux": "^4.0.1", | "redux": "^4.0.1", | ||
"redux-thunk": "^2.1.0", | "redux-thunk": "^2.1.0", | ||
"request": "^2.76.0", | "request": "^2.76.0", | ||
... | ... |
src/sidebar/raven.js
deleted
100644 → 0
src/sidebar/util/sentry.js
0 → 100644
Please register or sign in to comment