diff --git a/docs/platforms/react-native/tracing/instrumentation/react-native-navigation.mdx b/docs/platforms/react-native/tracing/instrumentation/react-native-navigation.mdx index 7d12eb8409416..c46ac29993692 100644 --- a/docs/platforms/react-native/tracing/instrumentation/react-native-navigation.mdx +++ b/docs/platforms/react-native/tracing/instrumentation/react-native-navigation.mdx @@ -17,10 +17,10 @@ import { Navigation } from 'react-native-navigation'; Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ - Sentry.reactNativeNavigationIntegration({ - navigation: Navigation, - }), - ], + new Sentry.ReactNativeTracing({ + routingInstrumentation: navigationIntegration, + }), + ], }) ``` @@ -29,18 +29,12 @@ Sentry.init({ You can configure the instrumentation by passing an options object to the constructor: ```javascript -Sentry.reactNativeNavigationIntegration({ - navigation: Navigation, // Navigation from `react-native-navigation` - routeChangeTimeoutMs: 1_000, // default: 1_000 - enableTabsInstrumentation: true, // default: false - ignoreEmptyBackNavigationTransactions: true, // default: true +const navigationIntegration = new Sentry.ReactNavigationInstrumentation({ + enableTimeToInitialDisplay: true, + routeChangeTimeoutMs: 1_000, // default: 1_000 }); ``` -### navigation - -This option is required and should be the `Navigation` object imported from the navigation library. - ### routeChangeTimeoutMs This option specifies how long the instrumentation will wait for the route to mount after a change has been initiated before the transaction is discarded. The default value is `1_000`. @@ -48,7 +42,3 @@ This option specifies how long the instrumentation will wait for the route to mo ### enableTabsInstrumentation This instrumentation will create a transaction on tab change. By default, only navigation commands create transactions. The default value is `false`. - -### ignoreEmptyBackNavigationTransactions - -This ensures that transactions that are from routes that've been seen and don't have any spans, are not being sampled. This removes a lot of clutter, making it so that most back navigation transactions are now ignored. The default value is `true`.