Error and crash reporting

  • Latest Dynatrace
  • Explanation
  • 1-min read
  • Published Dec 24, 2025

Dynatrace provides comprehensive error and crash reporting for .NET MAUI applications. The native OneAgent automatically captures unhandled exceptions and platform-level crashes on both Android and iOS platforms.

Automatic crash reporting

When you configure the Dynatrace MAUI plugin, automatic crash reporting is enabled by default. The native agents capture crashes from the underlying Android and iOS platforms.

How it works

The native agents automatically capture:

  • Unhandled exceptions—fatal errors that cause application termination.
  • Native crashes—platform-level crashes from Android and iOS.

Disable automatic crash reporting

Automatic crash reporting is enabled by default. If you prefer to disable it, you can configure it in the dynatrace.config.json file.

Android:

{
"android": {
"crashReporting": false
}
}

iOS:

{
"ios": {
"DTXCrashReportingEnabled": false
}
}

ANR reporting

Application Not Responding (ANR) errors occur when the main thread is blocked for too long. Dynatrace automatically captures ANR events.

What is captured

ANR events indicate that your app's UI became unresponsive.

Configuration

ANR reporting is enabled by default. To disable it in your dynatrace.config.json file:

Android:

{
"android": {
"anrReporting": false
}
}

iOS:

{
"ios": {
"DTXANRReportingEnabled": false
}
}

ANR events are only sent if the user restarts the app within 10 minutes of the ANR occurring. On Android, ANR reporting requires Android 11 or higher.

Manual error reporting

You can use the IAction.ReportError API to manually report errors in your application. This allows you to capture and send custom error information to Dynatrace.

Example

using Dynatrace.MAUI;
try
{
// Your code that might throw an exception
PerformRiskyOperation();
}
catch (Exception ex)
{
// Report the error to Dynatrace
IRootAction action = Agent.Instance.EnterAction("ParentAction");
action.ReportError("Custom error occurred", -1);
action.LeaveAction();
}

The ReportError API forwards data to Grail. The Android and iOS agents generate RUM on Grail data from this API, which means the error data will not pass through the event modifier in the MAUI scope.

Related tags
Digital Experience