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