Skip to content

Commit ec73021

Browse files
committed
fix: gate the meta removal with __SENTRY_TRACING__
1 parent ed76ec8 commit ec73021

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/nextjs/src/client/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export function init(options: BrowserOptions): Client | undefined {
4444

4545
// Remove cached trace meta tags for ISR/SSG pages before initializing
4646
// This prevents the browser tracing integration from using stale trace IDs
47-
removeIsrSsgTraceMetaTags();
47+
if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {
48+
removeIsrSsgTraceMetaTags();
49+
}
4850

4951
const opts = {
5052
environment: getVercelEnv(true) || process.env.NODE_ENV,

0 commit comments

Comments
 (0)