A new version of Android is coming up, Lollipop, and as usual the Android team at Google is promising that it will be faster, backed by a new ART runtime and the promise is to reach performance improvements up to 100%. I am lucky that I can always take a look at new releases of operations systems, apps or Web sites and apply our latest technology, especially since it is important to measure. Since I often get asked “How do you do that,” my intention here is to show you how easy it is to integrate Dynatrace Application Monitoring into your Android app and get performance measurements as well as errors, crashes and user behavior out of your app.
It’s worth noting that for this test I’m using a hosted Dynatrace SaaS instance. Using Dynatrace agents offer 3 different methods to obtain performance data from your mobile app:
- UI-Wizard driven automatic instrumentation: This is a good option to start with if you are not yet familiar with the capabilities of Dynatrace.
- Command line driven automatic instrumentation: This option is the perfect fit for those of you who want to automate the agent integration and make it as simple as being a build step in you Continuous Integration Environment.
- Manual integration of SDK: In order to meet your apps special reporting requirements you can enhance the automatic measurements by using the SDK or even by going fully manual.
Since command line and IDE screenshots are not as good looking as those from a UI wizard I picked option 1 for this blog. For those of you that want to use the SDK or the command line option, I highly recommend this APM community documentation .
Step 0: Try it yourself
In case you like what you have/will read in this blog and want to try it yourself – Get started right here and apply for our Dynatrace Free Trial.
Step 1: Start the Dynatrace client and jump into the configuration process
Step 2: Get the agent/SDK on your machine
Dynatrace is an agent based technology supporting a great variety of technologies from Android and iOS over server side technologies like Nginx, PHP, Java, et cetera. The deployment for these technologies is always just a single file. In this step we download the agent/SDK for Android, unpack it on our machine and tell Dynatrace where the files are located.
Step 3: Specify the app bundle
Besides the agent
Step 4: Data collection point
In order to be able to analyze the data the agent in the app has to send it to a collection point. As I am using the Dynatrace solution hosted in the cloud my endpoint is running in the cloud and I just point the agent there by putting the DynatraceMonitor URL in. If you are running the solution on premise, one of your frontend webservers that has an agent injected can be the end point as well.
Step 5: Instrument – Download – Run the app
The final step is pretty easy after defining the endpoint we click the “Test” button to make sure the URL reaches a valid endpoint and then we start the instrumentation by clicking on the “Instrument” button. After the instrumentation is done we can hit download and get ready to run the app. Just take the apk and install it on your device or emulator and run the app.
Step 6: Analyze the results
I am not a fan of repeating myself J and therefore I have want to point you to these helpful posts on how to successfully analyze the results you get:
- Will FIFA fix their mobile app problems before the World Cup?
- Unit testing in production for mobile apps
- Comparing User Experience: Web, App & Mobile
And here are a couple of screenshots from views in the client that build on top of mobile app data:
It is important to monitor your apps not only for crashes but also for exceptions, web request errors and performance issues in order to get good reviews in the app stores. Your monitoring solution should make it as easy as possible to get started but also have the depth to fit your needs even after the first month. A new operating system version should never prevent you from getting this important data and your monitoring solution should be at least as fast in supporting new versions as you are.