-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: browserIssues related to the Sentry Browser SDKIssues related to the Sentry Browser SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.2.1
Framework Version
14.2.2
Link to Sentry event
No response
SDK Setup
import * as Sentry from '@sentry/nextjs';
export async function register() {
const shared: Parameters<typeof Sentry.init>[0] = {
dsn: 'https://...........',
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
release: process.env.NEXT_PUBLIC_VERSION_TAG,
// Set readable environment name
environment: process.env.BUILD_ID?.replace('-build', ''),
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
integrations: [Sentry.extraErrorDataIntegration({ depth: 10, captureErrorCause: true })],
};
if (process.env.node_env !== 'development') {
if (process.env.NEXT_RUNTIME === 'nodejs') {
Sentry.init({
...shared,
});
}
if (process.env.NEXT_RUNTIME === 'edge') {
Sentry.init({
...shared,
});
}
}
}
Steps to Reproduce
- Run
pnpm dev
Expected Result
Being able to use integrations: [Sentry.extraErrorDataIntegration({ depth: 10, captureErrorCause: true })],
on server side as well to get better errors.
Actual Result
Errors in console with:
storefront:dev: ⚠ ./instrumentation.ts
storefront:dev: Attempted import error: 'extraErrorDataIntegration' is not exported from '@sentry/nextjs' (imported as 'Sentry').
storefront:dev: ✓ Compiled in 1431ms (920 modules)
Metadata
Metadata
Assignees
Labels
Package: browserIssues related to the Sentry Browser SDKIssues related to the Sentry Browser SDK
Projects
Status
No status