Session Replay for Mobile RUM

Session Replay allows you to monitor user activity within mobile applications by recording interactions such as clicks, scrolls, and navigation. It captures these interactions as dynamic, video-like journeys, along with detailed session metadata. This provides teams with clear insight into the user experience, especially when issues arise. You can watch the session replay to:
  • Optimize the user experience.

  • Debug the errors for application crashes.

  • Diagnose the reasons for application slowness.

考慮すべき点:

ベータ段階では、各アカウントは 1 ヵ月あたり最大 20,000 件のセッションリプレイを記録できます。ベータ版が終了したら、アカウントマネージャに問い合わせて、完全な機能をご購入ください。

ストレージはデフォルトで 8 日間に設定されており、ベータ版では延長することはできません。ベータ版が終了したら、拡張ストレージ SKU を購入してストレージを追加できます。

Prerequisites

Ensure that the following conditions are met to use Session Replay:
  • Controller >= 25.7

  • EUM Server >= 25.7

  • iOS Agent >= 25.9

  • Android Agent >= 25.9

Log in to the administration console and add the following property to use Session Replay:
  1. Go to Account Settings.

  2. Click Add Property and add session.replay.enabled. Set the value of this property to true.

Configure the iOS Agent to Report Session Replay

  1. To report Session Replay for your mobile application, you must configure the iOS Agent as follows:
    Objective C
    PYTHON
    #import <ADEumInstrumentation/ADEumInstrumentation.h>
    #import "AppDelegate.h"
      
        // ...
        -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        {
            ADEumAgentConfiguration *config = [[ADEumAgentConfiguration alloc] initWithAppKey:<#EUM_APP_KEY#>];
            //The default SaaS EUM Server and Screenshot Service are in the Americas,
            // so you can omit the following settings if you are in the Americas.
            config.collectorURL = @"https://<your_region>-col.eum-appdynamics.com";
            config.screenshotURL = @"https://<your_region>-image.eum-appdynamics.com";
            config.sessionReplayURL = @"http(s)://<domain-name>:7001";
            [ADEumInstrumentation initWithConfiguration: config];
            // other tasks
            return YES;
         }
    Swift
    JAVASCRIPT
    #import <ADEumInstrumentation/ADEumInstrumentation.h>
    #import "AppDelegate.h"
      
        // ...
         func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
            let config = ADEumAgentConfiguration(appKey: <#EUM_APP_KEY#>)
            config.collectorURL = "https://<your_region>.eum-appdynamics.com"
            config.screenshotURL = "https://<your_region>-image.eum-appdynamics.com"
            config.sessionReplayURL = "http(s)://<domain-name>:7001"
            ADEumInstrumentation.initWith(config)
            // other tasks
            return true
        }
    // ...
  2. To report Session Replay for your mobile application, you must configure the iOS Agent as follows:
    Objective C
    PYTHON
    #import <ADEumInstrumentation/ADEumInstrumentation.h>
    #import "AppDelegate.h"
      
        // ...
        -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        {
            ADEumAgentConfiguration *config = [[ADEumAgentConfiguration alloc] initWithAppKey:<#EUM_APP_KEY#>];
            //The default SaaS EUM Server and Screenshot Service are in the Americas,
            // so you can omit the following settings if you are in the Americas.
            config.collectorURL = @"https://<your_region>-col.eum-appdynamics.com";
            config.screenshotURL = @"https://<your_region>-image.eum-appdynamics.com";
            config.sessionReplayURL = @"http(s)://<domain-name>:7001";
            [ADEumInstrumentation initWithConfiguration: config];
            // other tasks
            return YES;
         }
    Swift
    JAVASCRIPT
    #import <ADEumInstrumentation/ADEumInstrumentation.h>
    #import "AppDelegate.h"
      
        // ...
         func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
            let config = ADEumAgentConfiguration(appKey: <#EUM_APP_KEY#>)
            config.collectorURL = "https://<your_region>.eum-appdynamics.com"
            config.screenshotURL = "https://<your_region>-image.eum-appdynamics.com"
            config.sessionReplayURL = "http(s)://<domain-name>:7001"
            ADEumInstrumentation.initWith(config)
            // other tasks
            return true
        }
    // ...
To protect user privacy during session recordings, configure Session Replay to mask sensitive data by enabling options that obscure all text and input fields by default. For more information, see Handle Sensitive Data.

Configure the Android Agent to Report Session Replay

To report Session Replay for your mobile application, you must configure the Android Agent as follows:
  1. Initialise the agent by the following methods:
    • .withSessionReplayEnabled(true)

    • .withBlobServiceURL(configHelper.getSessionReplayUrl())

    • (Optional) Default configuration: RenderingMode.NATIVE_MODE.withSessionReplayRenderingMode(RenderingMode.WIREFRAME_MODE)

    PYTHON
    import com.appdynamics.eumagent.runtime.Instrumentation;
    ...
    @Override public void onCreate(Bundle savedInstanceState) {
      Instrumentation.start(AgentConfiguration.builder()
        .withAppKey("<EUM_APP_KEY>")
        .withContext(getApplicationContext())
        // The default SaaS EUM Server and Screenshot Service are in the Americas,
        // so you can omit the following settings if you are in the Americas.
        .withSessionReplayEnabled(true)
        .withBlobServiceURL(configHelper.getSessionReplayUrl()) 
        .build());
      ...
    }
  2. In your app module-level build.gradle file, add session replay SDK.
    JSON
    ...
    ...
    repositories {
            maven {
                url = "https://sdk.smartlook.com/android/release"
            }
        }
    ...
    ...
    dependencies {
            implementation 'com.cisco.android:sr-instrumentation-session-recording-core:1.0.12' 
    }
To protect user privacy during session recordings, configure Session Replay to mask sensitive data by enabling options that obscure all text and input fields by default. For more information, see Handle Sensitive DataHandle Sensitive Data.

セッションリプレイの有効化

管理者はセッションリプレイのみを有効にできます。選択したモバイルアプリケーションのセッションリプレイを有効にするには、以下のオプションを実行します。
  1. コントローラ UI にログインします。
  2. 対象のモバイルアプリケーションを開きます。
  3. 左のナビゲーションメニューで、[Configuration] を選択します。
  4. [Mobile App Group Configuration.] をクリックします。
  5. [Session Replay] タブで、[Enable Session Replay] を選択します。
    注: Xcode's Main Thread Checker

    デバッグモードで iOS アプリを起動すると、数秒間停止することがあります。セッションリプレイを有効にすると、セッションリプレイが開始し警告が表示されます。この問題は、Xcode のメインスレッドチェッカーの診断によって引き起こされます。

    CODE
    Main Thread Checker: UI API called on a background thread: -[UIView drawViewHierarchyInRect:afterScreenUpdates:]

    この警告は無害であり、iOS エージェントがバックグラウンドで画面をキャプチャしていることが原因で発生します。別の方法(メインスレッドでスクリーンショットをキャプチャする)は、アプリケーション UI の不具合を引き起こす可能性があります。そのため、この方法で実装し、この警告を表示することは、シームレスな記録機能を有効にするために必要なトレードオフです。

    この警告は、デバッグ中にアプリケーションが短時間フリーズする場合にも表示されます。このフリーズは実稼働環境ビルドでは発生せず、メインスレッドチェッカーの Xcode 診断オプションが原因で発生します。

    このオプションは、それぞれの実行スキームの診断オプションでオフにすることができます。詳細については、「メモリ、スレッド、クラッシュの問題の早期診断」の「バックグラウンドセクションの不適切な UI 更新の検出」セクションを参照してください。

セッションリプレイの表示

セッションリプレイでは、複数の録音とユーザーインタラクションが組み合わされています。セッションリプレイを表示するには、以下の手順を実行します。
  1. ユーザー Experience > Mobile Apps に移動します。記録が可能な場合、[セッションリプレイ(Session Replay)] に再生アイコンが表示されます。[セッションリプレイ(Session Replay)] タブを展開します。
  2. セッションリプレイを有効にしたアプリケーションを選択します。
  3. Sessions を選択します。
    記録が可能な場合、Session Replay に再生アイコンが表示されます。
  4. [Session Replay] タブを展開します。
Session Replay は、セッションのアクティブなセグメントを強調表示します。録画またはユーザー アクティビティがない場合は、空白の画面が表示されます。
セッションリプレイの表示中に、以下のアクションを実行できます。
  • 再生速度を調整する。

  • Video モードと Wireframe モードを切り替える。Wireframe モードでは、セッションリプレイは UI レイアウトだけを表示し、テキストはマスクされます。