feat: sentry to dify account (#299)

This commit is contained in:
Joel
2023-06-06 10:29:38 +08:00
committed by GitHub
parent a3ee037d6d
commit d70086b841
6 changed files with 20 additions and 12 deletions

View File

@@ -1,9 +1,10 @@
const { withSentryConfig } = require('@sentry/nextjs')
const EDITION = process.env.NEXT_PUBLIC_EDITION
const IS_CE_EDITION = EDITION === 'SELF_HOSTED'
const isDevelopment = process.env.NODE_ENV === 'development'
const isHideSentry = isDevelopment || IS_CE_EDITION
const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN
const SENTRY_ORG = process.env.NEXT_PUBLIC_SENTRY_ORG
const SENTRY_PROJECT = process.env.NEXT_PUBLIC_SENTRY_PROJECT
const isHideSentry = isDevelopment || !SENTRY_DSN || !SENTRY_ORG || !SENTRY_PROJECT
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
@@ -56,8 +57,8 @@ const nextConfig = {
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup
const sentryWebpackPluginOptions = {
org: 'perfectworld',
project: 'javascript-nextjs',
org: SENTRY_ORG,
project: SENTRY_PROJECT,
silent: true, // Suppresses all logs
sourcemaps: {
assets: './**',