Errors go to both staging and production enviroments (Next.js) #13076
Unanswered
OvechkinDmitry
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i've found that setting enviroments to staging and production not help and errors from staging enviroment go to production env.
My setup:
"@sentry/nextjs": "^7.118.0",
(next.config.js)
module.exports = withSentryConfig(
nextConfig,
{
silent: true,
org: 'org',
project: 'name',
url: 'some_url',
authToken: process.env.SENTRY_AUTH_TOKEN,
},
{
widenClientFileUpload: true,
transpileClientSDK: true,
tunnelRoute: '/monitoring-tunnel',
hideSourceMaps: true,
disableLogger: true,
},
);
(sentry.client.config)
import * as Sentry from '@sentry/nextjs';
import { replayIntegration } from '@sentry/nextjs';
Sentry.init({
dsn: 'dsn_url',
enabled: process.env.NODE_ENV !== 'development',
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
tracesSampleRate: 1,
debug: false,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
integrations: [
replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],
});
(sentry.edge.config)
import * as Sentry from '@sentry/nextjs';
Sentry.init({
// @todo в env
dsn: 'dsn_url',
tracesSampleRate: 1,
debug: false,
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
});
(sentry.server.config)
import * as Sentry from '@sentry/nextjs';
Sentry.init({
// @todo в env
dsn: 'dsn_url',
tracesSampleRate: 1,
debug: false,
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
});
Beta Was this translation helpful? Give feedback.
All reactions