mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Merge pull request #48 from project-error/feat/sentry
Feat: Added Sentry integration for exception metrics
This commit is contained in:
5 files changed
+112
-12
No files matched your search
@@ -44,5 +44,6 @@
|
||||
},
|
||||
"divider": "rgba(255, 255, 255, 0.12)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SentryErrorMetrics": true
|
||||
}
|
||||
+25
-10
@@ -1,13 +1,28 @@
|
||||
import "@babel/polyfill";
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import { HashRouter } from "react-router-dom";
|
||||
import { RecoilRoot } from "recoil";
|
||||
import '@babel/polyfill';
|
||||
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';
|
||||
|
||||
import "./main.css";
|
||||
import Phone from "./Phone";
|
||||
import TwitterNotification from "./apps/twitter/components/notification/TwitterNotification";
|
||||
import { BankNotification } from "./apps/bank/components/notification/BankNotification";
|
||||
// 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>
|
||||
@@ -17,5 +32,5 @@ ReactDOM.render(
|
||||
<Phone />
|
||||
</RecoilRoot>
|
||||
</HashRouter>,
|
||||
document.getElementById("root")
|
||||
document.getElementById('root')
|
||||
);
|
||||
Reference in new issue
Block a user