The sentry-android-timber library provides Timber support for Sentry via Timber Tree that sends events and breadcrumbs to Sentry. Once this integration is configured you can use Timber’s static API.

The source can be found on GitHub.


  1. In order to add the Timber integration, you have to do a manual initialization of the Android SDK.

  2. Add the sentry-android-timber dependency

    Using Gradle:

    implementation 'io.sentry:sentry-android:3.1.0'
    implementation 'io.sentry:sentry-android-timber:3.1.0'
  3. Initialize and add the SentryTimberIntegration

    SentryAndroid.init(context) { options ->
        if (!BuildConfig.DEBUG) {
            // default values:
            // minEventLevel = ERROR
            // minBreadcrumbLevel = INFO
                minEventLevel = SentryLevel.ERROR,
                minBreadcrumbLevel = SentryLevel.INFO))


The following example adds a breadcrumb and captures an error using the Timber’s static API; this breadcrumb and error will be forwarded to Sentry.

fun division(x: Int = 5, y: Int = 0): Int {
    Timber.i("x = $x, y = $y")

    try {
        return x / y
    } catch (e: ArithmeticException) {
        Timber.e(e, "Division error")
    return 0
You can edit this page on GitHub.