@@ -11,6 +11,26 @@ import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
1111import { ThemeProvider , useTheme } from '@/src/theme' ;
1212import { AppWrapper } from '@/src/components/AppWrapper' ;
1313import ErrorBoundary from '@/src/components/ErrorBoundary' ;
14+ import * as Sentry from '@sentry/react-native' ;
15+
16+ Sentry . init ( {
17+ dsn : process . env . EXPO_PUBLIC_SENTRY_DSN ,
18+
19+ // Adds more context data to events (IP address, cookies, user, etc.)
20+ // For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
21+ sendDefaultPii : true ,
22+
23+ // Enable Logs
24+ enableLogs : true ,
25+
26+ // Configure Session Replay
27+ replaysSessionSampleRate : 0.1 ,
28+ replaysOnErrorSampleRate : 1 ,
29+ integrations : [ Sentry . mobileReplayIntegration ( ) ] ,
30+
31+ // uncomment the line below to enable Spotlight (https://spotlightjs.com)
32+ // spotlight: __DEV__,
33+ } ) ;
1434
1535const clerkPublishableKey = process . env . EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY || '' ;
1636
@@ -101,7 +121,7 @@ function AppContent() {
101121 ) ;
102122}
103123
104- export default function RootLayout ( ) {
124+ export default Sentry . wrap ( function RootLayout ( ) {
105125 if ( __DEV__ ) {
106126 console . log ( '=== MOBILE V1 APP WITH CLERK ===' ) ;
107127 console . log ( 'Clerk key loaded:' , clerkPublishableKey ? 'YES' : 'NO' ) ;
@@ -122,4 +142,4 @@ export default function RootLayout() {
122142 </ ClerkLoaded >
123143 </ ClerkProvider >
124144 ) ;
125- }
145+ } ) ;
0 commit comments