open-index/open-npm huggingface dataset:
npm package: @spotlightjs/sidecar
Description: A small proxy server to capture and forward data from backend services to Spotlight.
Latest version: 2.5.0

# Spotlight Sidecar

The Spotlight Sidecar is a small proxy server that allows (development) servers to send data to Spotlight.

## Installation

```js
npm install @spotlightjs/sidecar
```

## Usage

### As a Library

```js
import { setupSidecar } from '@spotlightjs/sidecar';

// When you start your dev server
await setupSidecar();
```

### As a CLI

```bash
# Start with default settings (port 8969)
spotlight-sidecar

# Start on a custom port
spotlight-sidecar --port 3000
# or
spotlight-sidecar -p 3000

# Enable debug logging
spotlight-sidecar --debug
# or
spotlight-sidecar -d

# Combine options
spotlight-sidecar --port 3000 --debug

# Show help
spotlight-sidecar --help
```

### CLI Options

- `-p, --port <port>` - Port to listen on (default: 8969)
- `-d, --debug` - Enable debug logging
- `-h, --help` - Show help message

## MCP (Model Context Protocol) Integration

Spotlight Sidecar includes MCP tools for accessing local debugging data through Claude Code and other MCP clients.

### Available Tools

#### 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

### Trace Viewing Workflow

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
   ```

### Prerequisites

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.)

### Example Usage

```bash
# Start sidecar with debug logging to see trace data flow
spotlight-sidecar --debug

# In 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" })
```
npm package: @spotlightjs/spotlight
Description: Spotlight - Sentry for development. Containing the UI, sidecar, and electron app.
Author: Sentry
Latest version: 4.11.3

# `@spotlightjs/spotlight`

This package combines the UI from `@spotlightjs/overlay` and the sidecar from `@spotlightjs/sidecar`.

This is the package to use for Spotlight.
npm package: @spotlightjs/spotlight-astro-playground
Description: Playground for testing Spotlight in an Astro SSR app with islands
Latest version: 0.0.0

# Astro Starter Kit: Basics

```sh
npm create astro@latest -- --template basics
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!

![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── public/
│   └── favicon.svg
├── src/
│   ├── components/
│   │   └── Card.astro
│   ├── layouts/
│   │   └── Layout.astro
│   └── pages/
│       └── index.astro
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file
name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact
components.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command                   | Action                                           |
| :------------------------ | :----------------------------------------------- |
| `npm install`             | Installs dependencies                            |
| `npm run dev`             | Starts local dev server at `localhost:4321`      |
| `npm run build`           | Build your production site to `./dist/`          |
| `npm run preview`         | Preview your build locally, before deploying     |
| `npm run astro ...`       | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI                     |

## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our
[Discord server](https://astro.build/chat).