Instrument Android apps
The process of monitoring the user experience of native mobile apps is different from monitoring browser-based web applications. This is because mobile-app monitoring involves the compilation, packaging, and shipment of a monitoring library along with your own mobile application package.
For technical information and references, check the following pages:
To learn how to monitor Xamarin apps with Dynatrace OneAgent, see Xamarin.
To successfully monitor an Android app, perform the following steps:
Step 1: Create a mobile application in Dynatrace
Before you begin instrumenting your Android app, create a mobile application in your monitoring environment. This mobile app will be used to monitor your Android app.
- From the navigation menu, select Deploy Dynatrace.
- Scroll down to Mobile app monitoring, and click the Set up mobile monitoring button.
- Type the name of the mobile app, and click Create mobile app.
Step 2: Obtain configuration settings from your mobile app
When you create a mobile app in Dynatrace, an
applicationId is generated and the
beaconUrl value of your environment is determined. These values can be accessed on the Instrumentation page.
- From the navigation menu, click Applications.
- Select the mobile application you created.
- Click the Browse (…) menu button and select Edit.
- From the Application settings menu, select Instrumentation.
- Click Google Android and select either Groovy or Kotlin.
The Gradle snippet is already populated with the
beaconUrl configuration values from your mobile application.
Step 3: Instrument your application
Step 4: Adjust OneAgent communication
After you have finished instrumenting your application, you must adjust OneAgent communication.
Dynatrace Android Gradle plugin
- Instrumentation via Dynatrace Android Gradle plugin
- Monitoring capabilities of Dynatrace Android Gradle plugin
- Configure Dynatrace Android Gradle plugin for instrumentation processes
- Use Dynatrace Android Gradle plugin to adjust OneAgent configuration
- Adjust Dynatrace Android Gradle plugin configuration based on the project structure