cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Handling metrics after Dexguard obfuscation

ele30
Contributor

Hi all, 

 

After releasing a new app version with Dexguard obfuscation, dynatrace started showing "unexpected drop in usage" alerts for previously monitored actions. It seems related to the obfuscated names. What is the correct way to handle this situation?

1 REPLY 1

Peter_Youssef
Leader

Hello @ele30 

Referring to the attached resources, PFA illustration:

Clarification:

  • Dynatrace relies on the ability to monitor and trace specific actions within the app, and when the names are obfuscated, it can no longer match the metrics or actions to their corresponding names, and accordingly leading to a drop in visibility and triggering the alerts.

Enable Proguard/Dexguard Mapping:

  • Dexguard, like Proguard, generates a mapping file which links the obfuscated names to the original names.
  • This mapping file can be used to associate the obfuscated names with their original ones in Dynatrace.
  • Make sure, you have enabled the generation of the mapping file when you build the app with Dexguard.
  • Locate the generated mapping file (usually named mapping.txt) after the build process.

Dynatrace side:

  • Make sure that you upload the mapping file so that Dynatrace can de-obfuscate the names.
  • This helps mapping the obfuscated method or class names back to their original versions and accurately trace app usage.
  • Dynatrace offers support for de-obfuscating method and class names using the mapping files. 
  • You should upload the mapping files to your Dynatrace account, applying the below steps:
  • Through Dynatrace Web UI > Select the target APP > Edit > Symbol Files.
  • Upload mapping files 
  • Upload your mapping.txt file generated by Dexguard.

2024-12-19_21h40_05.png

Also, kindly consider:

  • In case having custom action names in the app, make sure the obfuscation settings do not affect the key actions you want to monitor. You might need to map these actions to original names or use additional configurations in Dynatrace to recognize obfuscated names.
  • Validate the app and actions after uploading the Symbol files.
  • If the problem stays persistent "unexpected drop in usage" alerts, you may want to fine-tune your alert thresholds. It could be that Dynatrace is still not associating all the actions correctly, which can lead to a drop in usage notifications.

    • Adjust the alert sensitivity for your app’s usage metrics in Dynatrace settings if necessary.
    • Use Session Replay and Real User Monitoring (RUM) to further diagnose any discrepancies caused by the obfuscation.
  • Also check the distributed tracing configurations are activated properly, required restart is considered.

Peter_Youssef_0-1734633146948.png

  • Related Oneagent features are activated accurately, the pending restart if required.

Hoping it adds value.

BR,

Peter

Featured Posts