getsentry / spotlight

Your Universal Debug Toolbar
https://spotlightjs.com
Other
377 stars 11 forks source link

Difference between spotlight config and Sentry.spotlightIntegration() #535

Closed sergical closed 1 month ago

sergical commented 1 month ago

Not sure which one to use where 😅

Sentry.init({
  spotlight: process.env.NODE_ENV === 'development'
  // vs
  integrations: [Sentry.spotlightIntegration()]
});
BYK commented 1 month ago

Well, this is more of a question/issue for getsentry/sentry-javascript repo. That said they are equivalent :)

Setting something on spotlight enables the integration with the correct values so you just need that.

The special case is for the browser SDK as we chose not to include the Spotlight integration in the main bundle in the interest of smaller default bundle sizes. I'm looking into ways of being able to use spotlight: true there too with some lazy loading magic.