# Spotlight | Sentry for Logback

[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.

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

To install use:

```groovy
implementation 'io.sentry:sentry-spotlight:8.33.0'
```

For other dependency managers, check out the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-spotlight).

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

`sentry.properties`

```text
enable-spotlight=true
# Optional: override the default Spotlight URL (defaults to http://localhost:8969/stream)
spotlight-connection-url=http://localhost:8969/stream
```

```java
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.

## [Verify](https://docs.sentry.io/platforms/java/guides/logback/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 Java!"));
```

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