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.gradledebugImplementation 'io.sentry:sentry-spotlight:8.34.0'
If you need Spotlight in all build types, use implementation instead of debugImplementation.
<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>
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.
To verify the integration is working, capture a test exception and check the Spotlight UI:
import io.sentry.Sentry;
Sentry.captureException(new Exception("Spotlight test from Android!"));
Open the Spotlight UI and confirm that the error event appears.
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").