From 4b44f910ff9fc15cbe6ffbb193388b007eea312c Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Tue, 10 Feb 2026 11:11:18 +0100 Subject: [PATCH 1/3] docs(java, android): Add Spotlight integration docs Add documentation for the new `sentry-spotlight` module extracted in sentry-java#5064 (available from 8.32.0). Covers install, configure, and verify sections for both Android and Java platforms. Co-Authored-By: Claude --- .../android/integrations/spotlight/index.mdx | 79 +++++++++++++++++ .../java/common/integrations/spotlight.mdx | 84 +++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 docs/platforms/android/integrations/spotlight/index.mdx create mode 100644 docs/platforms/java/common/integrations/spotlight.mdx diff --git a/docs/platforms/android/integrations/spotlight/index.mdx b/docs/platforms/android/integrations/spotlight/index.mdx new file mode 100644 index 0000000000000..93018cf8290b8 --- /dev/null +++ b/docs/platforms/android/integrations/spotlight/index.mdx @@ -0,0 +1,79 @@ +--- +title: Spotlight +description: "Learn how to use Sentry Spotlight for local development observability on Android." +--- + +[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. By using `debugImplementation`, you can ensure Spotlight is excluded from release builds, preventing insecure HTTP URLs from leaking into production APKs. + +## Install + +We recommend using `debugImplementation` so the Spotlight dependency is excluded from release builds: + +```groovy {filename:app/build.gradle} +debugImplementation 'io.sentry:sentry-spotlight:{{@inject packages.version('sentry.java.spotlight', '8.32.0') }}' +``` + +```kotlin {filename:app/build.gradle.kts} +debugImplementation("io.sentry:sentry-spotlight:{{@inject packages.version('sentry.java.spotlight', '8.32.0') }}") +``` + +If you need Spotlight in all build types, use `implementation` instead of `debugImplementation`. + +## Configure + +```xml {tabTitle:XML} + + + + + + +``` + +```java {tabTitle:Java} +import io.sentry.android.core.SentryAndroid; + +SentryAndroid.init(this, options -> { + options.setDsn("___PUBLIC_DSN___"); + options.setEnableSpotlight(true); + // Optional: override the default Spotlight URL + options.setSpotlightConnectionUrl("http://10.0.2.2:8969/stream"); +}); +``` + +```kotlin {tabTitle:Kotlin} +import io.sentry.android.core.SentryAndroid + +SentryAndroid.init(this) { options -> + options.dsn = "___PUBLIC_DSN___" + options.isEnableSpotlight = true + // Optional: override the default Spotlight URL + options.spotlightConnectionUrl = "http://10.0.2.2:8969/stream" +} +``` + + + +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. + + + +## 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 Android!")); +``` + +```kotlin +import io.sentry.Sentry + +Sentry.captureException(Exception("Spotlight test from Android!")) +``` + +Open the Spotlight UI and confirm that the error event appears. diff --git a/docs/platforms/java/common/integrations/spotlight.mdx b/docs/platforms/java/common/integrations/spotlight.mdx new file mode 100644 index 0000000000000..8437654e846bf --- /dev/null +++ b/docs/platforms/java/common/integrations/spotlight.mdx @@ -0,0 +1,84 @@ +--- +title: Spotlight +description: "Learn how to use Sentry Spotlight for local development observability in your Java app." +--- + +[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 + +To install use: + +```groovy {tabTitle:Gradle} +implementation 'io.sentry:sentry-spotlight:{{@inject packages.version('sentry.java.spotlight', '8.32.0') }}' +``` + +```xml {tabTitle:Maven} + + io.sentry + sentry-spotlight + {{@inject packages.version('sentry.java.spotlight', '8.32.0') }} + +``` + +```scala {tabTitle: SBT} +libraryDependencies += "io.sentry" % "sentry-spotlight" % "{{@inject packages.version('sentry.java.spotlight', '8.32.0') }}" +``` + +For other dependency managers, check out the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-spotlight). + +## Configure + +```text {tabTitle:application.properties} {filename:application.properties} +sentry.enable-spotlight=true +# Optional: override the default Spotlight URL (defaults to http://localhost:8969/stream) +sentry.spotlight-connection-url=http://localhost:8969/stream +``` + +```java {tabTitle: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 {tabTitle: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 + +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!")); +``` + +```kotlin +import io.sentry.Sentry + +Sentry.captureException(Exception("Spotlight test from Java!")) +``` + +Open the Spotlight UI and confirm that the error event appears. From ca861b2ea7f4cdb1aaf3eaa52aaa27f6e00bfc1a Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Tue, 10 Feb 2026 12:19:48 +0100 Subject: [PATCH 2/3] Apply suggestion from @romtsn --- docs/platforms/java/common/integrations/spotlight.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/java/common/integrations/spotlight.mdx b/docs/platforms/java/common/integrations/spotlight.mdx index 8437654e846bf..ce4103e12eb50 100644 --- a/docs/platforms/java/common/integrations/spotlight.mdx +++ b/docs/platforms/java/common/integrations/spotlight.mdx @@ -31,7 +31,7 @@ For other dependency managers, check out the [central Maven repository](https:// ## Configure -```text {tabTitle:application.properties} {filename:application.properties} +```text {tabTitle:Properties} {filename:application.properties} sentry.enable-spotlight=true # Optional: override the default Spotlight URL (defaults to http://localhost:8969/stream) sentry.spotlight-connection-url=http://localhost:8969/stream From 794714f9cb63c720c59255be676b4fa536f4ee7f Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Tue, 10 Feb 2026 15:16:25 +0100 Subject: [PATCH 3/3] Use conditional snippet for spring-boot --- .../java/common/integrations/spotlight.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/platforms/java/common/integrations/spotlight.mdx b/docs/platforms/java/common/integrations/spotlight.mdx index ce4103e12eb50..b5a2e052d684a 100644 --- a/docs/platforms/java/common/integrations/spotlight.mdx +++ b/docs/platforms/java/common/integrations/spotlight.mdx @@ -31,12 +31,26 @@ For other dependency managers, check out the [central Maven repository](https:// ## Configure + + ```text {tabTitle:Properties} {filename:application.properties} sentry.enable-spotlight=true # Optional: override the default Spotlight URL (defaults to http://localhost:8969/stream) sentry.spotlight-connection-url=http://localhost:8969/stream ``` + + + + +```text {tabTitle:Properties} {filename:sentry.properties} +enable-spotlight=true +# Optional: override the default Spotlight URL (defaults to http://localhost:8969/stream) +spotlight-connection-url=http://localhost:8969/stream +``` + + + ```java {tabTitle:Java} import io.sentry.Sentry;