mirror of https://github.com/langgenius/dify.git
order
This commit is contained in:
parent
0bf95fda09
commit
d9fcfc955b
|
|
@ -2,22 +2,6 @@ import { IS_DEV } from '@/config'
|
|||
import { env } from '@/env'
|
||||
|
||||
async function main() {
|
||||
const SENTRY_DSN = env.NEXT_PUBLIC_SENTRY_DSN
|
||||
|
||||
if (!IS_DEV && SENTRY_DSN) {
|
||||
const Sentry = await import('@sentry/react')
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
integrations: [
|
||||
Sentry.browserTracingIntegration(),
|
||||
Sentry.replayIntegration(),
|
||||
],
|
||||
tracesSampleRate: 0.1,
|
||||
replaysSessionSampleRate: 0.1,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
})
|
||||
}
|
||||
|
||||
// Polyfill for Array.prototype.toSpliced (ES2023, Chrome 110+)
|
||||
if (!Array.prototype.toSpliced) {
|
||||
// eslint-disable-next-line no-extend-native
|
||||
|
|
@ -76,6 +60,22 @@ async function main() {
|
|||
value: sessionStorage,
|
||||
})
|
||||
}
|
||||
|
||||
const SENTRY_DSN = env.NEXT_PUBLIC_SENTRY_DSN
|
||||
|
||||
if (!IS_DEV && SENTRY_DSN) {
|
||||
const Sentry = await import('@sentry/react')
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
integrations: [
|
||||
Sentry.browserTracingIntegration(),
|
||||
Sentry.replayIntegration(),
|
||||
],
|
||||
tracesSampleRate: 0.1,
|
||||
replaysSessionSampleRate: 0.1,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
|
|
|
|||
Loading…
Reference in New Issue