-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
^9
Framework Version
Next.js Version: 14.1.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
After integrating @sentry/nextjs into the customer's Next.js project, they noticed a significant increase in build times. The build time consistently jumps from about 21–22 seconds to ~47–60 seconds, despite excluding Sentry Replays. Additionally, it appears the build process is running on a single processor core, leading to slower performance.
Build Time Comparison:
With Sentry:
Install: ~10s
Build: ~47-60s
Without Sentry:
Install: ~7s
Build: ~21-22s
Sentry SDK Configuration:
sentry.client.config.js | sentry.edge.config.js | sentry.server.config.js
all three files are same as below
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
// Define how likely traces are sampled. 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,
});
Calculated build time using following commands -
time npm install
time npm run build
Expected Result
Minimal or no impact on build time after integrating Sentry, or at least a smaller overhead compared to the observed near-doubling in build duration.
Actual Result
Build time increases by over 100% (from ~21–22 seconds to ~47–60 seconds).
Metadata
Metadata
Assignees
Labels
Projects
Status