mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
feat: Sentry enabled only at production
This commit is contained in:
parent
df52c91d0f
commit
2fec571c77
@ -1,17 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const {
|
||||
NEXT_PUBLIC_SENTRY_DSN: SENTRY_DSN,
|
||||
SENTRY_ORG,
|
||||
SENTRY_PROJECT,
|
||||
SENTRY_AUTH_TOKEN,
|
||||
SENTRY_RELEASE,
|
||||
SOURCE_COMMIT,
|
||||
SOURCE_BRANCH,
|
||||
NODE_ENV
|
||||
} = process.env
|
||||
// const { withSentryConfig } = require('@sentry/nextjs')
|
||||
|
||||
const VERSION = require('./package.json').version
|
||||
const basePath = ''
|
||||
|
||||
module.exports = {
|
||||
env: {
|
||||
@ -22,7 +12,5 @@ module.exports = {
|
||||
},
|
||||
experimental: {
|
||||
scrollRestoration: true
|
||||
},
|
||||
basePath,
|
||||
externalResolver: true
|
||||
}
|
||||
}
|
||||
@ -35,7 +35,8 @@ Router.events.on('routeChangeError', NProgress.done)
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
integrations: [new Integrations.BrowserTracing()],
|
||||
tracesSampleRate: 1.0
|
||||
tracesSampleRate: 1.0,
|
||||
enabled: process.env.NODE_ENV === 'production'
|
||||
})
|
||||
|
||||
const KoreanbotsApp = ({ Component, pageProps, err, cookie }: KoreanbotsProps): JSX.Element => {
|
||||
|
||||
@ -13,7 +13,7 @@ Sentry.init({
|
||||
new Sentry.Integrations.Http({ tracing: true })
|
||||
],
|
||||
tracesSampleRate: 1.0,
|
||||
enabled: true
|
||||
enabled: process.env.NODE_ENV === 'production'
|
||||
})
|
||||
|
||||
const limiter = rateLimit({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user