Spotlight
Learn how to use Sentry Spotlight for local development observability in your Java app.
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.
To install use:
implementation 'io.sentry:sentry-spotlight:8.34.0'
For other dependency managers, check out the central Maven repository.
application.propertiessentry.enable-spotlight=true
# Optional: override the default Spotlight URL (defaults to http://localhost:8969/stream)
sentry.spotlight-connection-url=http://localhost:8969/stream
import io.sentry.Sentry;
Sentry.init(options -> {
options.setDsn("___PUBLIC_DSN___");
options.setEnableSpotlight(true);
// Optional: override the default Spotlight URL (defaults to http://localhost:8969/stream)
options.setSpotlightConnectionUrl("http://localhost:8969/stream");
});
The default Spotlight URL is http://localhost:8969/stream. You only need to set spotlightConnectionUrl if your Spotlight instance is running on a different host or port.
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 Java!"));
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").