Add capture console error in sentry

Update Sentry
pull/2070/head
Jérémy Rialland 2022-03-28 15:40:07 +02:00 committed by Jérémy Rialland
parent ee414a3d5f
commit 545c02a972
3 changed files with 104 additions and 63 deletions

View File

@ -70,8 +70,9 @@
"@react-stately/radio": "^3.3.2",
"@react-stately/searchfield": "^3.1.3",
"@react-stately/toggle": "^3.2.3",
"@sentry/react": "^6.18.1",
"@sentry/tracing": "^6.18.1",
"@sentry/integrations": "^6.19.2",
"@sentry/react": "^6.19.2",
"@sentry/tracing": "^6.19.2",
"algoliasearch": "^4.10.2",
"fuse.js": "^6.4.6",
"iframe-resizer": "^4.3.2",
@ -121,10 +122,9 @@
"@types/react-router-dom": "^5.3.3",
"@types/recharts": "^1.8.16",
"@types/serve-static": "^1.13.10",
"@types/styled-components": "^5.1.9",
"@types/styled-components": "^5.1.24",
"@vitejs/plugin-legacy": "^1.6.4",
"@vitejs/plugin-react": "=1.1.3",
"babel-plugin-styled-components": "^2.0.2",
"cypress": "^7.7.0",
"cypress-plugin-tab": "^1.0.5",
"cypress-wait-until": "^1.7.2",

View File

