Spotlight
Forward Sentry events to Spotlight for local debugging during development.
(Available in version 6.0.0 and above)
Import name: Sentry.spotlightIntegration
The spotlightIntegration forwards Sentry events to Spotlight, a local debugging tool that lets you inspect errors, traces, and other Sentry data during development.
Note
When using the spotlight option in Sentry.init(), the integration is only added in development (__DEV__ mode). If you add the integration manually via the integrations array, it will be active in any environment.
Enable Spotlight by passing spotlight: true in your Sentry.init() options (recommended — this ensures it is only active in development):
import * as Sentry from "@sentry/react-native";
Sentry.init({
dsn: "___PUBLIC_DSN___",
spotlight: true,
});
import * as Sentry from "@sentry/react-native";
Sentry.init({
dsn: "___PUBLIC_DSN___",
spotlight: true,
});
By default, the integration connects to a Spotlight Sidecar at http://localhost:8969/stream. If your Sidecar runs at a different URL, pass it directly:
Sentry.init({
dsn: "___PUBLIC_DSN___",
spotlight: "http://my-host:8969/stream",
});
Sentry.init({
dsn: "___PUBLIC_DSN___",
spotlight: "http://my-host:8969/stream",
});
The integration auto-detects the dev server hostname when available, so it works with devices and emulators connected to your development machine.
When enabled, the integration intercepts envelopes before they are sent to Sentry and forwards them to the Spotlight Sidecar via HTTP. Events are still sent to Sentry as normal — Spotlight receives a copy for local inspection.
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").