Skip to content
Telebugs Telebugs Self-hosted error tracking for your apps telebugs.com

Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The Telebugs Manual

Android crash reporting

Available in Telebugs 2.3.0 and later.

Connect the Sentry Android SDK to your Telebugs project to collect Kotlin and Java exceptions, application freezes (ANRs) and crashes in native libraries. Start with a handled exception, then set up uploads for the builds you distribute.

Send your first report

  1. Create an Android project in Telebugs and copy its DSN.
  2. Add the Sentry Android SDK to your app module’s dependencies. For example, in Groovy use implementation "io.sentry:sentry-android:8.65.1". This is the version used on the test phone. If your app already initializes the SDK, keep that integration.
  3. With default SDK initialization, put the DSN inside <application> in AndroidManifest.xml.
<meta-data android:name="io.sentry.dsn" android:value="YOUR_TELEBUGS_PROJECT_DSN" />

Run this from a test button on a device. Open the project in Telebugs and look for Android setup test.

import io.sentry.Sentry

// Inside the test button’s click handler
Sentry.captureException(IllegalStateException("Android setup test"))

The SDK captures uncaught exceptions automatically. Enable its ANR integration to capture main-thread hangs and its NDK integration if you ship native libraries. Reopen the app after a fatal crash or freeze to let the SDK deliver a saved report.

Upload the mapping with each release build

R8 can rename classes, optimize methods and inline calls. The mapping translates a release build’s stack back to your code. Keep the mapping and its identifier for every APK or app bundle you distribute, even if multiple builds use the same version name and code.

In the app module’s Groovy build.gradle, apply the Sentry Android Gradle plugin. For example, add id "io.sentry.android.gradle" version "6.27.0" to the existing plugins block. If the build already declares the plugin version centrally, use that declaration. Then add the following sentry block. Supply SENTRY_URL (your installation’s origin), SENTRY_PROJECT (the numeric project ID) and SENTRY_AUTH_TOKEN (a project member’s account API key) in the build environment. Keep the key in your CI secret store. The DSN is the only credential the running app needs.

sentry {
    url = System.getenv("SENTRY_URL")
    org = "telebugs"
    projectName = System.getenv("SENTRY_PROJECT")
    includeProguardMapping = true
    autoUploadProguardMapping = true
    includeSourceContext = true
}

Build the minified release variant with this configuration. The plugin embeds the mapping identifier and uploads the matching file. Keep the source file and line number attributes in your R8 configuration to recover available file names and lines. The optional includeSourceContext setting uploads the Java or Kotlin source in a separate bundle so that Telebugs can show the lines around the failing call. Omit it to keep source code out of the upload.

Upload an older build’s mapping

Use the mapping UUID embedded in the shipped app’s sentry-debug-meta.properties. With the same URL, project and token as above, run this in your build environment.

export SENTRY_ORG=telebugs
sentry-cli upload-proguard --uuid "$MAPPING_UUID" app/build/outputs/mapping/release/mapping.txt

You can also name the file <mapping-uuid>.txt and upload it in Project settings → Debug symbols. A plain mapping.txt uses an identifier derived from the file contents, which can differ from the one in the app. For automation with raw file bytes, see the Debug Symbols API.

Read a freeze or exception

For an Application Not Responding report, find the main thread and follow its stack to your app’s call site. A frame in a system library can show what the thread was doing, while the calling app frame shows which code requested it.

For a Kotlin or Java exception, select Symbolicated to read the resolved stack. Original shows the frames the SDK sent. If an older report still has shortened names, check that its build’s mapping is Ready in the same project. Matching uploads update existing reports. A source bundle adds available snippets to both minified and unminified frames.

Resolve a crash in a native library

Some apps include C or C++ libraries directly or through dependencies. Keep the symbols for each library build and each CPU architecture (ABI) you distribute. For a third-party library, ask its vendor for the matching symbols. Kotlin and Java frames use the mapping workflow above.

In a Gradle release build, set ndk.debugSymbolLevel = "FULL" to retain available file and line information. "SYMBOL_TABLE" supplies function names. Upload unstripped ELF libraries or the build’s native debug symbols ZIP. With the same CLI credentials, run the following for a directory of unstripped libraries.

sentry-cli debug-files upload --wait /path/to/unstripped/libraries

Matching Breakpad .sym files can supply native functions and lines, too. Telebugs can read a Crashpad or Breakpad minidump sent through the project’s Sentry minidump endpoint or as a minidump envelope attachment. If a report resolves only some frames, check the build IDs and ABIs of the remaining libraries. A later upload with fuller debug information can fill in those frames.

If the SDK also attached a screenshot, view hierarchy or custom file, open Attachments on the report to download it.