File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
docs/platforms/react-native/tracing/instrumentation Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ The code snippet below shows how to initialize the instrumentation.
1313``` javascript {6-8, 15-16, 20-25} {filename: app/_layout.tsx}
1414import React from ' react' ;
1515import { Slot , useNavigationContainerRef } from ' expo-router' ;
16- import Constants , { ExecutionEnvironment } from ' expo-constants ' ;
16+ import { isRunningInExpoGo } from " expo"
1717import * as Sentry from ' @sentry/react-native' ;
1818
1919const navigationIntegration = Sentry .reactNavigationIntegration ({
20- enableTimeToInitialDisplay: Constants . executionEnvironment === ExecutionEnvironment . StoreClient , // Only in native builds, not in Expo Go.
20+ enableTimeToInitialDisplay: ! isRunningInExpoGo (),
2121});
2222
2323Sentry .init ({
@@ -26,7 +26,7 @@ Sentry.init({
2626 // We recommend adjusting this value in production.
2727 tracesSampleRate: 1.0 ,
2828 integrations: [navigationIntegration],
29- enableNativeFramesTracking: Constants . executionEnvironment === ExecutionEnvironment . StoreClient , // Only in native builds, not in Expo Go.
29+ enableNativeFramesTracking: ! isRunningInExpoGo (),
3030});
3131
3232function RootLayout () {
You can’t perform that action at this time.
0 commit comments