File tree Expand file tree Collapse file tree 5 files changed +34
-2
lines changed
dev-packages/e2e-tests/test-applications/nextjs-turbo Expand file tree Collapse file tree 5 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 33/// <reference types="next/navigation-types/compat/navigation" />
44
55// NOTE: This file should not be edited
6- // see https://nextjs.org/docs/app/building-your-application/configuring /typescript for more information.
6+ // see https://nextjs.org/docs/app/api-reference/config /typescript for more information.
Original file line number Diff line number Diff line change 1717 "@types/node" : " ^18.19.1" ,
1818 "@types/react" : " 18.0.26" ,
1919 "@types/react-dom" : " 18.0.9" ,
20- "next" : " 15.3.0-canary.8 " ,
20+ "next" : " 15.3.0-canary.26 " ,
2121 "react" : " rc" ,
2222 "react-dom" : " rc" ,
2323 "typescript" : " ~5.0.0"
Original file line number Diff line number Diff line change 11import type { Client , EventProcessor , Integration } from '@sentry/core' ;
2+ import { getGlobalScope } from '@sentry/core' ;
23import { GLOBAL_OBJ , addEventProcessor , applySdkMetadata } from '@sentry/core' ;
34import type { BrowserOptions } from '@sentry/react' ;
45import { getDefaultIntegrations as getReactDefaultIntegrations , init as reactInit } from '@sentry/react' ;
@@ -61,6 +62,16 @@ export function init(options: BrowserOptions): Client | undefined {
6162 addEventProcessor ( devErrorSymbolicationEventProcessor ) ;
6263 }
6364
65+ try {
66+ // @ts -expect-error `process.turbopack` is a magic string that will be replaced by Next.js
67+ if ( process . turbopack ) {
68+ getGlobalScope ( ) . setTag ( 'turbopack' , true ) ;
69+ }
70+ } catch ( e ) {
71+ // Noop
72+ // The statement above can throw because process is not defined on the client
73+ }
74+
6475 return client ;
6576}
6677
Original file line number Diff line number Diff line change 44 SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ,
55 SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ,
66 applySdkMetadata ,
7+ getGlobalScope ,
78 getRootSpan ,
89 registerSpanErrorInstrumentation ,
910 spanToJSON ,
@@ -90,6 +91,16 @@ export function init(options: VercelEdgeOptions = {}): void {
9091 vercelWaitUntil ( flushSafelyWithTimeout ( ) ) ;
9192 }
9293 } ) ;
94+
95+ try {
96+ // @ts -expect-error `process.turbopack` is a magic string that will be replaced by Next.js
97+ if ( process . turbopack ) {
98+ getGlobalScope ( ) . setTag ( 'turbopack' , true ) ;
99+ }
100+ } catch {
101+ // Noop
102+ // The statement above can throw because process is not defined on the client
103+ }
93104}
94105
95106/**
Original file line number Diff line number Diff line change @@ -357,6 +357,16 @@ export function init(options: NodeOptions): NodeClient | undefined {
357357 getGlobalScope ( ) . addEventProcessor ( devErrorSymbolicationEventProcessor ) ;
358358 }
359359
360+ try {
361+ // @ts -expect-error `process.turbopack` is a magic string that will be replaced by Next.js
362+ if ( process . turbopack ) {
363+ getGlobalScope ( ) . setTag ( 'turbopack' , true ) ;
364+ }
365+ } catch {
366+ // Noop
367+ // The statement above can throw because process is not defined on the client
368+ }
369+
360370 DEBUG_BUILD && logger . log ( 'SDK successfully initialized' ) ;
361371
362372 return client ;
You can’t perform that action at this time.
0 commit comments