Development and Debugging
Capture data sent to the Sidecar
Section titled “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/spotlight/_fixtures and used for testing.
Also, they can be attached to Github issues to reproduce bugs.
Send sample data to Spotlight
Section titled “Send sample data to Spotlight”If you run pnpm sample in ./packages/spotlight it will send a sample event to the Sidecar and therefore to Spotlight.
All .txt files that are contained in ./packages/spotlight/_fixtures will be sent.
This can be very handy when testing Spotlight locally.
Browser Debug Console
Section titled “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.
Inspect Sidecar Stream
Section titled “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' --verboseThis command will stream the envelopes as they arrive, allowing you to verify what data is being processed by the Sidecar in real time.