各ビルドでクラッシュレポートの ProGuard または DexGuard マッピングファイルを自動的にアップロードできるように、EUM アカウント情報を追加するビルドを設定できます。

これは、これらのタイプのマッピングファイルを管理するために推奨される方法ですが、マッピングファイルのアップロードでは手動モードも使用できます。ProGuard または DexGuard を使用してファイルを難読化しない場合は、このセクションを無視できます。詳細については、「難読化とクラスの削除を防止するための ProGuard の設定」を参照してください。

DexGuard の制限

DexGuard マッピングファイルは、デフォルトの場所に配置する必要があります。つまり、DexGuard 設定で --printMapping を指定しないでください。これにより、マッピングファイルの出力先が変更されます。

SaaS EUM サーバへのアップロード

SaaS EUM サーバを使用している場合は、次のようにアカウント名とライセンスキーを入力して、アップロードを自動化するだけです。

adeum {
	url COLLECTOR_URL // For SaaS it's optional to set your region's endpoint. Default is https://api.eum-appdynamics.com. See https://docs.appdynamics.com/display/PAA/SaaS+Domains+and+IP+Ranges for a list of regions. For on-prem it is the public collector URL.
   account { 
		licenseKey EUM_LICENSE_KEY name EUM_ACCOUNT_NAME 
		}
	proguardMappingFileUpload { 
		failBuildOnUploadFailure false enabled true // This specifies whether the entire build should fail if mapping file upload fails. Enabled refers to whether auto-uploading of mapping file is enabled.
		} 
	excludeClasses = ['android.support.multidex.*', 'okio.**'] // This specifies any classes customers would like to exclude from auto-instrumentation. The notation is standard java package/class specification used in Gradle.
	enabledForDebugBuilds = true // Whether auto-instrumentation is enabled for debug builds, true by default.
	enabledForReleaseBuilds = true // Whether auto-instrumentation is enabled for release builds, true by default.
	webViewCallbackCrashReportingEnabled = false // Auto-instrumentation is enabled for WebChromeClient and WebViewClient
...


// This block specifies how to handle native crashes. By default, this is not enabled.
	nativeCrashHandling {
		if (BUILD_NDKLIB) {
			enabled = true
			symbolUpload { 
				variantLibraryPaths = ["appRelease": "ndkLib/obj/local"] 
			}
		}
	}
}
JAVA

オンプレミス EUM サーバへのアップロード

オンプレミス展開を使用している場合は、アカウント名とライセンスの入力に加えて、次に示すように、オンプレミス EUM サーバへの URL を url プロパティに割り当てる必要もあります。

adeum{  
    // The account information is also needed for on-prem deployments.
    account {
      name "The EUM Account Name from the License screen"
      licenseKey "The EUM License Key from the License screen"
    }
    ...
    // Add this information to point to the on-prem EUM Server.
    url "https://<your-on-prem-eum-server>:7001"
}
TEXT

デフォルトのアップロード動作の変更

オンプレミスと SaaS の両方の展開でデフォルトのアップロード動作を変更することもできます。オンプレミス展開の場合、url プロパティを使用してオンプレミス EUM サーバへの URL を指定する必要があります。

次の設定例では、url によって指定された URL へのアップロードが不可能な場合、ビルドが失敗するように failBuildOnUploadFailuretrue に設定しています。オブジェクト proguardMappingFileUpload は、Proguard と DexGuard の両方のマッピングファイルで使用されます。ProGuard または DexGuard マッピングファイルをアップロードできなくても、ビルドが失敗しないようにするには、デフォルト設定を変更しないでください。

adeum{  
    ...
    // Add this information to point to the on-prem EUM Server.
    url "https://<your-on-prem-eum-server>:7001"
 
   // Add this information if you want to modify upload behavior.
    proguardMappingFileUpload {
      failBuildOnUploadFailure true // If true, will fail build. Defaults to false.
      enabled true //enables automatic uploads.  Defaults to true
    }
}
TEXT

難読化とクラスの削除を防止するための ProGuard の設定

.Configure ProGuard to Prevent Obfuscation and Class Removal v22.1

This page has not yet been translated to Japanese.