@@ -12,7 +12,7 @@ import { isRedirectNavigationError } from '../common/nextNavigationErrorUtils';
1212import { browserTracingIntegration } from './browserTracingIntegration' ;
1313import { nextjsClientStackFrameNormalizationIntegration } from './clientNormalizationIntegration' ;
1414import { removeIsrSsgTraceMetaTags } from './routing/isrRoutingTracing' ;
15- import { nextjsRouteProviderIntegration } from './routing/routeProvider' ;
15+ import { createNextRouteProvider } from './routing/routeProvider' ;
1616import { applyTunnelRouteOption } from './tunnelRoute' ;
1717
1818export * from '@sentry/react' ;
@@ -66,6 +66,9 @@ export function init(options: BrowserOptions): Client | undefined {
6666 environment : options . environment || process . env . SENTRY_ENVIRONMENT || getClientVercelEnv ( ) || process . env . NODE_ENV ,
6767 defaultIntegrations : getDefaultIntegrations ( options ) ,
6868 release : process . env . _sentryRelease || globalWithInjectedValues . _sentryRelease ,
69+ // Both route manifests are injected at build time, so route parameterization works from `init` on,
70+ // including for the pageload span and with tracing disabled.
71+ routeProvider : createNextRouteProvider ( ) ,
6972 ...options ,
7073 } satisfies BrowserOptions ;
7174
@@ -106,7 +109,6 @@ export function init(options: BrowserOptions): Client | undefined {
106109
107110function getDefaultIntegrations ( options : BrowserOptions ) : Integration [ ] {
108111 const customDefaultIntegrations = getReactDefaultIntegrations ( options ) ;
109- customDefaultIntegrations . push ( nextjsRouteProviderIntegration ( ) ) ;
110112 // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with "false",
111113 // in which case everything inside will get tree-shaken away
112114 if ( typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__ ) {
0 commit comments