sentry for frontend

This commit is contained in:
Kalle (Sendou) 2020-09-03 21:34:47 +03:00
parent e681df463f
commit dc85b271b5
3 changed files with 105 additions and 0 deletions

View File

@ -2306,6 +2306,98 @@
"react-dom": "^16.6.1"
}
},
"@sentry/browser": {
"version": "5.22.3",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.22.3.tgz",
"integrity": "sha512-2TzE/CoBa5ZkvxJizDdi1Iz1ldmXSJpFQ1mL07PIXBjCt0Wxf+WOuFSj5IP4L40XHfJE5gU8wEvSH0VDR8nXtA==",
"requires": {
"@sentry/core": "5.22.3",
"@sentry/types": "5.22.3",
"@sentry/utils": "5.22.3",
"tslib": "^1.9.3"
}
},
"@sentry/core": {
"version": "5.22.3",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.22.3.tgz",
"integrity": "sha512-eGL5uUarw3o4i9QUb9JoFHnhriPpWCaqeaIBB06HUpdcvhrjoowcKZj1+WPec5lFg5XusE35vez7z/FPzmJUDw==",
"requires": {
"@sentry/hub": "5.22.3",
"@sentry/minimal": "5.22.3",
"@sentry/types": "5.22.3",
"@sentry/utils": "5.22.3",
"tslib": "^1.9.3"
}
},
"@sentry/hub": {
"version": "5.22.3",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.22.3.tgz",
"integrity": "sha512-INo47m6N5HFEs/7GMP9cqxOIt7rmRxdERunA3H2L37owjcr77MwHVeeJ9yawRS6FMtbWXplgWTyTIWIYOuqVbw==",
"requires": {
"@sentry/types": "5.22.3",
"@sentry/utils": "5.22.3",
"tslib": "^1.9.3"
}
},
"@sentry/minimal": {
"version": "5.22.3",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.22.3.tgz",
"integrity": "sha512-HoINpYnVYCpNjn2XIPIlqH5o4BAITpTljXjtAftOx6Hzj+Opjg8tR8PWliyKDvkXPpc4kXK9D6TpEDw8MO0wZA==",
"requires": {
"@sentry/hub": "5.22.3",
"@sentry/types": "5.22.3",
"tslib": "^1.9.3"
}
},
"@sentry/react": {
"version": "5.22.3",
"resolved": "https://registry.npmjs.org/@sentry/react/-/react-5.22.3.tgz",
"integrity": "sha512-Or/tLayuxpOJhIWOXiDKdaJQZ981uRS9NT0QcPvU+Si1qTElSqtH1zB94GlwhgpglkbmLPiYq6VPrG2HOiZ79Q==",
"requires": {
"@sentry/browser": "5.22.3",
"@sentry/minimal": "5.22.3",
"@sentry/types": "5.22.3",
"@sentry/utils": "5.22.3",
"hoist-non-react-statics": "^3.3.2",
"tslib": "^1.9.3"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
"requires": {
"react-is": "^16.7.0"
}
}
}
},
"@sentry/tracing": {
"version": "5.22.3",
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.22.3.tgz",
"integrity": "sha512-Zp59kMCk5v56ZAyErqjv/QvGOWOQ5fRltzeVQVp8unIDTk6gEFXfhwPsYHOokJe1mfkmrgPDV6xAkYgtL3KCDQ==",
"requires": {
"@sentry/hub": "5.22.3",
"@sentry/minimal": "5.22.3",
"@sentry/types": "5.22.3",
"@sentry/utils": "5.22.3",
"tslib": "^1.9.3"
}
},
"@sentry/types": {
"version": "5.22.3",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.22.3.tgz",
"integrity": "sha512-cv+VWK0YFgCVDvD1/HrrBWOWYG3MLuCUJRBTkV/Opdy7nkdNjhCAJQrEyMM9zX0sac8FKWKOHT0sykNh8KgmYw=="
},
"@sentry/utils": {
"version": "5.22.3",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.22.3.tgz",
"integrity": "sha512-AHNryXMBvIkIE+GQxTlmhBXD0Ksh+5w1SwM5qi6AttH+1qjWLvV6WB4+4pvVvEoS8t5F+WaVUZPQLmCCWp6zKw==",
"requires": {
"@sentry/types": "5.22.3",
"tslib": "^1.9.3"
}
},
"@styled-system/background": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz",

View File

@ -10,6 +10,8 @@
"@reach/router": "^1.3.4",
"@rehooks/local-storage": "^2.4.0",
"@sendou/react-sketch": "^0.5.2",
"@sentry/react": "^5.22.3",
"@sentry/tracing": "^5.22.3",
"@types/jest": "^26.0.13",
"@types/reach__router": "^1.3.5",
"@types/react": "^16.9.49",

View File

@ -11,11 +11,22 @@ import { ApolloProvider } from "@apollo/react-hooks"
import { QueryParamProvider } from "use-query-params"
import { HelmetProvider } from "react-helmet-async"
import { LocationProvider, createHistory } from "@reach/router"
import * as Sentry from "@sentry/react"
import { Integrations } from "@sentry/tracing"
import ApolloClient from "apollo-boost"
import * as serviceWorker from "./serviceWorker"
import customIcons from "./assets/icons"
import "./i18n"
if (process.env.NODE_ENV === "production") {
Sentry.init({
dsn:
"https://fbdedefb54744b33aa0450f1f9f52ee9@o443322.ingest.sentry.io/5416867",
integrations: [new Integrations.BrowserTracing()],
tracesSampleRate: 0.5,
})
}
const client = new ApolloClient({
uri:
process.env.NODE_ENV === "production"