Skip to content

React Native SESSION REPLAY

Prerequisites

  • Ensure that 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 version @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 released using the command below. The alpha version changelog is available here
npm view @cloudcare/react-native-mobile versions --json | grep alpha

Configuration

npm install @cloudcare/react-native-mobil "last_alpha_version"
#or
yarn inatall @cloudcare/react-native-mobil "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);
Property 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: No masking of private data except for sensitive input controls, such as password input
SessionReplayPrivacy.MASK_USER_INPUT: Masks parts of user input data, including text in input boxes, Switch, etc.
SessionReplayPrivacy.MASK: Masks private data, including text, Switch, etc.;

Sample Code and Configuration Reference