Monitoring Application Not Responding (ANR) and crashes is critical for ensuring a seamless user experience. These issues can lead to app uninstalls, negative reviews, and loss of user trust. By proactively detecting and addressing these errors, you can improve app stability and retain user engagement.
Dynatrace provides detailed insights into ANR and crash events, including stack traces, session details, and device-specific information to quickly identify root causes and implement fixes.
With the new RUM experience, Dynatrace automatically captures "Application Not Responding" (ANR) errors. ANRs are critical to monitor because they cause frustration to the user. The main problem is that the app's main thread, which is responsible for updating the UI, can't process user input events or draw, causing the app to appear frozen.
On iOS, ANRs are detected when the main thread is blocked for longer than the configured timeout interval (default: 2 seconds). When the main thread becomes unresponsive, OneAgent captures a live stack trace to help identify the root cause of the freeze.
For each ANR event, the SDK captures:
This data can be analyzed in apps such as the Error Inspector, or queried directly in Grail using DQL. For the field reference, see Application Not Responding.
By default, ANR detection is enabled. To disable it, set the DTXANRReportingEnabled configuration key to false in your app's Info.plist:
<key>DTXANRReportingEnabled</key><false/>
The default timeout for detecting an ANR is 2 seconds. You can adjust this value using the DTXANRTimeout configuration key in your Info.plist file. The value is specified in seconds:
<key>DTXANRTimeout</key><integer>3</integer>
Dynatrace automatically captures and reports crashes that occur in your iOS application. When the app crashes and is restarted, OneAgent sends the crash report to Dynatrace, including the full stack trace and session context.
For each crash event, the SDK captures:
This data can be analyzed in apps such as the Error Inspector, or queried directly in Grail using DQL. For the field reference, see Crashes.
By default, crash reporting is enabled. To disable it, set the DTXCrashReportingEnabled configuration key to false in your app's Info.plist file:
<key>DTXCrashReportingEnabled</key><false/>
We don't recommend using multiple monitoring tools with crash reporting enabled simultaneously. This can cause compatibility issues, incorrect reporting, and loss of crash data.
| Configuration key | Default | Description |
|---|---|---|
DTXCrashReportingEnabled | true | Enables or disables crash reporting |
DTXANRReportingEnabled | true | Enables or disables ANR detection |
DTXANRTimeout | 2 | ANR detection timeout in seconds |
To get human-readable stack traces in your crash and ANR reports, upload your app's dSYM (debug symbol) files to Dynatrace. Without dSYM files, stack traces contain memory addresses instead of meaningful function names and line numbers.
For instructions on uploading dSYM files, see Mobile symbolication.