React Native SESSION REPLAY

Prerequisites
- Ensure you have set up and initialized the
@cloudcare/react-native-mobile
RUM configuration, and enabled View monitoring collection.
- React Native SESSION REPLAY is currently an alpha feature and requires
@cloudcare/react-native-mobile:0.4.0
or higher.
- It is recommended to use the version displayed in the badge at the top of the document. Additionally, you can find the available alpha versions using the command below. The alpha version changelog is here
npm view @cloudcare/react-native-mobile versions --json | grep alpha
Configuration
npm install @cloudcare/react-native-mobile "last_alpha_version"
#or
yarn inatall @cloudcare/react-native-mobile "last_alpha_version"
Code Sample
import {
SessionReplayPrivacy,
FTReactNativeSessionReplay,
FTSessionReplayConfig
} from '@cloudcare/react-native-mobile';
let sessionReplayConfig:FTSessionReplayConfig = {
sampleRate:1,
privacy:SessionReplayPrivacy.ALLOW
}
await FTReactNativeSessionReplay.sessionReplayConfig(sessionReplayConfig);
Attribute |
Type |
Required |
Description |
sampleRate |
number |
No |
Sampling rate, range [0,1], 0 means no collection, 1 means full collection, default is 1. This sampling rate is based on RUM sampling. |
privacy |
SessionReplayPrivacy |
No |
Sets the privacy level for content masking in SESSION REPLAY. Default is SessionReplayPrivacy.MASK .
SessionReplayPrivacy.ALLOW : Does not mask privacy data except for sensitive input controls, such as password inputs
SessionReplayPrivacy.MASK_USER_INPUT : Masks user input data, including text in input boxes, Switch, etc.
SessionReplayPrivacy.MASK : Masks privacy data, including text, Switch, etc.; |
Sample Code and Configuration Reference