aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.tsx
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-10-06 19:38:07 +0100
committerGravatar Joe Banks <[email protected]>2020-10-06 19:38:07 +0100
commit2ce9d97be3e92fd85f628d3eba3a399bf1470a78 (patch)
tree2e47fbf13d707cfd5a8c827b782b16692aec0599 /src/index.tsx
parentAdd Sentry packages (diff)
Enable Sentry in production
Diffstat (limited to 'src/index.tsx')
-rw-r--r--src/index.tsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/index.tsx b/src/index.tsx
index 634fd81..0198756 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -3,8 +3,21 @@ import ReactDOM from 'react-dom';
import App from './App';
import * as serviceWorker from './serviceWorker';
+import * as Sentry from "@sentry/react";
+import { Integrations } from "@sentry/tracing";
+
import colors from "./colors";
+if (process.env.NODE_ENV === "production") {
+ Sentry.init({
+ dsn: process.env.REACT_APP_SENTRY_DSN,
+ integrations: [
+ new Integrations.BrowserTracing(),
+ ],
+ tracesSampleRate: 0.25,
+ });
+}
+
console.log("%c Python Discord Forms ", `font-size: 6em; font-family: "Hind", "Arial"; font-weight: 900; background-color: ${colors.blurple}; border-radius: 10px;`)
console.log("%cWelcome to Python Discord Forms", `font-size: 3em; font-family: "Hind", "Arial";`)