Skip to content
Merged
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
24 changes: 24 additions & 0 deletions docs/platforms/react-native/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,27 @@ Errors that happen while a replay is running will be linked to the replay, makin
- The replay was rate-limited and couldn't be accepted.
- The replay was deleted by a member of your org.
- There were network errors and the replay wasn't saved.

## Troubleshooting

### Crashes During View Hierarchy Traversal on iOS

_Supported in React Native SDK v7.9.0 and later_

When capturing session replays on iOS, the SDK traverses the view hierarchy to capture screenshots and view information. Some view hierarchies may contain problematic views that can cause crashes during traversal. You can prevent these crashes by filtering which views are included or excluded from traversal. Use `includedViewClasses` to only traverse specific view classes (only views that are instances of these classes or their subclasses will be traversed), or `excludedViewClasses` to skip problematic view classes (views of these classes or their subclasses will be skipped entirely, including all their children). If both `includedViewClasses` and `excludedViewClasses` are set, `excludedViewClasses` takes precedence: views matching excluded classes won't be traversed even if they match an included class.

```javascript {tabTitle:Mobile}
import * as Sentry from "@sentry/react-native";

Sentry.init({
dsn: "___PUBLIC_DSN___",
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
integrations: [
Sentry.mobileReplayIntegration({
includedViewClasses: ['UILabel', 'UIView', 'MyCustomView'],
excludedViewClasses: ['WKWebView', 'UIWebView'],
}),
],
});
```