-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs 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
7.81.1
Framework Version
Next.js 14.0.3 + React 18
Link to Sentry event
No response
SDK Setup
sentry.edge.config.ts
Sentry.init({
dsn: SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
sentry.server.config.ts
Sentry.init({
dsn: SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
Steps to Reproduce
- On an Edge Runtime that responses with a
ReadableStream
. - Call
captureException()
after a promise.
Expected Result
Exceptions should be captured whatever the environment and the response type.
Actual Result
The exception is never captured to Sentry's dashboard.
When using Data Streaming from Next.js and Vercel in an Edge Runtime, it seems impossible to capture anything to Sentry after a promise is called. This bug isn't reproducible in NodeJS Runtime.
You can find a reproduction with instructions on setup here: https://github.com/roch-numbered/nextjs-stream
Metadata
Metadata
Assignees
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Projects
Status
Waiting for: Community