android - MixPanel for error monitoring -
I am working on an Android application which is integrated for analytics and error monitoring.
Recently we had an accident in the application and when we could not get the root cause of that accident, then we added the code to restart the app, when the bug is resumed, we It also started to start when Bugsnag used to use Bugsnag for my preference, but some team members asked why we could not use MixPayel because we could easily make events with those spiders Can Iltr we've sent to Micspenel. But I think the mixpan should not be used specifically to track user events. And neither the accident nor the restart is due to a user incident, it is just randomly
I want to hear suggestions / ideas from the community.
You can use Thread.setDefaultUncaughtExceptionHandler (...) To set your custom to your
application.onCreate which tracks the mixpall of all unwanted exceptions (crashes) and sets the attribute as:
public Class MyExceptionHandler implies UncaughtExceptionHandler {Private UncaughtExceptionHandler defaultExceptionHandler; Public MyExceptionHandler (UncaughtExceptionHandler defaultExceptionHandler) {this.defaultExceptionHandler = defaultExceptionHandler; } Public zero uncaught exception (thread thread, throbbing exception) {mMixPanelInstance.trackEvent ("APP_CRASH", blank); If (defaultExceptionHandler! = Null) {defaultExceptionHandler.uncaughtException (thread, exception); }}} MyApplication.onCreate (...) {UncaughtExceptionHandler currentHandler = Thread.getDefaultUncaughtExceptionHandler (); Thread.SetsDefaultSupportEXPassionHandler (new MyPassmentHandler (current handler)); }
Comments
Post a Comment