Skip to content

Commit e847bc0

Browse files
more changes
1 parent c1c033b commit e847bc0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/platforms/react-native/migration/v5-to-v6.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,28 @@ Sentry.init({
176176
});
177177
```
178178
179+
### `beforeNavigate` replaced by `beforeStartSpan`
180+
181+
The `beforeNavigate` option was removed in the SDK version 6. Use the `beforeStartSpan` option instead. The `beforeStartSpan` option is a function that is called before starting a navigation span. This function can't stop the span from being started, but it can modify the span start options before it starts.
182+
183+
```javascript diff
184+
Sentry.init({
185+
tracesSampleRate: 1.0,
186+
integrations: [
187+
- new Sentry.ReactNativeTracing({
188+
- beforeNavigate: (context) => {
189+
+ Sentry.reactNativeTracingIntegration({
190+
+ beforeStartSpan: (options) => {
191+
return {
192+
...options,
193+
op: 'navigation',
194+
};
195+
},
196+
}),
197+
],
198+
});
199+
```
200+
179201
### `enableSpotlight` and `spotlightSidecarUrl` replaced by `spotlight`
180202
181203
The `enableSpotlight` and `spotlightSidecarUrl` options were removed in the SDK version 6. Use the `spotlight` option instead.

0 commit comments

Comments
 (0)