Skip to content
Codeskop

Crash Reporting

Crashes are captured as soon as the SDK starts. There's nothing to set up beyond initialization.

What's captured

  • Crashes: any uncaught Kotlin or Java exception, on any thread, with its full stack trace and the name of the thread it happened on.
  • Native crashes: crashes in native (C/C++) code, reported by Android itself on Android 11 (API 30) and higher.
  • Handled exceptions: errors you catch and report with Codeskop.recordException.

How a crash reaches you

  1. When an uncaught exception is about to end the process, the SDK saves it to the on-device queue. It waits for that write to finish, so the crash is on disk before the app dies.
  2. It then hands the exception to the crash handler that was already installed, so Android and any other crash tool behave exactly as before.
  3. The crash is uploaded at the next sync, usually after the user reopens the app and has a connection.

Native crashes work differently. Android records why the process ended, and on the next launch the SDK reads that record and reports it. Each crash is reported once. Native crashes include Android's description of the exit, but no Kotlin stack trace.

Handled exceptions

Report errors you recover from, so you can see how often they happen:

Kotlin
import com.codeskop.sdk.core.Codeskop try {    checkout.submit(order)} catch (e: PaymentException) {    Codeskop.recordException(e)   // reported as a handled exception    showRetry()}

recordException never throws. You don't need to wrap it in your own try/catch.

Context attached to every crash

  • Device model, manufacturer, Android version, locale and screen size
  • App package name, version name, version code, and whether it's a debug or release build
  • The user, if you've called identify, or the anonymous install ID if not
  • The SDK version

Exception messages are redacted by default

Exception messages often contain user input or personal data, so they're replaced with [REDACTED] before they leave the device. You still get the exception class and the full stack trace, which is what grouping and debugging rely on. If your messages are safe to collect, turn them on with captureExceptionMessages (Android 0.2.0+).

Reliability guarantees

  • Never sampled. Crashes are kept whatever sampling rates you set.
  • Never dropped for space. If the queue fills up, older low-priority events are removed first. Crashes stay.
  • Survive being offline. Crashes wait on the device until there's a connection.

Using Codeskop with other crash tools

Codeskop chains onto whatever uncaught-exception handler was installed before it, and always passes the crash along. Tools such as Firebase Crashlytics keep working. Codeskop never swallows a crash and never stops your app from terminating.

Next steps