A small proxy server to capture and forward data from backend services to Spotlight.
npm install @spotlightjs/sidecarThe Spotlight Sidecar is a small proxy server that allows (development) servers to send data to Spotlight.
``js`
npm install @spotlightjs/sidecar
`js
import { setupSidecar } from '@spotlightjs/sidecar';
// When you start your dev server
await setupSidecar();
`
`bashStart with default settings (port 8969)
spotlight-sidecar
$3
-
-p, --port - Port to listen on (default: 8969)
- -d, --debug - Enable debug logging
- -h, --help - Show help messageMCP (Model Context Protocol) Integration
Spotlight Sidecar includes MCP tools for accessing local debugging data through Claude Code and other MCP clients.
$3
#### Error Debugging
-
search_errors - Retrieve recent application errors with stack traces
- search_logs - Access application logs for behavior analysis#### Performance & Tracing
-
search_traces - List recent traces with performance summaries
- get_traces - Get detailed span tree and timing for specific traces$3
1. List Recent Traces
`
Use search_traces to see trace summaries:
- Trace IDs (first 8 characters shown)
- Root transaction names
- Duration and span counts
- Error counts per trace
- Timestamps for debugging specific periods
`2. Examine Specific Trace
`
Use get_traces with a trace ID:
- Complete hierarchical span tree
- Individual span durations and operations
- Error context within trace timeline
- Chronological flow of operations
`$3
To see trace data, ensure your application has:
- Sentry SDK with performance monitoring enabled
- Transaction instrumentation generating trace events
- Recent activity that creates spans (API calls, database queries, etc.)
$3
`bash
Start sidecar with debug logging to see trace data flow
spotlight-sidecar --debugIn Claude Code or MCP client:
1. List recent traces
search_traces({ filters: { timeWindow: 300 } })2. Get details for a specific trace
get_traces({ traceId: "71a8c5e4" })
``