# Tips - Mobile app action before a crash

**URL:** <https://community.dynatrace.com/t/tips-mobile-app-action-before-a-crash/43483>\
**Category:** Dynatrace Tips\
**Tags:** real-user-monitoring-classic, mobile-monitoring, usql, tips-and-tricks\
**Created:** [January 5, 2024, 8:46pm UTC](https://community.dynatrace.com/t/tips-mobile-app-action-before-a-crash/43483 "2024-01-05T20:46:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pierre_l/32/23722_2.png) [@Pierre\_L](https://community.dynatrace.com/u/Pierre_L)\
**Post date:** [January 5, 2024, 8:46pm UTC](https://community.dynatrace.com/t/tips-mobile-app-action-before-a-crash/43483/1 "2024-01-05T20:46:55Z")

</div>

I’m sharing this tips and hope that can be helpfull.

A mobile app developper I discussed with recently told me what can be very usefull with Dynatrace to replace 2 other products actually used to partially help him in debugging mobile app crash.

He needs 3 informations :

- App crash details
- Session replay for crashed sessions
- Last action performed before the crash occured

First two are simple as it’s out-of-the-box within the RUM integration but for the third one, I can’t find the information easily.

In Mobile app, we don’t have the same view as Web app with entry or exit actions displayed in the UI so I started some test using USQL and I found that these requests perfectly match :

Last actions before a crash :

```markup
SELECT name AS "Last Action",count(*) AS "Crashes count" FROM useraction WHERE isExitAction=true AND usersession.crashGroupId IS NOT NULL GROUP BY name

```

 ![Action list.png](https://global.discourse-cdn.com/dynatrace/original/3X/b/a/baf43247840a88c4248dd050b8fa7d5c0aad918c.png)

Touch actions :

```markup
SELECT name AS "Last Action",count(*) AS "Crashes count" FROM useraction WHERE isExitAction=true AND (name STARTSWITH "Touch") AND usersession.crashGroupId IS NOT NULL GROUP BY name

```

Other actions :

```markup
SELECT name AS "Last Action",count(*) AS "Crashes count" FROM useraction WHERE isExitAction=true AND NOT(name STARTSWITH "Touch") AND usersession.crashGroupId IS NOT NULL GROUP BY name

```

 ![Action list 2.png](https://global.discourse-cdn.com/dynatrace/original/2X/6/6147fc7aaa89041e50e2668d15ce55eceb376b1e.png)

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [January 8, 2024, 2:48pm UTC](https://community.dynatrace.com/t/tips-mobile-app-action-before-a-crash/43483/2 "2024-01-08T14:48:34Z")

</div>

Hi&nbsp;[@Pierre\_L](https://community.dynatrace.com/user/66331),

Thank you for sharing this tip.

Best regards,

Mizső
