---
title: "Spotlight"
description: "Learn how to use Sentry Spotlight for local development observability in your Java app."
url: https://docs.sentry.io/platforms/java/integrations/spotlight/
---

# Spotlight | Sentry for Java

[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/integrations/spotlight.md#install)

To install use:

**Gradle**

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

**Maven**

```xml
<dependency>
    <groupId>io.sentry</groupId>
    <artifactId>sentry-spotlight</artifactId>
    <version>8.42.0</version>
</dependency>
```

**SBT**

```scala
libraryDependencies += "io.sentry" % "sentry-spotlight" % "8.42.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/integrations/spotlight.md#configure)

**\[Properties] 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**

```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");
});
```

**Kotlin**

```kotlin
import io.sentry.Sentry

Sentry.init { options ->
    options.dsn = "___PUBLIC_DSN___"
    options.isEnableSpotlight = true
    // Optional: override the default Spotlight URL (defaults to http://localhost:8969/stream)
    options.spotlightConnectionUrl = "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/integrations/spotlight.md#verify)

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

**java**

```java
import io.sentry.Sentry;

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

**kotlin**

```kotlin
import io.sentry.Sentry

Sentry.captureException(Exception("Spotlight test from Java!"))
```

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