Development and Debugging
Capture data sent to the Sidecar
You can run the Sidecar with SPOTLIGHT_CAPTURE=1
to write the captured data to a file.
So for example if any Sentry SDK sends an envelope to the Sidecar, it will be written to a file in the current directory looking like this: application_x_sentry_envelope-1701167447043.txt
.
All these files can be put into ./packages/overlay/_fixtures
and used for testing.
Also, they can be attached to Github issues to reproduce bugs.
Send sample data to Spotlight
If you run pnpm sample
in ./packages/overlay
it will send a sample event to the Sidecar and therefore to Spotlight.
All .txt
files that are contained in ./packages/overlay/_fixtures
will be sent.
This can be very handy when testing Spotlight locally.
Browser Debug Console
To get detailed browser console logs for debugging, open the following URL in your browser while the Sidecar is running:
This will enable advanced debug output in the browser console.
Tip: This is especially useful for inspecting Sidecar behavior. (It may also work with the Overlay, but is primarily intended for the Sidecar.)
Inspect Sidecar Stream
You can directly inspect the raw envelopes received by the Sidecar using curl
:
curl http://localhost:8969/stream -H 'Accept: text/event-stream' --verbose
This command will stream the envelopes as they arrive, allowing you to verify what data is being processed by the Sidecar in real time.