Commit 49fd5990 authored by Lucien PESLIER's avatar Lucien PESLIER Committed by Tim Neutkens

Update Sentry to v5 and add @sentry/integrations (#6873)

Hi everyone :)
I just updated Sentry to v5 and added @sentry/integrations due to breaking changes :)
I also fix the documentation. npm commands were in yarn section.
parent c120d6b9
...@@ -24,15 +24,12 @@ Install it and run: ...@@ -24,15 +24,12 @@ Install it and run:
```bash ```bash
npm install npm install
npm run dev npm run dev
# or
yarn
yarn dev
``` ```
**yarn** **yarn**
```bash ```bash
npm install yarn
npm run dev yarn dev
``` ```
Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download)) Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download))
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
"start": "SENTRY_DSN=abc123 NODE_ENV=production node server.js" "start": "SENTRY_DSN=abc123 NODE_ENV=production node server.js"
}, },
"dependencies": { "dependencies": {
"@sentry/browser": "^4.6.1", "@sentry/browser": "^5.0.3",
"@sentry/node": "^4.6.1", "@sentry/node": "^5.0.3",
"@sentry/integrations": "^5.0.3",
"@zeit/next-source-maps": "0.0.4-canary.1", "@zeit/next-source-maps": "0.0.4-canary.1",
"cookie-parser": "1.4.4", "cookie-parser": "1.4.4",
"express": "^4.16.4", "express": "^4.16.4",
......
// NOTE: This require will be replaced with `@sentry/browser` when // NOTE: This require will be replaced with `@sentry/browser` when
// process.browser === true thanks to the webpack config in next.config.js // process.browser === true thanks to the webpack config in next.config.js
const Sentry = require('@sentry/node') const Sentry = require('@sentry/node')
const SentryIntegrations = require('@sentry/integrations')
const Cookie = require('js-cookie') const Cookie = require('js-cookie')
module.exports = (release = process.env.SENTRY_RELEASE) => { module.exports = (release = process.env.SENTRY_RELEASE) => {
...@@ -22,7 +23,7 @@ module.exports = (release = process.env.SENTRY_RELEASE) => { ...@@ -22,7 +23,7 @@ module.exports = (release = process.env.SENTRY_RELEASE) => {
// Instead, dump the errors to the console // Instead, dump the errors to the console
sentryOptions.integrations = [ sentryOptions.integrations = [
new Sentry.Integrations.Debug({ new SentryIntegrations.Debug({
// Trigger DevTools debugger instead of using console.log // Trigger DevTools debugger instead of using console.log
debugger: false debugger: false
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment