Skip to content

Commit 9750feb

Browse files
authored
fix: React native docs
1 parent 1284d0b commit 9750feb

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

docs/platforms/react-native/tracing/instrumentation/react-native-navigation.mdx

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import { Navigation } from 'react-native-navigation';
1717
Sentry.init({
1818
dsn: "___PUBLIC_DSN___",
1919
integrations: [
20-
Sentry.reactNativeNavigationIntegration({
21-
navigation: Navigation,
22-
}),
23-
],
20+
new Sentry.ReactNativeTracing({
21+
routingInstrumentation: navigationIntegration,
22+
}),
23+
],
2424
})
2525
```
2626

@@ -29,26 +29,16 @@ Sentry.init({
2929
You can configure the instrumentation by passing an options object to the constructor:
3030

3131
```javascript
32-
Sentry.reactNativeNavigationIntegration({
33-
navigation: Navigation, // Navigation from `react-native-navigation`
34-
routeChangeTimeoutMs: 1_000, // default: 1_000
35-
enableTabsInstrumentation: true, // default: false
36-
ignoreEmptyBackNavigationTransactions: true, // default: true
32+
const navigationIntegration = new Sentry.ReactNavigationInstrumentation({
33+
enableTimeToInitialDisplay: true,
34+
routeChangeTimeoutMs: 1_000, // default: 1_000
3735
});
3836
```
3937

40-
### navigation
41-
42-
This option is required and should be the `Navigation` object imported from the navigation library.
43-
4438
### routeChangeTimeoutMs
4539

4640
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`.
4741

4842
### enableTabsInstrumentation
4943

5044
This instrumentation will create a transaction on tab change. By default, only navigation commands create transactions. The default value is `false`.
51-
52-
### ignoreEmptyBackNavigationTransactions
53-
54-
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`.

0 commit comments

Comments
 (0)