mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Feat: Sentry for issue tracking/exception handling
This commit is contained in:
1 parent
35c5a3098b
commit
dce7528c7a
5 files changed
+105
-3
No files matched your search
@@ -44,5 +44,6 @@
|
||||
},
|
||||
"divider": "rgba(255, 255, 255, 0.12)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SentryErrorMetrics": true
|
||||
}
|
||||
+17
-1
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user