diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 4b7c6166..8a21f81e 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -69,7 +69,7 @@ export default defineConfig({ }), sentryVitePlugin({ authToken: process.env.SENTRY_AUTH_TOKEN, - org: 'cherry-ai-d6', + org: 'cherry-ai', project: 'cherry-studio' }), ...visualizerPlugin('renderer') diff --git a/src/main/integration/sentry/index.ts b/src/main/integration/sentry/index.ts index 0690ecfa..dd950d03 100644 --- a/src/main/integration/sentry/index.ts +++ b/src/main/integration/sentry/index.ts @@ -3,9 +3,10 @@ import * as Sentry from '@sentry/electron/main' import { app } from 'electron' export function initSentry() { - if (app.isPackaged && configManager.getEnableDataCollection()) { + if (configManager.getEnableDataCollection()) { Sentry.init({ - dsn: 'https://194ceab3bd44e686bd3ebda9de3c20fd@o4509184559218688.ingest.us.sentry.io/4509184569442304' + dsn: 'https://194ceab3bd44e686bd3ebda9de3c20fd@o4509184559218688.ingest.us.sentry.io/4509184569442304', + environment: app.isPackaged ? 'production' : 'development' }) } } diff --git a/src/renderer/src/init.ts b/src/renderer/src/init.ts index 83f3f7e3..69317241 100644 --- a/src/renderer/src/init.ts +++ b/src/renderer/src/init.ts @@ -31,18 +31,15 @@ function initAutoSync() { }, 2000) } -export async function initSentry() { - const appInfo = await window.api.getAppInfo() - if (appInfo.isPackaged) { - Sentry.init( - { - sendDefaultPii: true, - tracesSampleRate: 1.0, - integrations: [Sentry.browserTracingIntegration()] - }, - reactInit as any - ) - } +export function initSentry() { + Sentry.init( + { + sendDefaultPii: true, + tracesSampleRate: 1.0, + integrations: [Sentry.browserTracingIntegration()] + }, + reactInit as any + ) } initSpinner()