mirror of
https://github.com/Lissy93/web-check.git
synced 2025-01-24 23:28:36 +01:00
Integrates error logging
This commit is contained in:
parent
ab2ec0e823
commit
3f1b4bea3a
@ -24,6 +24,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@netlify/functions": "^1.6.0",
|
||||
"@sentry/react": "^7.60.0",
|
||||
"@testing-library/jest-dom": "^5.17.0",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
|
14
src/App.tsx
14
src/App.tsx
@ -1,5 +1,7 @@
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import Styled from 'styled-components';
|
||||
import * as Sentry from '@sentry/react';
|
||||
|
||||
import Home from 'pages/Home';
|
||||
import Results from 'pages/Results';
|
||||
import About from 'pages/About';
|
||||
@ -14,6 +16,18 @@ const Container = Styled.main`
|
||||
margin: 0;
|
||||
`;
|
||||
|
||||
Sentry.init({
|
||||
dsn: 'https://30eb6135d37643fb95c7da4e77a46142@glitch.as93.net/1',
|
||||
beforeSend(event) { // Check if error logging is disabled
|
||||
const ignoredHosts = ['localhost', '127.0.0.1'];
|
||||
const disableErrors = process.env.REACT_APP_DISABLE_ERROR_LOGGING;
|
||||
if (disableErrors || ignoredHosts.includes(window.location.hostname)) {
|
||||
return null;
|
||||
}
|
||||
return event;
|
||||
}
|
||||
});
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<Container>
|
||||
|
68
yarn.lock
68
yarn.lock
@ -2961,6 +2961,70 @@
|
||||
dependencies:
|
||||
any-observable "^0.3.0"
|
||||
|
||||
"@sentry-internal/tracing@7.60.0":
|
||||
version "7.60.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.60.0.tgz#4f101d936a45965b086e042a3fba7ec7683cc034"
|
||||
integrity sha512-2qvxmR954H+K7u4o92sS2u+hntzshem9XwfHAqDvBe51arNbFVy8LfJTJ5fffgZq/6jXlozCO0/6aR5yLR5mBg==
|
||||
dependencies:
|
||||
"@sentry/core" "7.60.0"
|
||||
"@sentry/types" "7.60.0"
|
||||
"@sentry/utils" "7.60.0"
|
||||
tslib "^2.4.1 || ^1.9.3"
|
||||
|
||||
"@sentry/browser@7.60.0":
|
||||
version "7.60.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.60.0.tgz#feb49746c9b650a968cfa58fa8e6ae43448d7821"
|
||||
integrity sha512-WznY6zrJxCUHZns8jTvDsZw3aaHriSP+jqD+wkXZG3ceooQwFn0RkAstUuoG7YyP4Foinznn3+caeQD4ZjWaXQ==
|
||||
dependencies:
|
||||
"@sentry-internal/tracing" "7.60.0"
|
||||
"@sentry/core" "7.60.0"
|
||||
"@sentry/replay" "7.60.0"
|
||||
"@sentry/types" "7.60.0"
|
||||
"@sentry/utils" "7.60.0"
|
||||
tslib "^2.4.1 || ^1.9.3"
|
||||
|
||||
"@sentry/core@7.60.0":
|
||||
version "7.60.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.60.0.tgz#c256d1305b52210d608e71de8d8f365ca9377f15"
|
||||
integrity sha512-B02OlFMoqdkfDZlbQfmk7tL2vObShofk7ySd/7mp+oRdUuCvX0tyrGlwI87YJvd8YWSZOCKINs3aVYivw/b6gg==
|
||||
dependencies:
|
||||
"@sentry/types" "7.60.0"
|
||||
"@sentry/utils" "7.60.0"
|
||||
tslib "^2.4.1 || ^1.9.3"
|
||||
|
||||
"@sentry/react@^7.60.0":
|
||||
version "7.60.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.60.0.tgz#5678211efdb4848eac6e1b9006d9c959ea365c8e"
|
||||
integrity sha512-wmtRc0jwcqY+AM9dbOBLUCOy2rwh7MvDIXHq49Sg6r/ywOKBV0C55RnU3w7MAcmYe6aylNHC8DChHoj+phIvZw==
|
||||
dependencies:
|
||||
"@sentry/browser" "7.60.0"
|
||||
"@sentry/types" "7.60.0"
|
||||
"@sentry/utils" "7.60.0"
|
||||
hoist-non-react-statics "^3.3.2"
|
||||
tslib "^2.4.1 || ^1.9.3"
|
||||
|
||||
"@sentry/replay@7.60.0":
|
||||
version "7.60.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.60.0.tgz#9f59dfb8e7acff5b269ed8752a13c7b1d0f2bb75"
|
||||
integrity sha512-iVSs+mhgjeK0qqLdCqbCa1P4I6hETHCUq14pTYp0bwGrI1D/a1Ho/6wLkwXv47Gnrwaba/7JFM+IxZcN4FzfmQ==
|
||||
dependencies:
|
||||
"@sentry/core" "7.60.0"
|
||||
"@sentry/types" "7.60.0"
|
||||
"@sentry/utils" "7.60.0"
|
||||
|
||||
"@sentry/types@7.60.0":
|
||||
version "7.60.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.60.0.tgz#e3e5f16436feff802b1b126a16dba537000cef55"
|
||||
integrity sha512-MSEuF9YjE0j+UKdqee2AzcNlMnShVNTkCB2Wnng6Bc5hHhn4fyYeTLbuFpNxL0ffN65lxblaWx6doDsMcvRxcA==
|
||||
|
||||
"@sentry/utils@7.60.0":
|
||||
version "7.60.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.60.0.tgz#a96d772dcc2d007f73a5bcf67dcc66f6a7085736"
|
||||
integrity sha512-Oc/PQqzeNDOSy4ZzVj6h9U+GEGRkg2PEVn9PC2V9/v3HDD20mndFqR/S2B5OOgDb/6pNGyz8XiZYI5rb29WFHA==
|
||||
dependencies:
|
||||
"@sentry/types" "7.60.0"
|
||||
tslib "^2.4.1 || ^1.9.3"
|
||||
|
||||
"@sinclair/typebox@^0.24.1":
|
||||
version "0.24.51"
|
||||
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f"
|
||||
@ -8391,7 +8455,7 @@ hexer@^1.5.0:
|
||||
process "^0.10.0"
|
||||
xtend "^4.0.0"
|
||||
|
||||
hoist-non-react-statics@^3.3.0:
|
||||
hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
|
||||
version "3.3.2"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
|
||||
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
|
||||
@ -14908,7 +14972,7 @@ tslib@^1.8.1, tslib@^1.9.0:
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||
|
||||
tslib@^2.0.1, tslib@^2.0.3, tslib@^2.3.1, tslib@^2.5.0:
|
||||
tslib@^2.0.1, tslib@^2.0.3, tslib@^2.3.1, "tslib@^2.4.1 || ^1.9.3", tslib@^2.5.0:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3"
|
||||
integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==
|
||||
|
Loading…
Reference in New Issue
Block a user