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.

Auto-Installation With the Sentry Android Gradle Plugin


Starting from version 3.1.0, the Sentry Android Gradle plugin will automatically add the sentry-android-timber dependency. The plugin will only add the sentry-android-timber dependency if a timber dependency was discovered on the classpath.

Add the Sentry Android Gradle plugin in build.gradle:

buildscript {
  repositories {

plugins {
  id "io.sentry.android.gradle" version "3.13.0"

Then, initialize the Android SDK.

The Android SDK automatically adds the SentryTimberIntegration if the sentry-android-timber dependency was found on the classpath. The integration is added with minEventLevel set to ERROR and minBreadcrumbLevel set to INFO.

However, you can still override the default behaviour by adding your own instance of the SentryTimberIntegration. For that, refer to the manual installation section below.


If you want to disable the Timber integration (to not exceed your event

quotaThe monthly number of events that you pay Sentry to track.
, for example), but keep using other auto-installation features, remove the sentry-android-timber dependency from the app configurations in app/build.gradle:

configurations.configureEach {
  exclude group: "io.sentry", module: "sentry-android-timber"

Manual Installation


To add the Timber integration, manually initialize the Android SDK, then add the sentry-android-timber dependency. Using Gradle:

implementation 'io.sentry:sentry-android:6.30.0'
implementation 'io.sentry:sentry-android-timber:6.30.0'


Configuration should happen as early as possible in your application's lifecycle.

import io.sentry.android.core.SentryAndroid
import io.sentry.android.timber.SentryTimberIntegration
import timber.log.Timber
// import BuildConfig

SentryAndroid.init(this) { options ->
  if (!BuildConfig.DEBUG) {

    // default values:
    // minEventLevel = ERROR
    // minBreadcrumbLevel = INFO
        minEventLevel = SentryLevel.ERROR,
        minBreadcrumbLevel = SentryLevel.INFO
  } else {


This snippet captures an intentional error, so you can test that everything is working as soon as you set it up:

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import java.lang.Exception
import timber.log.Timber

class MyActivity : AppCompatActivity() {
  override fun onCreate(savedInstanceState: Bundle?) {
    try {
      throw Exception("This is a test.")
    } catch (e: Exception) {

To view and resolve the recorded message, log into sentry.io and open your

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").