モバイル RUM のセッションリプレイ(ベータ版)

セッションリプレイを使用すると、クリック、スクロール、ナビゲーションなどのインタラクションを記録することで、モバイルアプリケーションでのユーザーアクティビティを追跡できます。セッションのリプレイを見ると、次のことができます。
  • ユーザーエクスペリエンスを最適化する。

  • アプリケーションクラッシュのエラーをデバッグする。

  • アプリケーションが低速である理由を診断します。

注: 免責事項

このドキュメントでは、現在早期プレビュー(「ベータ」)としてのみ利用可能な製品について説明します。Splunk AppDynamics は、ベータ版およびその資料(本書の内容を含む)について、一般公開する前、または最終的に一般公開しないと決定した場合でも、理由を問わず、お客様への通知および補償なしにいつでも変更する権利を留保します。この資料は、将来の製品機能を保証するものではありません。購入の判断材料にはしないでください。実際の製品の成果は、Splunk AppDynamics およびお客様のテクノロジーの変化、経済動向やターゲット市場に関連する要因、他社の買収、人員の雇用・解雇、およびその他の要因により、将来予測に関する記述とは異なる場合があります。詳細については、 https://www.splunk.com/en_us/legal/appdynamics-limited-license-agreement.html の全用語を参照してください。

Points to Consider

In the Beta stage, each account can record up to 20,000 Session Replays per month. After the Beta ends, contact your Account Manager to buy the full feature.

Storage is set to 8 days by default, and it cannot be extended during the Beta stage. After the Beta ends, you can purchase the extended storage SKU to add more storage.

Prerequisites

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

  • iOS Agent >= 25.2

  • Android Agent >= 25.2

Configure the iOS Agent to Report Session Replay

To report Session Replay for your mobile application, you must configure the iOS Agent as follows:
Objective C
#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 = @"https://<your_region>-blob-service.eum-appdynamics.com";
        [ADEumInstrumentation initWithConfiguration: config];
        // other tasks
        return YES;
     }
Swift
#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 = "https://<your_region>-blob-service.eum-appdynamics.com"
        ADEumInstrumentation.initWith(config)
        // other tasks
        return true
    }
// ...
注: Do not add region for the Oregon (PDX) region.

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())

    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.
    
    ...
    ...
    repositories {
            maven {
                url = "https://sdk.smartlook.com/android/release"
            }
        }
    ...
    ...
    dependencies {
            implementation 'com.cisco.android:sr-instrumentation-session-recording-core:1.0.12' 
    }

Enable Session Replay

An administrator can only enable Session Replay. To enable Session Replay for the selected mobile application, perform the following options:
  1. Log in to the Controller UI.
  2. Open the mobile application in which you are interested.
  3. On the left navigation menu, select Configuration.
  4. Click Mobile App Group Configuration.
  5. Under the Session Replay tab, select Enable Session Replay.
    注: Xcode's Main Thread Checker

    When starting an iOS app in the debug mode, it may stop for few seconds. After enabling the session replay, it will start and display a warning. This issue is caused by Xcode's Main Thread Checker diagnostics.

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

    The warning is harmless, and is caused by iOS Agent's capturing screen on the background. The alternative (capturing the screenshot on the main thread) may cause glitches of the app UI – so implementing it this way and having this warning is a necessary trade-off to enable seamless recording functionality.

    This warning also might be accompanied by a short freeze of the app during debugging. This freeze does not happen in production builds, and is caused by the Main Thread Checker Xcode diagnostic option.

    This option can be switched off in the respective run scheme diagnostic options, see "Detect Improper UI Updates on Background Threads" section of the "Diagnosing Memory, Thread, and Crash Issues Early."

View Session Replay

The Session Replay combines multiple recordings with user interactions. Perform the following steps to view the Session Replay:
  1. Go to User Experience > Mobile Apps . A play icon is displayed in Session Replay if the recording is available. Expand the Session Replay tab.
  2. Select the application for which you have enabled the Session Replay.
  3. Select Sessions.
    A play icon is displayed in Session Replay if the recording is available.
  4. Expand the Session Replay tab.
Session Replay highlights active segments of the sessions. A blank screen appears if there are no recordings or user activity.
You can perform the following actions while viewing the session replay:
  • Adjust the playback speed.

  • Switch between Video and Wireframe modes. In Wireframe mode, the session replay displays only the UI layout and masks the text.