Get Started
Pull down the repo (or your fork):
git clone https://github.com/getsentry/spotlight.gitSpotlight relies on a pnpm monorepo. You’ll need to install pnpm to get things going, which can be done with Volta.
Ensure the node and pnpm are available:
volta install node pnpmInstall the package requirements:
pnpm installAnd finally, run an initial build:
pnpm buildDevelopment
Section titled “Development”Depending on what you’re doing there’s two paths to develop against Spotlight.
With existing data
Section titled “With existing data”If you just want to test things out with some example traces and errors you can spin up the Spotlight repo into watch mode:
pnpm devSend sample fixtures to the sidecar with:
pnpm run --filter @spotlightjs/spotlight sampleThis will send all the sample data to Spotlight. You can also pick a specific file and pass that as an argument to the script instead:
pnpm run --filter @spotlightjs/spotlight sample envelope_php_error.txtLinking against an existing project
Section titled “Linking against an existing project”Additionally you may want to link it into an existing project. This is a little brittle, and we’re not experts here, so your mileage may vary.
First, when in the Spotlight root directory, you’ll need to link the packages you’re referencing (likely @spotlightjs/spotlight):
pnpm link --global -C packages/spotlightYou can now link these within your project. For example if you’re using pnpm:
pnpm link --global @spotlightjs/spotlightRepository Structure
Section titled “Repository Structure”The monorepo is mostly straight forward, but here’s a quick summary:
spotlight└── packages ├── spotlight // @spotlightjs/spotlight - main package (UI, sidecar, CLI, Electron app) └── website // @spotlightjs/website - documentation website