Crash analysis

The mobile application developers can use the crash analysis feature in Instana to detect, understand, and fix the application crash as soon as possible. This feature helps to minimize the number of affected users and reduce the negative impact of the crash.

Supported technologies

Instana crash collection is supported for Android and iOS native applications. This feature is supported in the following agent versions:

  • Instana Android agent 6.0.11 or later (Based on Gradle 7.3.3)
  • Instana Android agent 5.2.6 or later (Based on Gradle version lower than 7.3.3)
  • Instana iOS agent 1.6.8 or later

Things to note

  • iOS
    • iOS agent attempts to do the symbolication if possible, otherwise the raw data is shown in the Instana UI.
    • Crash data is not sent to Instana if the application is run in iOS emulators.
    • Crash data is sent to Instana the next time when the application is started again after the crash. For more information, see MetricKit.
    • App ID needs to be a valid Apple App ID. Or else, the crash collection feature doesn't work.

Enabling crash collection in Android agent

Make sure that the Instana Android agent plugin and SDK are integrated in your Android application. For more information, see Android agent instructions.

Then, set the enableCrashReporting property to true when the Instana.setup() method is called. See the following example:

class ExampleApp : Application() {
    override fun onCreate() {
        super.onCreate()
        val instanaConfig = InstanaConfig(
            key = "GbYHxegG4gcgta",
            reportingURL = "https://instana-prod.io/mobile",
            enableCrashReporting = true
        )
        Instana.setup(this, instanaConfig)
    }
}

Enabling crash collection in iOS agent

To enable crash collection in iOS agent, complete the following steps:

Make sure that Instana iOS agent is installed. For more information, see the iOS agent instructions.

Then, set the enableCrashReporting property to true when the Instana.setup() method is called. See the following example:

import UIKit
import InstanaAgent

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication,
                   didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        // App needs to explicitly get user permission for collecting crash payloads before setting enableCrashReporting to true.
        let options = InstanaSetupOptions(enableCrashReporting: true)
        Instana.setup(
            key: "GbYHxegG4gcgta",
            reportingURL: URL(string: "https://instana-prod.io/mobile")!,
            options: options
        )
        return true
    }
}

Analyzing crashes in the Instana UI

After you enable crash collection for an application, when a crash occurs, the crash data is sent to Instana. You can start analyzing the crash data.

  1. Click Analytics in the Instana UI.

  2. In the Analytics page, click Mobile App > Crashes.

  3. Filter your application as follows:

    Screenshot showing the mobile App crash analytics view

    To see the crash details, expand the Crash section, and then you can see the stack trace. See the following screenshot:

    Screenshot showing the stack trace of a crash

    Instana can translate the stack trace into meaningful information by uploading the symbol files and source mapping files.