getsentry / spotlight

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

One Spotlight, Multiple Apps #409

Closed jd-carroll closed 1 week ago

jd-carroll commented 1 month ago

I am considering adopting spotlight in our development process as we move further down the Sentry adoption path. However, do I need a separate spotlight instance for each app?

Some context, all of our backend APIs are lambda functions and I've written a custom express server to act as a local API gateway and proxy web requests to the lambdas. Further our APIs have two layers a session and authentication layer and a separate logic layer. I.E. we got a whole bunch of lambdas.

Then there is whatever UI that we're working on locally as well.

Would it be possible to have a single spotlight instance locally and have 30 - 40 separate processes connect to it?

Appreciate any insight!

Shubhdeep12 commented 1 month ago

Hi @jd-carroll,

Yes, it is possible to load any number of processes and track the events and traces in Spotlight within a single instance.

For some context: we use Sidecar, which is a standalone SSE server hosted locally on port 8969 by default. Once Spotlight is enabled during the Sentry initialization (sentry.init), Sidecar receives all information from the Sentry SDK. ref- https://spotlightjs.com/setup/

Here's what you can do:

By default, each Sentry SDK will send data to localhost:8969, allowing you to receive Sentry events from all apps.

Additionally, we have a Spotlight app for macOS, which you can download here. This app is an ideal solution for your case, as it allows you to initialize Spotlight wherever needed and view all traces in the Spotlight app.

For more information, you can visit this docs.

BYK commented 1 month ago

@jd-carroll does @Shubhdeep12's response answer your question? If not how can we help?