Configure the React Native Agent to Report Session Replay

To report Session Replay for React Native applications, you must configure the React Native Agent as follows:
  1. Initialize the agent with the sessionReplayURL parameter:
    import App from './src/App';
    import {AppRegistry} from 'react-native';
    import {name as appName} from './app.json';
    
    import {Instrumentation} from '@appdynamics/react-native-agent';  
    
    Instrumentation.start({
        appKey: '<EUM-APP-KEY>',
        collectorURL: <Collector URL>
        sessionReplayURL: <URL for session replay>
        ……
    
    });
    
    AppRegistry.registerComponent(appName, () => App); 
  2. (Conditional) Do this step only if you have React Native Android applications In your app module-level build.gradle file, add session replay SDK.
    
    ...
    ...
    repositories {
            maven {
                url = "https://sdk.smartlook.com/android/release"
            }
        }
    ...
    ...
    dependencies {
            implementation 'com.cisco.android:sr-instrumentation-session-recording-core:1.0.12' 
    }