Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
],
})
```

Expand All @@ -29,26 +29,16 @@ 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({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wsdt, thanks for contributing!

I noticed in the code example there is an option for enableTimeToInitialDisplay, but in the list of options below it provides an explanation for enableTabsInstrumentation which is not in the code sample. Is this correct?

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

### 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`.
Loading