18 Dec 2024 11:30 AM
Hello Dynatrace's,
We have the APK installed on multiple tablets, and the requirement is to receive an alert in Dynatrace whenever the APK gets stuck. Currently, application team are monitoring this manually by observing a specific screen displayed on the tablet when the APK is in stuck mode.
Is it possible to set up an alert in Dynatrace for this use case?
Thank You
18 Dec 2024 12:53 PM
If your application can detect the "stuck" mode, you can use
https://docs.dynatrace.com/docs/shortlink/oneagent-sdk-for-android#report-errors
But if the application itself is freeze, I'm not sure if you'll be able to call the onagent sdk.
19 Dec 2024 06:06 AM
Thank you for your response,
Whenever the APK gets stuck, a specific screen is displayed on the tablet, indicating that the APK is in a stuck state.
By viewing the screen or screenshot, they can identify that the APK is in a stuck state.
20 Dec 2024 12:30 PM
Then if you can show the screen , that means you will be able to send the error.
// report an error code
Dynatrace.reportError("error_code_name", -1);
// report an exception
Dynatrace.reportError("exception_name", exception);
20 Dec 2024 12:45 PM
Hello @PacoPorro
Thanks for code level, let's work on it together development wise from your end 😉 👨💻 and theoretically from my modest POV 🙂.
KR,
Peter
19 Dec 2024 07:18 PM - edited 19 Dec 2024 07:19 PM
Hi @kunaljais
In addition to the provided guidance by @PacoPorro, PFA comment:
Make sure the Android application (APK) is instrumented with the Dynatrace mobile monitoring SDK.
The below data is collected properly as per the instrumentation:
The instrumentation should capture relevant data that would indicate when the app is stuck or unresponsive (for example, if the app is not responding to user input or backend API calls). If the app already has logging or error handling for being stuck, ensure that this information is being logged properly in a way that Dynatrace can capture.
If the app doesn't directly send a "stuck" status to Dynatrace, you could monitor certain custom metrics or logs that could indicate that the app is stuck:
Custom Metric: If the app has a specific timeout or a stuck flag (such as a timer or a state variable indicating that the app is stuck), you can expose this as a custom metric to Dynatrace. This could be sent from the mobile app via the Dynatrace SDK.
Via Logs: If the application is logging specific events when it gets stuck, make sure those logs are sent to Dynatrace. You can configure Dynatrace to track logs and set up alerts based on specific keywords or log messages.
Hoping it helps addressing the raised concern.
BR,
Peter