@ -1,6 +1,7 @@
import * as Sentry from '@sentry/react'
import { Integrations } from '@sentry/tracing'
import { getBranch, isProduction, isStaging } from './utils'
import { CaptureConsole } from '@sentry/integrations'
const branch = getBranch()
@ -18,7 +19,10 @@ const release =
if (isProduction()) {
Sentry.init({
dsn: 'https://92bbc21937b24136a2fe1b1d922b000f@o548798.ingest.sentry.io/5745615',
integrations: [new Integrations.BrowserTracing()],
integrations: [
new Integrations.BrowserTracing(),
new CaptureConsole({ levels: ['error'] }),
],
release,
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.

153
yarn.lock
View File

@ -3714,96 +3714,108 @@ __metadata:
languageName: node
linkType: hard
"@sentry/browser@npm:6.18.1":
version: 6.18.1
resolution: "@sentry/browser@npm:6.18.1"
"@sentry/browser@npm:6.19.2":
version: 6.19.2
resolution: "@sentry/browser@npm:6.19.2"
dependencies:
"@sentry/core": 6.18.1
"@sentry/types": 6.18.1
"@sentry/utils": 6.18.1
"@sentry/core": 6.19.2
"@sentry/types": 6.19.2
"@sentry/utils": 6.19.2
tslib: ^1.9.3
checksum: 29c4b852311512b96e938e73629007829933335b2cecb979f065f68af08db1adc6fa8f0763b6da3acafea0ce89d5c3719426b92449780512a58aac6a205c1a62
checksum: d84ed8bed929f8c5628d68f13e688b266b1dbabbc89e316ef13e5b595bf0707cade996911e1665b052245f2bc9b86145946f364edbe05fbb84c917333e8904c8
languageName: node
linkType: hard
"@sentry/core@npm:6.18.1":
version: 6.18.1
resolution: "@sentry/core@npm:6.18.1"
"@sentry/core@npm:6.19.2":
version: 6.19.2
resolution: "@sentry/core@npm:6.19.2"
dependencies:
"@sentry/hub": 6.18.1
"@sentry/minimal": 6.18.1
"@sentry/types": 6.18.1
"@sentry/utils": 6.18.1
"@sentry/hub": 6.19.2
"@sentry/minimal": 6.19.2
"@sentry/types": 6.19.2
"@sentry/utils": 6.19.2
tslib: ^1.9.3
checksum: 03b8b56c094938b177642c7d801fe6d5d7a2a8fffad6fab38e1080b46165b850fe1ef827e115880e484ad871b9660d34aa781cd58360afbd154acbabd82c8c5e
checksum: 0b683287973d14b98a6a7b09bb8a30e1fbad5cbd144b34bb999fe9b9ffb15bfbfe3fc7eccdb8b308ab707c9a243b561feb3ccea196b10e01e27bc85385b87b13
languageName: node
linkType: hard
"@sentry/hub@npm:6.18.1":
version: 6.18.1
resolution: "@sentry/hub@npm:6.18.1"
"@sentry/hub@npm:6.19.2":
version: 6.19.2
resolution: "@sentry/hub@npm:6.19.2"
dependencies:
"@sentry/types": 6.18.1
"@sentry/utils": 6.18.1
"@sentry/types": 6.19.2
"@sentry/utils": 6.19.2
tslib: ^1.9.3
checksum: 814a33e7a77e7c327c1bef29ea4ce0dea31502b174f3490b158a53af805ca070e1ccd3a62a54b979cbc478e261913a03f9628fbe3174e358dbe06c8b1cd95e9e
checksum: 22ff7103d0313395e47cb667ee7dc0efec239329c4bd513c6cc1dce2a03ccbd6f821d40b2dd3b944300aa857bf8c4e4e6591d40f0f5ddee983d717e28ea1419f
languageName: node
linkType: hard
"@sentry/minimal@npm:6.18.1":
version: 6.18.1
resolution: "@sentry/minimal@npm:6.18.1"
"@sentry/integrations@npm:^6.19.2":
version: 6.19.2
resolution: "@sentry/integrations@npm:6.19.2"
dependencies:
"@sentry/hub": 6.18.1
"@sentry/types": 6.18.1
"@sentry/types": 6.19.2
"@sentry/utils": 6.19.2
localforage: ^1.8.1
tslib: ^1.9.3
checksum: ce4db8bae8e0fa46d1650e791499a0c0463d765868460484b09237fc542556e2b331280d2f291d60e0c2ba3dd90793a9be54cd2730a2e037300ff3d0d2ea2f9d
checksum: 298cff982882a619d6c9c7d43431dff4898323eaa79095c6028acea4c98b90f15ffcd03583bc2e5a7ddab1c567fe8ecc438f73c7910fc60f6f1fc95a48806197
languageName: node
linkType: hard
"@sentry/react@npm:^6.18.1":
version: 6.18.1
resolution: "@sentry/react@npm:6.18.1"
"@sentry/minimal@npm:6.19.2":
version: 6.19.2
resolution: "@sentry/minimal@npm:6.19.2"
dependencies:
"@sentry/browser": 6.18.1
"@sentry/minimal": 6.18.1
"@sentry/types": 6.18.1
"@sentry/utils": 6.18.1
"@sentry/hub": 6.19.2
"@sentry/types": 6.19.2
tslib: ^1.9.3
checksum: a81344497cf86a7f94a79571a05da3915d9c2a05e15c7ea5fc3dddfec19390b49b18fcfcf71530cec0b18ce5b76bf2c1600346ec5545244d8b2a2c56a7d15c86
languageName: node
linkType: hard
"@sentry/react@npm:^6.19.2":
version: 6.19.2
resolution: "@sentry/react@npm:6.19.2"
dependencies:
"@sentry/browser": 6.19.2
"@sentry/minimal": 6.19.2
"@sentry/types": 6.19.2
"@sentry/utils": 6.19.2
hoist-non-react-statics: ^3.3.2
tslib: ^1.9.3
peerDependencies:
react: 15.x || 16.x || 17.x
checksum: 0f76d7dedf49d06d22914789db48e160a70e0208581a83e7e40d5c038b46d88fff94864905b1ae6938999a1ae1247302447f2819e30b6489b109fd401c4c30d8
checksum: 6acf67623908084409011e0297d9738ab45f97b34e32097ec9f831cc98768a579f9c951b0a4625316d9eabd678f9fb093b6dcb9ec1c388dd009438465cfe604c
languageName: node
linkType: hard
"@sentry/tracing@npm:^6.18.1":
version: 6.18.1
resolution: "@sentry/tracing@npm:6.18.1"
"@sentry/tracing@npm:^6.19.2":
version: 6.19.2
resolution: "@sentry/tracing@npm:6.19.2"
dependencies:
"@sentry/hub": 6.18.1
"@sentry/minimal": 6.18.1
"@sentry/types": 6.18.1
"@sentry/utils": 6.18.1
"@sentry/hub": 6.19.2
"@sentry/minimal": 6.19.2
"@sentry/types": 6.19.2
"@sentry/utils": 6.19.2
tslib: ^1.9.3
checksum: 215414e9a36e99a8b1db6fb91205362f57eafd534a060d52366d1bb77b04d06d5b3e15ccf9ad70687d89a12e4f0a69e31b543d576b0370dd58f04a38c138a007
checksum: 07bdc2658118d5ad8b0c921d6b15362731cac6383f82396784ba8fdecfabc9a9712456d5c5c90a24dc57fa6ecb8cb366cc5dc426482f2a2a243ee04c1c61c2ba
languageName: node
linkType: hard
"@sentry/types@npm:6.18.1":
version: 6.18.1
resolution: "@sentry/types@npm:6.18.1"
checksum: dbf4abc28adbd734cd7fb353b547e9686293e734a8fbe4f88fd711c65fcf9905e2affdd35f1e422038168153b7b0b02a972e76dd5fb2edc74a62b1733820a1d0
"@sentry/types@npm:6.19.2":
version: 6.19.2
resolution: "@sentry/types@npm:6.19.2"
checksum: 4a22891c1549ad345abbe873b093898e4b9310ec0a53a0aa68055dc21e52bd2d4014e7b5c9da4106bccded29ae1a3f0ac04ba119eaf3371fe469de4f87e56e39
languageName: node
linkType: hard
"@sentry/utils@npm:6.18.1":
version: 6.18.1
resolution: "@sentry/utils@npm:6.18.1"
"@sentry/utils@npm:6.19.2":
version: 6.19.2
resolution: "@sentry/utils@npm:6.19.2"
dependencies:
"@sentry/types": 6.18.1
"@sentry/types": 6.19.2
tslib: ^1.9.3
checksum: 998e2e565e693e86c2e2bae830fe7df04e9cf588eb13cc98f03df35e2b5de78fff669b1a9dffc893a0d2c81e2c61e1107ad5f876e1203415325514849fb25336
checksum: 9e1c95bb50e874f4d2e1b650dd1d8e3a19ba25789158756e7d296da41ddf44619adcfe027b7af0e7354bdf60953bffa157a69765c15c63345f0a2841646b5205
languageName: node
linkType: hard
@ -5722,7 +5734,7 @@ __metadata:
languageName: node
linkType: hard
"@types/styled-components@npm:^5.1.9":
"@types/styled-components@npm:^5.1.24":
version: 5.1.24
resolution: "@types/styled-components@npm:5.1.24"
dependencies:
@ -7235,7 +7247,7 @@ __metadata:
languageName: node
linkType: hard
"babel-plugin-styled-components@npm:>= 1.12.0, babel-plugin-styled-components@npm:^2.0.2":
"babel-plugin-styled-components@npm:>= 1.12.0":
version: 2.0.6
resolution: "babel-plugin-styled-components@npm:2.0.6"
dependencies:
@ -12249,6 +12261,13 @@ __metadata:
languageName: node
linkType: hard
"immediate@npm:~3.0.5":
version: 3.0.6
resolution: "immediate@npm:3.0.6"
checksum: f9b3486477555997657f70318cc8d3416159f208bec4cca3ff3442fd266bc23f50f0c9bd8547e1371a6b5e82b821ec9a7044a4f7b944798b25aa3cc6d5e63e62
languageName: node
linkType: hard
"import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1":
version: 3.3.0
resolution: "import-fresh@npm:3.3.0"
@ -13526,6 +13545,15 @@ __metadata:
languageName: node
linkType: hard
"lie@npm:3.1.1":
version: 3.1.1
resolution: "lie@npm:3.1.1"
dependencies:
immediate: ~3.0.5
checksum: 6da9f2121d2dbd15f1eca44c0c7e211e66a99c7b326ec8312645f3648935bc3a658cf0e9fa7b5f10144d9e2641500b4f55bd32754607c3de945b5f443e50ddd1
languageName: node
linkType: hard
"lines-and-columns@npm:^1.1.6":
version: 1.2.4
resolution: "lines-and-columns@npm:1.2.4"
@ -13610,6 +13638,15 @@ __metadata:
languageName: node
linkType: hard
"localforage@npm:^1.8.1":
version: 1.10.0
resolution: "localforage@npm:1.10.0"
dependencies:
lie: 3.1.1
checksum: f2978b434dafff9bcb0d9498de57d97eba165402419939c944412e179cab1854782830b5ec196212560b22712d1dd03918939f59cf1d4fc1d756fca7950086cf
languageName: node
linkType: hard
"locate-path@npm:^3.0.0":
version: 3.0.0
resolution: "locate-path@npm:3.0.0"
@ -17626,8 +17663,9 @@ __metadata:
"@react-types/searchfield": ^3.1.2
"@redux-devtools/extension": ^3.2.2
"@rollup/plugin-yaml": ^3.1.0
"@sentry/react": ^6.18.1
"@sentry/tracing": ^6.18.1
"@sentry/integrations": ^6.19.2
"@sentry/react": ^6.19.2
"@sentry/tracing": ^6.19.2
"@storybook/addon-actions": ^6.5.0-alpha.40
"@storybook/addon-essentials": ^6.5.0-alpha.40
"@storybook/addon-interactions": ^6.5.0-alpha.40
@ -17644,11 +17682,10 @@ __metadata:
"@types/react-router-dom": ^5.3.3
"@types/recharts": ^1.8.16
"@types/serve-static": ^1.13.10
"@types/styled-components": ^5.1.9
"@types/styled-components": ^5.1.24
"@vitejs/plugin-legacy": ^1.6.4
"@vitejs/plugin-react": =1.1.3
algoliasearch: ^4.10.2
babel-plugin-styled-components: ^2.0.2
cypress: ^7.7.0
cypress-plugin-tab: ^1.0.5
cypress-wait-until: ^1.7.2