Already using Sentry for Android? Here are some recent highlights

We just released a new Logcat integration, which automatically creates breadcrumbs for your android.util.Log.* calls.

Using Jetpack Compose? Measure composition and rendering time of your @Composable functions using our performance metrics for Jetpack Compose.

Let us know if you have feedback through GitHub issues.

On this page, we get you up and running with Sentry's SDK, so that it will automatically report errors and exceptions in your application.

Don't already have an account and Sentry project established? Head over to, then return to this page.


Sentry captures data by using an SDK within your application’s runtime.

The easiest way to get started is to install the Sentry Android Gradle plugin to your app module's build.gradle file.

buildscript {
  repositories {

plugins {
  id ""
  id "" version "3.10.0"

The plugin version 3.10.0 will automatically add the Sentry Android SDK (version 6.22.0) to your app.


Configuration is done via the application AndroidManifest.xml Here's an example config which should get you started:

  <!-- Required: set your project identifier (DSN) -->
  <meta-data android:name="io.sentry.dsn" android:value="" />

  <!-- enable automatic breadcrumbs for user interactions (clicks, swipes, scrolls) -->
  <meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="true" />
  <!-- enable screenshot for crashes -->
  <meta-data android:name="io.sentry.attach-screenshot" android:value="true" />
  <!-- enable view hierarchy for crashes -->
  <meta-data android:name="io.sentry.attach-view-hierarchy" android:value="true" />

  <!-- enable the performance API by setting a sample-rate, adjust in production env -->
  <meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
  <!-- enable profiling when starting transactions, adjust in production env -->
  <meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" />

Under the hood Sentry uses a ContentProvider to initalize the SDK based on the values provided above. This way the SDK can capture important crashes and metrics right from the app start.

Additional options can be found on our dedicated options page.

If you want to customize the SDK init behaviour, you can still use the Manual Initialization method.


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

import android.os.Bundle;
import java.lang.Exception;
import io.sentry.Sentry;

public class MyActivity extends AppCompatActivity {
  protected void onCreate(Bundle savedInstanceState) {
    try {
      throw new Exception("This is a test.");
    } catch (Exception e) {

To view and resolve the recorded error, log into and open your project. 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").