ci(sentry): update sentry to use new hosted instance

this might not work but hey it kinda does
This commit is contained in:
Taso committed 2021-07-27 17:06:49 -04:00
1 parent eaae3c7211
commit 44599c882d
8 files changed
+319 -6

No files matched your search

+2 -1
View File
@@ -18,8 +18,9 @@ dayjs.extend(updateLocale);
// Enable Sentry when config setting is true and when in prod
if (PhoneConfig.SentryErrorMetrics && process.env.NODE_ENV !== 'development') {
Sentry.init({
dsn: 'https://[email protected]/5581619',
dsn: 'https://[email protected]/2',
autoSessionTracking: true,
release: process.env.REACT_APP_SENTRY_RELEASE || '0.0.0',
integrations: [new Integrations.BrowserTracing()],
// We recommend adjusting this value in production, or using tracesSampler
// for finer control
@@ -8,6 +8,7 @@ import {
DialogTitle,
} from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { captureException } from '@sentry/react';
interface TopLevelErrorCompProps {
hasError: boolean;
@@ -54,6 +55,10 @@ export class TopLevelErrorComponent extends React.Component<any, TopLevelErrorCo
return { hasError: true, errorMsg: error.message };
}
componentDidCatch(error: Error, { componentStack }: React.ErrorInfo) {
captureException(error, { contexts: { react: { componentStack } } });
}
render() {
if (this.state.hasError) {
return <ErrorDialogComp isOpen={this.state.hasError} errorMsg={this.state.errorMsg} />;