Crash collection (technology preview)
Instana provides a crash analysis process for mobile application developers to detect, understand and fix crashes as soon as possible. This feature helps to minimize the number of affected users and reduce the negative impact of crashes.
- Supported technologies
- Things to note
- Enabling crash collection in Android agent
- Enabling crash collection in iOS agent
- Analyzing crashes in the Instana UI
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.1 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.0 or later
Things to note
- Android
- Symbolication for Android crashes is not supported yet.
- 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 launched again after the crash. For more information, see MetricsKit.
- 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 {
Instana.setup(
key: "GbYHxegG4gcgta",
reportingURL: URL(string: "https://instana-prod.io/mobile")!,
enableCrashReporting: true
)
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.
-
Click Analytics in the Instana UI.
-
In the Analytics page, click Mobile App > Crashes.
-
Filter your application as follows:
To see the crash details, expand the Crash section, and then you can see the stack trace. See the following screenshot: