Skip to content

Commit 9999084

Browse files
committed
Changelog entry with the usage example
1 parent 3aeecae commit 9999084

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,29 @@
88
99
## Unreleased
1010

11+
### Features
12+
13+
- Add performance tracking for Expo Router route prefetching ([#XXXX](https://github.com/getsentry/sentry-react-native/pull/XXXX))
14+
- New `wrapExpoRouter` utility to instrument manual `prefetch()` calls with performance spans
15+
- New `enablePrefetchTracking` option for `reactNavigationIntegration` to automatically track PRELOAD actions
16+
```tsx
17+
// Option 1: Wrap the router for manual prefetch tracking
18+
import { wrapExpoRouter } from '@sentry/react-native';
19+
import { useRouter } from 'expo-router';
20+
21+
const router = wrapExpoRouter(useRouter());
22+
router.prefetch('/details'); // Creates a span measuring prefetch performance
23+
24+
// Option 2: Enable automatic prefetch tracking in the integration
25+
Sentry.init({
26+
integrations: [
27+
Sentry.reactNavigationIntegration({
28+
enablePrefetchTracking: true,
29+
}),
30+
],
31+
});
32+
```
33+
1134
### Dependencies
1235

1336
- Bump JavaScript SDK from v10.37.0 to v10.38.0 ([#5596](https://github.com/getsentry/sentry-react-native/pull/5596))

0 commit comments

Comments
 (0)