You can configure the build to add your EUM account information so that you can automatically upload your ProGuard or DexGuard mapping files for crash reports with each build.
This is the recommended way of managing these types of mapping files, although manual modes are available for uploading mapping files. If you do not use ProGuard or DexGuard to obfuscate your files you can ignore this section. See Configure ProGuard to Prevent Obfuscation and Class Removal.
DexGuard Limitation
DexGuard mapping files must be in the default location. This means that your DexGuard configurations should not specify --printMapping
, which changes where to print the mapping file.
Upload to the On-Premises EUM Server
If you are using an on-premises deployment, in addition to supplying your account name and license, you must also assign the URL to your on-premises EUM Server to the url
property as shown:
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
Modify the Default Upload Behavior
You can also modify the default upload behavior for the on-premises deployment. For on-premises deployments, you will need to provide the URL to your on-premises EUM Server with the url
property.
The configuration example below sets failBuildOnUploadFailure
to true
, so that the build will fail if the upload to the URL specified by url
is unreachable. The object symbolMappingFileUpload
is used for both Proguard and DexGuard mapping files. If you don't want your build to fail because the ProGuard or DexGuard mapping file couldn't be uploaded, do not modify the default setting.
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. symbolMappingFileUpload {
failBuildOnUploadFailure true // If true, will fail build. Defaults to false.
enabled true //enables automatic uploads. Defaults to true
}
}
TEXT
Configure ProGuard to Prevent Obfuscation and Class Removal
If you use ProGuard to verify or optimize your code, add the following lines to the ProGuard configuration file proguard-rules.pro
under Gradle Scripts to prevent ProGuard from obfuscating or removing classes needed for proper instrumentation.
-keep class com.appdynamics.eumagent.runtime.DontObfuscate
-keep @com.appdynamics.eumagent.runtime.DontObfuscate class * { *; }
TEXT