diff --git a/packages/app/package.json b/packages/app/package.json index 8ba1610f..ada0b987 100755 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -45,6 +45,7 @@ "@mui/material": "^5.11.9", "@ragestudio/cordova-nfc": "^1.2.0", "@react-spring/web": "^9.7.2", + "@sentry/browser": "^7.64.0", "@tanstack/react-virtual": "^3.0.0-beta.54", "@tsmx/human-readable": "^1.0.7", "antd": "^5.6.4", @@ -174,4 +175,4 @@ ] } } -} \ No newline at end of file +} diff --git a/packages/app/src/App.jsx b/packages/app/src/App.jsx index 48cb7e70..e794e594 100755 --- a/packages/app/src/App.jsx +++ b/packages/app/src/App.jsx @@ -91,6 +91,8 @@ import { ThemeProvider } from "cores/style/style.core.jsx" import Layout from "./layout" import * as Router from "./router" +import * as Sentry from "@sentry/browser" + import "theme/index.less" CapacitorUpdater.notifyAppReady() @@ -140,6 +142,16 @@ class ComtyApp extends React.Component { // append var to #root document.getElementById("root").classList.add("electron") } + + console.log(import.meta.env) + + if (import.meta.env.VITE_SENTRY_DSN) { + console.log(`Initializing Sentry...`) + + Sentry.init({ + dsn: import.meta.env.VITE_SENTRY_DSN + }) + } } static publicEvents = {