Integrate APM for Android App


(ELK Explorer) #1

Hi All,
How to integrate APM with Android APP to monitor App user's activities.
Currently my app is having 5+ millions users and I want to check how users are using my APP as well as monitor my APP performance.

Thanks


(Felix Barnsteiner) #2

Hi and thanks for checking out Elastic APM!

The Java agent does not have support for Android apps yet. It's also not on our immediate roadmap but might be something we are looking into in the future.

How would you envision the agent to work in an Android app? Would every button click be a Transaction? What would the name of that transaction be?

You could have a look at the documentation of the APM Server intake API which lets you send transactions and spans as JSON-encoded data to the server: https://www.elastic.co/guide/en/apm/server/current/intake-api.html

Cheers,
Felix


(ELK Explorer) #3

Thanks for reply.
Currently I am looking for below concept :-

  1. Ship Android Log into Elasticsearch and visualize using kibana.
  2. Want to know which view is getting accessing by users.
  3. Want to monitor user's click actions as suppose user is opening my app, after that user moved to product page, then user move to product description page, then user added product into cart, then user check out.
    In this whole process user completed their process which visiting 5 pages. So I want to record that transaction too.

Currently I am having 2 Android app, 2 IOS APP, and 2 Websites.


(ELK Explorer) #4

It is like, OnClickListner on each and every buttons.


(Felix Barnsteiner) #5

Shipping all logs to Elasticsearch might be problematic. If your users are on a mobile network, it can eat up their data volume. If your application logs periodic events in the background, continuously sending log data to the server can drain the battery because it keeps the mobile connection to the antenna open.

One idea would be to buffer locally and to send data in batch as soon as the user has a wifi connection.

Another challenge is that the Dalvik VM does not support bytecode manipulation. So instrumentation has to be performed in a build step. Thankfully, Byte Buddy has plugins for Maven and Gradle which support this.

Also, all dependencies of the agent have to be reviewed to check wether they work on Android. For example, I'm not sure if sun.misc.Unsafe is supported on Android, which is needed for JCTools and the LMAX Disruptor.

Another piece of the puzzle is the instrumentation to instrument the button clicks and view changes.

Not saying all this is impossible, but there is quite some work required which is why it would take some while to support that. If you are interested in collaborating I'm happy to assist :slight_smile:

Cheers,
Felix


(ELK Explorer) #6

How about get all onclick event data into a log file and then using logfile to index into elasticsearch ?

Yes you are correct in case of data volume issue and we can manage as once user will join WIFI, clicks data will transfer. But here one catch is "What if user will not connect with WIFI? :slight_smile: "


(Rohan Daga) #7

Is there really kodi any way to showbox do it? Even if paid I would love tutuapp to have such tracking system.

Regards,
Smith


(ELK Explorer) #9

As of now I am still keep search for solution about how to tract users activity and perform user behavior analysis


(system) #12

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.