From 788912cdb3cc0cb39ec255b1be1dbc4dc1ba07d2 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 13 Nov 2024 17:42:14 +0100 Subject: [PATCH 1/3] fix typo --- .../react-native/tracing/instrumentation/expo-router.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx b/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx index 5765792f85939..8fd18a75437b5 100644 --- a/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx +++ b/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx @@ -16,7 +16,7 @@ import { Slot, useNavigationContainerRef } from 'expo-router'; import Constants, { ExecutionEnvironment } from 'expo-constants'; import * as Sentry from '@sentry/react-native'; -const navigationIntegration = Sentry.reactNavigationintegration({ +const navigationIntegration = Sentry.reactNavigationIntegration({ enableTimeToInitialDisplay: Constants.executionEnvironment === ExecutionEnvironment.StoreClient, // Only in native builds, not in Expo Go. }); From 778c970caecc30fda72e255d19ebd795e86b4d41 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 13 Nov 2024 17:56:51 +0100 Subject: [PATCH 2/3] docs(expo-router): use more descriptive function Uses a more descriptive function if the app is running in Expo Go instead of the comment. --- .../react-native/tracing/instrumentation/expo-router.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx b/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx index 8fd18a75437b5..b7d21028f54ca 100644 --- a/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx +++ b/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx @@ -13,11 +13,11 @@ The code snippet below shows how to initialize the instrumentation. ```javascript {6-8, 15-16, 20-25} {filename: app/_layout.tsx} import React from 'react'; import { Slot, useNavigationContainerRef } from 'expo-router'; -import Constants, { ExecutionEnvironment } from 'expo-constants'; +import { isRunningInExpoGo } from "expo" import * as Sentry from '@sentry/react-native'; const navigationIntegration = Sentry.reactNavigationIntegration({ - enableTimeToInitialDisplay: Constants.executionEnvironment === ExecutionEnvironment.StoreClient, // Only in native builds, not in Expo Go. + enableTimeToInitialDisplay: !isRunningInExpoGo(), }); Sentry.init({ @@ -26,7 +26,7 @@ Sentry.init({ // We recommend adjusting this value in production. tracesSampleRate: 1.0, integrations: [navigationIntegration], - enableNativeFramesTracking: Constants.executionEnvironment === ExecutionEnvironment.StoreClient, // Only in native builds, not in Expo Go. + enableNativeFramesTracking: !isRunningInExpoGo(), }); function RootLayout() { From 725a86c656230d41bff184b7c375775d86148325 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 13 Nov 2024 17:58:59 +0100 Subject: [PATCH 3/3] docs(expo-router): fix import order and formatting --- .../react-native/tracing/instrumentation/expo-router.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx b/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx index b7d21028f54ca..45a3aa19ac5ba 100644 --- a/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx +++ b/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx @@ -12,8 +12,8 @@ The code snippet below shows how to initialize the instrumentation. ```javascript {6-8, 15-16, 20-25} {filename: app/_layout.tsx} import React from 'react'; +import { isRunningInExpoGo } from 'expo'; import { Slot, useNavigationContainerRef } from 'expo-router'; -import { isRunningInExpoGo } from "expo" import * as Sentry from '@sentry/react-native'; const navigationIntegration = Sentry.reactNavigationIntegration({