Closed
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.74.0
Framework Version
Next.js 13.5.3
Link to Sentry event
SDK Setup
enableTracing: true,
tracesSampleRate: 1,
debug: false,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
environment: process.env.XX
Steps to Reproduce
- Set up Sentry for Next.js with the Wizard. Use the server configuration.
- Insert
cookies()
orheaders()
to make a Server Component render dynamically - Build the application. No fatal errors that would prevent the build from finishing.
Expected Result
It should not send DYNAMIC_SERVER_USAGE
traces that don't prevent the build from succeeding to Sentry.
I think this is a very similar issue to #7641 where Exceptions in Next.js are handled internally to create some kind of fallback behavior. In the case of DYNAMIC_SERVER_USAGE
, it signals that the Server Component can't be pre-rendered at build time.
Actual Result
Once the build completes, see the Sentry Issue dashboard with "Dynamic server usage: Page couldn't be rendered statically because it used cookies
"

Metadata
Metadata
Assignees
Type
Projects
Status
No status