Dynatrace API
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Retrieve Mobile App Crash Stack Traces via API in Dynatrace?

tushar_supe
Newcomer

We are using Dynatrace Classic Mobile Crash Analysis and can retrieve crash metadata using USQL APIs. How can we retrieve the full app crash stack trace programmatically?

Is there a supported API for stack traces, or are stack traces only available through the Crash Analysis UI/internal endpoints such as '/rest/dtaql/executequery'?

We also need to export all crash records for a specific time range without the 1000-record UI limitation.

4 REPLIES 4

Julius_Loman
DynaMight Legend
DynaMight Legend

If you are on SaaS win New RUM experience enabled, you can query it using DQL:

fetch user.events
| filter characteristics.classifier == "error"
| filter characteristics.has_crash == true


For Classic RUM (or if you are in Managed, which has only Classic RUM), there is no API. The session data can be accessed only by USQL API, there is no API access to the raw data which is used to display the screens in UI

Dynatrace Ambassador | Alanata a.s., Slovakia, Dynatrace Master Partner

How can I retrieve mobile application crash logs from Dynatrace using the Grail API?

  • Can mobile crash events and stack traces be accessed through the Grail API?
  • What are the prerequisites for accessing the Grail API?
  • How do I generate the required API token?
  • Which token scopes/permissions are required to query mobile crash data?
  • Are there any specific IAM policies, roles, or access permissions that need to be configured?
  • Could you provide the relevant documentation and example API requests for retrieving crash events and stack traces?

@tushar_supe I'd recommend using dtctl ( https://github.com/dynatrace-oss/dtctl ) if you want it programmatically:

dtctl auth login --context playground --environment https://playground.apps.dynatrace.com
dtctl query "fetch user.events | filter characteristics.classifier == \"error\"| filter characteristics.has_crash == true" -o yaml


You can also use MCP server of course, especially in an AI workfow. Also see official skills https://github.com/Dynatrace/dynatrace-for-ai if you want to go with this path. Those skills already include mobile frontend analysis skills.

And last but not least, if you really need API access directly,

IAM permissions required are storage:buckets:read and storage:user.events:read, see https://docs.dynatrace.com/docs/shortlink/iam-policystatements
For permission setup, I recommend reaching out to your Dynatrace admin.

Dynatrace Ambassador | Alanata a.s., Slovakia, Dynatrace Master Partner

In dtctl, you can actually explore and call ANY Dynatrace API via dtctl get apis, dtctl describe api, dtctl exec api.

See https://github.com/dynatrace-oss/dtctl/blob/main/docs/resources/api-discovery.md

 

Featured Posts