fix(sentry): update Sentry configuration and initialization logic
- Changed the organization in the Sentry Vite plugin configuration. - Modified Sentry initialization in the main process to always check data collection settings. - Simplified Sentry initialization in the renderer process by removing the packaged check.
This commit is contained in:
parent
314be9b198
commit
6c6b2f0b9e
@ -69,7 +69,7 @@ export default defineConfig({
|
|||||||
}),
|
}),
|
||||||
sentryVitePlugin({
|
sentryVitePlugin({
|
||||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||||
org: 'cherry-ai-d6',
|
org: 'cherry-ai',
|
||||||
project: 'cherry-studio'
|
project: 'cherry-studio'
|
||||||
}),
|
}),
|
||||||
...visualizerPlugin('renderer')
|
...visualizerPlugin('renderer')
|
||||||
|
|||||||
@ -3,9 +3,10 @@ import * as Sentry from '@sentry/electron/main'
|
|||||||
import { app } from 'electron'
|
import { app } from 'electron'
|
||||||
|
|
||||||
export function initSentry() {
|
export function initSentry() {
|
||||||
if (app.isPackaged && configManager.getEnableDataCollection()) {
|
if (configManager.getEnableDataCollection()) {
|
||||||
Sentry.init({
|
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'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,9 +31,7 @@ function initAutoSync() {
|
|||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function initSentry() {
|
export function initSentry() {
|
||||||
const appInfo = await window.api.getAppInfo()
|
|
||||||
if (appInfo.isPackaged) {
|
|
||||||
Sentry.init(
|
Sentry.init(
|
||||||
{
|
{
|
||||||
sendDefaultPii: true,
|
sendDefaultPii: true,
|
||||||
@ -42,7 +40,6 @@ export async function initSentry() {
|
|||||||
},
|
},
|
||||||
reactInit as any
|
reactInit as any
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initSpinner()
|
initSpinner()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user