build: remove sentry

This commit is contained in:
kangfenmao
2024-08-26 18:03:59 +08:00
parent ee398489de
commit 0cbfd26883
4 changed files with 4 additions and 1018 deletions
+1 -22
View File
@@ -1,27 +1,8 @@
import KeyvStorage from '@kangfenmao/keyv-storage'
import * as Sentry from '@sentry/electron/renderer'
import localforage from 'localforage'
import { ThemeMode } from './store/settings'
import { isProduction, loadScript } from './utils'
async function initSentry() {
if (await isProduction()) {
Sentry.init({
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0
})
}
}
import { loadScript } from './utils'
export async function initMermaid(theme: ThemeMode) {
if (!window.mermaid) {
@@ -46,8 +27,6 @@ function init() {
window.keyv = new KeyvStorage()
window.keyv.init()
initSentry()
}
init()