機密データの取り扱い
セッションの記録中にユーザーのプライバシーを保護するには、デフォルトですべてのテキストフィールドと入力フィールドを非表示にするオプションを有効にして、機密データをマスクするようにセッションリプレイを設定します。
レンダリングモード
| モード | 説明 |
|---|---|
NATIVE |
アプリケーションの画面を定期的にキャプチャし、セッションリプレイによって即座に機密データが削除されます。その後、キャプチャした各フレームを結合して、1 つのセッション録音を作成します。 |
WIREFRAME |
画面データをワイヤフレームとしてのみ表現し、アプリケーションをキャプチャします。ユーザーデータは記録されません。これはユーザーデータのセキュリティ保護に推奨されるレンダリングメソッドです。 |
レンダリングモードの設定
レンダリングモードを NATIVE に設定するには、次のコードを使用してエージェントを構成します。
- 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://<you_region>-image.eum-appdynamics.com/"; config.renderingMode = ADEumNative; [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.renderingMode = .native ADEumInstrumentation.initWith(config) // other tasks return true } // ...
レンダリングモードを WIREFRAME に設定するには、次のコードを使用してエージェントを構成します。
- 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://<you_region>-image.eum-appdynamics.com/"; config.renderingMode = ADEumWireframe; [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.renderingMode = .wireframe ADEumInstrumentation.initWith(config) // other tasks return true } // ...
感度
プロジェクト内の各要素の感度を設定できます。アプリケーションの構築方法に基づいて、次のいずれかを選択します。
ビュー感度
次のコードを使用して、任意の View インスタンスの感度を設定します。
- Objective-C
-
CODE
[ADEumInstrumentation setViewInstanceSensitivityWithView:anyView isSensitive: @YES]; - Swift
-
JAVASCRIPT
let isSensitive = NSNumber(value: true) ADEumInstrumentation.setViewInstanceSensitivityWith(anyView, isSensitive: isSensitive)
次のコードを使用して、任意の View インスタンスの感度を読み取ります。
- Objective-C
-
CODE
NSNumber *isSensitive = [ADEumInstrumentation viewInstanceSensitivityWithView:anyView]; - Swift
-
JAVASCRIPT
let isSensitive = ADEumInstrumentation.viewInstanceSensitivity(with: anyView)
クラス感度
特定の View に感度を設定するのではなく、View を拡張する Class のすべてのインスタンスに感度を設定します。
- Objective-C
-
CODE
[ADEumInstrumentation setViewClassSensitivityWithViewClass:[ViewSubclass class] isSensitive: @YES]; - Swift
-
CODE
ADEumInstrumentation.setViewClassSensitivityWithViewClass(UIButton.self, isSensitive: isSensitive)
特定のビューに感度を設定するのではなく、View を拡張する Class のすべてのインスタンスの感度を読み取ります。
- Objective-C
-
CODE
NSNumber *buttonSensitivity = [ADEumInstrumentation viewClassSensitivityWithViewClass:[anyView class]]; - Swift
-
JAVASCRIPT
let buttonSensitivity = ADEumInstrumentation.viewClassSensitivity(withViewClass: UIButton.self)
録音マスク
録音マスクの例
録画対象から除外したいアプリケーションのエリアがあり、viewで定義できない場合は、RecordingMask を使用できます。
セッションリプレイでは、機密データを覆い隠すか消去することでマスクします。録音マスクを設定するには、次の設定を使用します。
- Objective-C
-
CODE
ADEumMaskElement *maskElement = [[ADEumMaskElement alloc] initWithRect:coveringRect maskType:ADEumMaskTypeCovering]; ADEumMaskElement *maskElement1 = [[ADEumMaskElement alloc] initWithRect:erasingUpdateButtonRect maskType:ADEumMaskTypeErasing]; [ADEumInstrumentation sensitivityCoveringRectElements:@[maskElement, maskElement1]]; - Swift
-
JAVASCRIPT
let maskElement = ADEumMaskElement(rect:coveringRect, maskType: .covering) let maskElement1 = ADEumMaskElement(rect:erasingUpdateButtonRect, maskType: .erasing) ADEumInstrumentation.sensitivityCoveringRectElements([maskElement, maskElement1])
一度に設定できる Recording mask は 1 つだけですが、録音マスクに MaskType のリストを含めることで、複数のエリアをまとめてカバーできます。機密データを保護するには、次のマスクタイプを使用します。
| マスクタイプ | 機能の仕組み |
|---|---|
MaskType.MASK_TYPE_COVERING |
要素 Rect で定義されたエリアは録音の対象外です |
MaskType.MASK_TYPE_ERASING |
要素 Rect で定義されたエリアは、リスト内の以前の MaskType によってそのエリアが覆われていた場合でも録音されます。 |