commercetest / vitals-scraper

Collect data to assist in analysing Google Play Console Android Vitals
MIT License
6 stars 2 forks source link

Augmenting stack traces to help understand why the crash occurred #9

Open julianharty opened 5 years ago

julianharty commented 5 years ago

Can we find ways to augment stack traces so they help improve the diagnostics for crashes that occur in our Android apps?

Android Vitals collates stack traces of an app's crashes and presents these in a page per crash cluster. Each cluster has a page with charts and other analytical information together with various stack traces from the audience of users who opt-in to share various data with Google.

The crash trace shows the chain of method calls but no related data is presented. Generally the crashes seem to originate from Java library calls rather than being explicitly raised by the app. I would like to explore ways we might usefully improve the contents of the stack traces in order to improve the ability to diagnose patterns of failures, and through doing so, to help identify and isolate causes.

The improvements would need to surface (i.e. appear) in Android Vitals reports to help improve the diagnostics capabilities while using Android Vitals, so although there may be many other ways of improving diagnostics with other tools, etc. unless they positively affect the contents of stack traces in Android Vitals they are outside the scope of this request.

julianharty commented 5 years ago

Some pointers include:

Somewhat wilder idea would be to incorporate Groovy or another runtime language so custom exceptions could be created dynamically e.g. https://objectpartners.com/2014/09/04/developing-native-android-app-using-groovy/

Admittedly off topic, nonetheless I like the hack of creating a console using gradle https://blog.taragana.com/how-to-rapidly-test-alternative-ideas-in-java-during-development-15821

ISNIT0 commented 5 years ago

I'm thinking something using setStackTrace(): https://stackoverflow.com/questions/6270256/forging-a-stack-trace-in-java