Environment
@sentry/nextjs 11.0.0, Next 16.3.6 + Turbopack production build, tracesSampleRate: 0, explicit integrations: [rewriteFramesIntegration, thirdPartyErrorFilterIntegration].
What are you trying to achieve?
An error-only client SDK: performance tracing is off (tracesSampleRate: 0, no browserTracingIntegration registered), so the tracing machinery should not reach the bundle.
What happens instead?
The tracing stack still bundles. Measured from Turbopack's build analysis of a 47-route app, all present in every route's client chunks:
browserTracingIntegration.js (@sentry/browser)
tracing/sentrySpan.js, tracing/trace.js, tracing/idleSpan.js, spanUtils.js (@sentry/core)
browser-utils/spans.js, request.js, fetch.js, appRouterRoutingInstrumentation.js (@sentry/nextjs)
Together ~30-40 kB gz per route. The modules arrive through the default-integration set that init wires statically, so passing an explicit integrations list does not remove them from the import graph — the filter runs after the imports.
Suggestion
When tracesSampleRate: 0 (and no tracesSampler), build the default integration list without the tracing family — statically, not at runtime — the same way the SDK already treats disabled features elsewhere. For an error-only app that is the single largest remaining dependency after react-dom.
Environment
@sentry/nextjs 11.0.0, Next 16.3.6 + Turbopack production build,
tracesSampleRate: 0, explicitintegrations: [rewriteFramesIntegration, thirdPartyErrorFilterIntegration].What are you trying to achieve?
An error-only client SDK: performance tracing is off (
tracesSampleRate: 0, nobrowserTracingIntegrationregistered), so the tracing machinery should not reach the bundle.What happens instead?
The tracing stack still bundles. Measured from Turbopack's build analysis of a 47-route app, all present in every route's client chunks:
browserTracingIntegration.js(@sentry/browser)tracing/sentrySpan.js,tracing/trace.js,tracing/idleSpan.js,spanUtils.js(@sentry/core)browser-utils/spans.js,request.js,fetch.js,appRouterRoutingInstrumentation.js(@sentry/nextjs)Together ~30-40 kB gz per route. The modules arrive through the default-integration set that
initwires statically, so passing an explicitintegrationslist does not remove them from the import graph — the filter runs after the imports.Suggestion
When
tracesSampleRate: 0(and notracesSampler), build the default integration list without the tracing family — statically, not at runtime — the same way the SDK already treats disabled features elsewhere. For an error-only app that is the single largest remaining dependency after react-dom.