Spotlight is built that you don’t need Sentry to run it. It can contain any kind of integration. However, Sentry is the first integration we’ve built for Spotlight and it’s a great way to get started .
If you want your Sentry SDKs to talk to the Sidecar, enable the spotlight
setting. You don’t need a dsn
for Spotlight to work.
In the Browser you don’t need to set spotlight: true
, Spotlight.init()
will automatically detect if Sentry is available and if so, hook into the SDK.
// In the frontend it's important that you init Spotlight after Sentry
spotlight: process . env . NODE_ENV === " development " ,
# You should only load this in your development environment
spotlight = bool ( os.environ. get ( " DEV " )) ,
// You should only load this in your development environment
' spotlight ' => App :: environment ([ ' local ' ]),
# You should only load this in your development environment
config.spotlight = Rails .env.development?
// You should only load this in your development environment
o . EnableSpotlight = true ;
SentryAndroid. init ( this , options -> {
options. setDsn ( "___DSN___" );
// You should only enable this in your development environment
options.isEnableSpotlight = BuildConfig.DEBUG;
You also need to allow cleartext traffic from your emulator to the Sidecar on your host machine by adding the following to src/debug/res/xml/network.xml
:
<? xml version = " 1.0 " encoding = " utf-8 " ?>
< network-security-config >
< domain-config cleartextTrafficPermitted = " true " >
<!-- Allow cleartext traffic from the emulator to the host machine -->
<!-- See https://developer.android.com/studio/run/emulator-networking for more details -->
< domain includeSubdomains = " true " > 10.0.2.2 </ domain >
</ network-security-config >
SentrySDK.start { options in
options. dsn = " ___DSN___ "
// You should only enable this in your development environment
options. enableSpotlight = true
enableSpotlight: __DEV__,
await SentryFlutter . init ((options) {
options.dsn = '___DSN___' ;
// You should only enable this in your development environment
options.spotlight = Spotlight (enabled : kDebugMode);