Feat: Sentry for issue tracking/exception handling

This commit is contained in:
Taso committed 2021-01-06 11:16:05 -05:00
1 parent 35c5a3098b
commit dce7528c7a
5 files changed
+105 -3

No files matched your search

+2 -1
View File
@@ -44,5 +44,6 @@
},
"divider": "rgba(255, 255, 255, 0.12)"
}
}
},
"SentryErrorMetrics": true
}
+17 -1
View File
@@ -3,11 +3,27 @@ import React from "react";
import ReactDOM from "react-dom";
import { HashRouter } from "react-router-dom";
import { RecoilRoot } from "recoil";
import * as Sentry from "@sentry/react";
import { Integrations } from "@sentry/tracing";
import "./main.css";
import Phone from "./Phone";
import TwitterNotification from "./apps/twitter/components/notification/TwitterNotification";
import { BankNotification } from "./apps/bank/components/notification/BankNotification";
import PhoneConfig from './config/default.json'
// Enable Sentry when config setting is true
if (PhoneConfig.SentryErrorMetrics) {
Sentry.init({
dsn: "https://[email protected]/5581619",
autoSessionTracking: true,
integrations: [
new Integrations.BrowserTracing(),
],
// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,
})
}
ReactDOM.render(
<HashRouter>