File tree 5 files changed +34
-2
lines changed
dev-packages/e2e-tests/test-applications/nextjs-turbo
5 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 3
3
/// <reference types="next/navigation-types/compat/navigation" />
4
4
5
5
// 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 17
17
"@types/node" : " ^18.19.1" ,
18
18
"@types/react" : " 18.0.26" ,
19
19
"@types/react-dom" : " 18.0.9" ,
20
- "next" : " 15.3.0-canary.8 " ,
20
+ "next" : " 15.3.0-canary.26 " ,
21
21
"react" : " rc" ,
22
22
"react-dom" : " rc" ,
23
23
"typescript" : " ~5.0.0"
Original file line number Diff line number Diff line change 1
1
import type { Client , EventProcessor , Integration } from '@sentry/core' ;
2
+ import { getGlobalScope } from '@sentry/core' ;
2
3
import { GLOBAL_OBJ , addEventProcessor , applySdkMetadata } from '@sentry/core' ;
3
4
import type { BrowserOptions } from '@sentry/react' ;
4
5
import { getDefaultIntegrations as getReactDefaultIntegrations , init as reactInit } from '@sentry/react' ;
@@ -61,6 +62,16 @@ export function init(options: BrowserOptions): Client | undefined {
61
62
addEventProcessor ( devErrorSymbolicationEventProcessor ) ;
62
63
}
63
64
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
+
64
75
return client ;
65
76
}
66
77
Original file line number Diff line number Diff line change 4
4
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ,
5
5
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ,
6
6
applySdkMetadata ,
7
+ getGlobalScope ,
7
8
getRootSpan ,
8
9
registerSpanErrorInstrumentation ,
9
10
spanToJSON ,
@@ -90,6 +91,16 @@ export function init(options: VercelEdgeOptions = {}): void {
90
91
vercelWaitUntil ( flushSafelyWithTimeout ( ) ) ;
91
92
}
92
93
} ) ;
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
+ }
93
104
}
94
105
95
106
/**
Original file line number Diff line number Diff line change @@ -357,6 +357,16 @@ export function init(options: NodeOptions): NodeClient | undefined {
357
357
getGlobalScope ( ) . addEventProcessor ( devErrorSymbolicationEventProcessor ) ;
358
358
}
359
359
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
+
360
370
DEBUG_BUILD && logger . log ( 'SDK successfully initialized' ) ;
361
371
362
372
return client ;
You can’t perform that action at this time.
0 commit comments