Spotlight

Learn how to use Sentry Spotlight for local development observability on Android.

Sentry Spotlight 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.

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

app/build.gradle
Copied
debugImplementation 'io.sentry:sentry-spotlight:8.34.0'

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

Copied
<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>

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

Copied
import io.sentry.Sentry;

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

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

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