Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.25.0
Framework Version
Next 15.5.6 & React 19.2.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
next.config.ts:
constnextConfig: NextConfig={webpack(config,{ webpack }){// Configuration for Sentry tree-shakingconfig.plugins.push(newwebpack.DefinePlugin({__SENTRY_DEBUG__: false,__SENTRY_TRACING__: false,__RRWEB_EXCLUDE_IFRAME__: true,__RRWEB_EXCLUDE_SHADOW_DOM__: true,__SENTRY_EXCLUDE_REPLAY_WORKER__: true,}),);returnconfig;},}constbundledNextConfig=bundleAnalyzer(nextConfig);exportdefaultwithSentryConfig(bundledNextConfig,{disableLogger: true,project: process.env.NEXT_PUBLIC_SENTRY_PROJECT,silent: !process.env.CI,});sentry.edge.config.ts
import*asSentryfrom"@sentry/nextjs";Sentry.init({debug: false,dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,sendDefaultPii: true,tracesSampleRate: 1.0,});sentry.server.config.ts
import*asSentryfrom"@sentry/nextjs";Sentry.init({debug: false,dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,sendDefaultPii: true,tracesSampleRate: 1.0,});src/instrumentation.ts
import*asSentryfrom"@sentry/nextjs";exportasyncfunctionregister(){if(process.env.NEXT_RUNTIME==="nodejs"){awaitimport("../sentry.server.config");}if(process.env.NEXT_RUNTIME==="edge"){awaitimport("../sentry.edge.config");}}exportconstonRequestError=Sentry.captureRequestError;src/app/global-error.tsx
"use client";import*asSentryfrom"@sentry/nextjs";importNextErrorfrom"next/error";import{useEffect}from"react";exportdefaultfunctionGlobalError({
error,}: {error: Error&{digest?: string};}){useEffect(()=>{Sentry.captureException(error);},[error]);return(<htmllang="en"><body>{/* `NextError` is the default Next.js error page component. Its type definition requires a `statusCode` prop. However, since the App Router does not expose status codes for errors, we simply pass 0 to render a generic error message. */}<NextErrorstatusCode={0}/></body></html>);}src/app/layout.tsx
import*asSentryfrom"@sentry/nextjs";exportfunctiongenerateMetadata(): Metadata{return{other: {
...Sentry.getTraceData(),},};}// Layout function...Steps to Reproduce
- Create a Next project using
@sentry/nextjs10.12.0 - Run
ANALYZE=true npm run build - Update
@sentry/nextjs to 10.25.0 - Run
ANALYZE=true npm run build
Expected Result
Bundle size should match or be similar to bundle size prior to updating.
Actual Result
Bundle size has increased, and includes @apm-js-collab, despite the Pino integration not being used.


Additional Context
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.25.0
Framework Version
Next 15.5.6 & React 19.2.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
next.config.ts:sentry.edge.config.tssentry.server.config.tssrc/instrumentation.tssrc/app/global-error.tsxsrc/app/layout.tsxSteps to Reproduce
@sentry/nextjs10.12.0ANALYZE=true npm run build@sentry/nextjsto10.25.0ANALYZE=true npm run buildExpected Result
Bundle size should match or be similar to bundle size prior to updating.
Actual Result
Bundle size has increased, and includes
@apm-js-collab, despite the Pino integration not being used.Additional Context
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.