Added sentry

This commit is contained in:
Mitchell McCaffrey
2020-10-27 08:02:41 +11:00
parent b8ebcf5da7
commit 28958d0769
3 changed files with 97 additions and 1 deletions
+14
View File
@@ -1,5 +1,7 @@
import React from "react";
import ReactDOM from "react-dom";
import * as Sentry from "@sentry/react";
import { Integrations } from "@sentry/tracing";
import App from "./App";
import Modal from "react-modal";
@@ -10,6 +12,18 @@ import * as serviceWorker from "./serviceWorker";
import "./index.css";
if (process.env.NODE_ENV === "production") {
Sentry.init({
dsn:
"https://bc1e2edfe7ca453f8e7357a48693979e@o467475.ingest.sentry.io/5493956",
integrations: [new Integrations.BrowserTracing()],
// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,
});
}
Modal.setAppElement("#root");
ReactDOM.render(<App />, document.getElementById("root"));