---
title: "Spotlight"
description: "Learn how to use Sentry Spotlight for local development observability on Android."
url: https://docs.sentry.io/platforms/android/integrations/spotlight/
---

# Spotlight | Sentry for Android

[Sentry Spotlight](https://spotlightjs.com/) is a local development tool that provides real-time observability for errors, traces, logs, and performance data during development. It allows you to see Sentry events in real-time without sending them to Sentry's servers, making it ideal for local debugging.

The `sentry-spotlight` module provides a `SpotlightIntegration` that sends a copy of all Sentry events to your local Spotlight instance. By using `debugImplementation`, you can ensure Spotlight is excluded from release builds, preventing insecure HTTP URLs from leaking into production APKs.

## [Install](https://docs.sentry.io/platforms/android/integrations/spotlight.md#install)

We recommend using `debugImplementation` so the Spotlight dependency is excluded from release builds:

```groovy
debugImplementation 'io.sentry:sentry-spotlight:8.43.1'
```

*Other available variations of the above snippet: kotlin*

If you need Spotlight in all build types, use `implementation` instead of `debugImplementation`.

## [Configure](https://docs.sentry.io/platforms/android/integrations/spotlight.md#configure)

**XML**

```xml
<application>
    <!-- Enable Spotlight -->
    <meta-data
    android:name="io.sentry.spotlight.enable"
    android:value="true"
  />
    <!-- Optional: override the default Spotlight URL -->
    <meta-data
    android:name="io.sentry.spotlight.url"
    android:value="http://10.0.2.2:8969/stream"
  />
</application>
```

**Java**

```java
import io.sentry.android.core.SentryAndroid;

SentryAndroid.init(this, options -> {
    options.setDsn("https://<key>@o<orgId>.ingest.sentry.io/<projectId>");
    options.setEnableSpotlight(true);
    // Optional: override the default Spotlight URL
    options.setSpotlightConnectionUrl("http://10.0.2.2:8969/stream");
});
```

**Kotlin**

```kotlin
import io.sentry.android.core.SentryAndroid

SentryAndroid.init(this) { options ->
    options.dsn = "https://<key>@o<orgId>.ingest.sentry.io/<projectId>"
    options.isEnableSpotlight = true
    // Optional: override the default Spotlight URL
    options.spotlightConnectionUrl = "http://10.0.2.2:8969/stream"
}
```

The default Spotlight URL is `http://10.0.2.2:8969/stream`. The `10.0.2.2` address is the Android emulator's bridge to the host machine's `localhost`. If you're running on a physical device, replace this with your machine's local IP address.

## [Verify](https://docs.sentry.io/platforms/android/integrations/spotlight.md#verify)

To verify the integration is working, capture a test exception and check the Spotlight UI:

```java
import io.sentry.Sentry;

Sentry.captureException(new Exception("Spotlight test from Android!"));
```

*Other available variations of the above snippet: kotlin*

Open the Spotlight UI and confirm that the error event appears.
