Skip to content

Commit 05b34b3

Browse files
authored
Fix(docs): Small fixes for the new features (#1088)
- Removed `-sidecar` from a bunch of places - Marked overlay options as deprecated - Correct the default logging formatter in docs - Update examples
1 parent 149cbec commit 05b34b3

File tree

7 files changed

+47
-223
lines changed

7 files changed

+47
-223
lines changed

packages/sidecar/src/cli/help.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function showHelp() {
55
console.log(`
66
Spotlight Sidecar - Development proxy server for Spotlight
77
8-
Usage: spotlight-sidecar [command] [options]
8+
Usage: spotlight [command] [options]
99
1010
Commands:
1111
tail [types...] Tail Sentry events (default: everything)
@@ -17,19 +17,19 @@ Commands:
1717
Options:
1818
-p, --port <port> Port to listen on (default: 8969, or 0 for random)
1919
-d, --debug Enable debug logging
20-
-f, --format <format> Output format for tail command (default: logfmt)
20+
-f, --format <format> Output format for tail command (default: human)
2121
Available formats: ${[...AVAILABLE_FORMATTERS].join(", ")}
2222
-h, --help Show this help message
2323
2424
Examples:
25-
spotlight-sidecar # Start on default port 8969
26-
spotlight-sidecar tail # Tail all event types (logfmt format)
27-
spotlight-sidecar tail errors # Tail only errors
28-
spotlight-sidecar tail errors logs # Tail errors and logs
29-
spotlight-sidecar tail --format logfmt # Explicitly use logfmt format
30-
spotlight-sidecar mcp # Start in MCP mode
31-
spotlight-sidecar --port 3000 # Start on port 3000
32-
spotlight-sidecar -p 3000 -d # Start on port 3000 with debug logging
25+
spotlight # Start on default port 8969
26+
spotlight tail # Tail all event types (human format)
27+
spotlight tail errors # Tail only errors
28+
spotlight tail errors logs # Tail errors and logs
29+
spotlight tail --format json # Explicitly use json format
30+
spotlight mcp # Start in MCP mode
31+
spotlight --port 3000 # Start on port 3000
32+
spotlight -p 3000 -d # Start on port 3000 with debug logging
3333
`);
3434
process.exit(0);
3535
}

packages/website/src/content/docs/docs/architecture.mdx

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,41 @@ import Architecture from "../../../../public/images/simple-event-flow.png";
1111

1212
At a high level, Spotlight consists of two components:
1313

14-
1. An overlay (`@spotlightjs/overlay`) that renders inside of your application. The overlay is a simple React application, and can
15-
seamlessly run in any web application (or even independently!).
14+
1. A standalone UI (`@spotlightjs/overlay`) that runs independently in your browser or as a desktop application. The UI is a React application that displays your application's telemetry data in real-time.
1615

17-
2. A proxy server (`@spotlightjs/sidecar`) which enables push-based communication to the overlay. This is achieved via a simple HTTP relay,
18-
allowing SDKs to push events to it, and allowing the overlay to receive events using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events).
16+
2. A proxy server (`@spotlightjs/sidecar`) which receives telemetry from your application and streams it to the UI. This is achieved via a simple HTTP relay, allowing SDKs to push events to it, and allowing the UI to receive events using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events).
1917

20-
For convenience, these packages are combined in a single package (`@spotlightjs/spotlight`), which is the recommended way to use Spotlight.
21-
This means that adoption in most projects is as simple as adding a single dependency:
18+
For convenience, these packages are combined in a single package (`@spotlightjs/spotlight`), which is the recommended way to run Spotlight.
19+
This means that adoption in most projects is as simple as:
2220

2321
```shell
24-
npm add @spotlightjs/spotlight
22+
# Run the Spotlight sidecar with UI
23+
npx @spotlightjs/spotlight
24+
25+
# Or install globally
26+
npm install -g @spotlightjs/spotlight
27+
spotlight
2528
```
2629

27-
Registering Spotlight in your frontend application:
30+
Enabling Spotlight in your application's SDK:
2831

2932
```typescript
30-
import * as Spotlight from '@spotlightjs/spotlight';
33+
import * as Sentry from '@sentry/node';
34+
35+
// Enable Spotlight for development
36+
Sentry.init({
37+
dsn: 'your-dsn',
38+
spotlight: process.env.NODE_ENV === 'development',
39+
});
40+
```
3141

32-
// only load Spotlight in dev
33-
if (process.env.NODE_ENV === "development") {
34-
Spotlight.init();
35-
}
42+
Or simply set the environment variable:
43+
44+
```shell
45+
export SENTRY_SPOTLIGHT=1
3646
```
3747

38-
You can send any kind of events to the Sidecar, it forwards it to Spotlight and the integrations within Spotlight need to understand what to do with it.
48+
You can send any kind of events to the Sidecar, it forwards them to the Spotlight UI where integrations process and display the data.
3949

4050
<LinkCard title="Sidecar" description="Understand what the sidecar does" href="/docs/sidecar/" />
4151

packages/website/src/content/docs/docs/cli/run.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,5 +273,4 @@ spotlight run -p 0 node server.js
273273

274274
- [View events in your terminal with Tail mode](/docs/cli/tail/)
275275
- [See all CLI options](/docs/cli/reference/)
276-
- [Configure the Spotlight UI](/docs/reference/configuration/)
277276

packages/website/src/content/docs/docs/mcp/index.mdx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Get detailed span tree and timing for a specific trace.
187187
If you need to run Spotlight on a different port:
188188

189189
```bash
190-
spotlight-sidecar mcp -p 3000
190+
spotlight mcp -p 3000
191191
```
192192

193193
Update your MCP client configuration to match:
@@ -208,7 +208,7 @@ Update your MCP client configuration to match:
208208
Enable debug logging to troubleshoot MCP connection issues:
209209

210210
```bash
211-
spotlight-sidecar mcp -d
211+
spotlight mcp -d
212212
```
213213

214214
## How It Works
@@ -279,12 +279,12 @@ Here's a typical debugging session with Spotlight MCP:
279279

280280
1. **Start Spotlight MCP Server**
281281
```bash
282-
spotlight-sidecar mcp
282+
spotlight mcp
283283
```
284284

285285
2. **Run Your Application**
286286
```bash
287-
spotlight-sidecar run npm run dev
287+
spotlight run npm run dev
288288
```
289289

290290
3. **Trigger an Error** in your application (e.g., click a button, make a request)
@@ -327,10 +327,10 @@ Check that the port isn't already in use:
327327

328328
```bash
329329
# Use a different port
330-
spotlight-sidecar mcp -p 3000
330+
spotlight mcp -p 3000
331331

332332
# Enable debug logging
333-
spotlight-sidecar mcp -d
333+
spotlight mcp -d
334334
```
335335

336336
### AI Assistant Not Seeing Tools
@@ -347,16 +347,6 @@ spotlight-sidecar mcp -d
347347
3. Trigger some activity (errors, requests) in your app
348348
4. Check that `SENTRY_SPOTLIGHT` environment variable is set or SDK has spotlight enabled
349349

350-
### Connection Issues
351-
352-
Enable debug mode to see detailed logs:
353-
354-
```bash
355-
spotlight-sidecar mcp -d
356-
```
357-
358-
Check that your MCP client is using the correct command and arguments.
359-
360350
## Next Steps
361351

362352
- [Learn about available MCP tools](/docs/mcp/tools/)

packages/website/src/content/docs/docs/reference/configuration.md

Lines changed: 0 additions & 171 deletions
This file was deleted.

packages/website/src/content/docs/docs/sidecar/index.mdx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,12 @@ sentry_sdk.init(
8282
)
8383
```
8484

85-
**Via UI Config:**
86-
See [Configuration reference](/docs/reference/configuration/#sidecar) for UI-side configuration.
87-
8885
## Running the Sidecar
8986

9087
Choose the method that fits your workflow:
9188

9289
<CardGrid>
93-
<LinkCard title="CLI Commands" href="/docs/cli/" description="Run with spotlight-sidecar command" />
90+
<LinkCard title="CLI Commands" href="/docs/cli/" description="Run with spotlight command" />
9491
<LinkCard title="NPX" href="./npx/" description="Quick start with npx" />
9592
<LinkCard title="Webpack Plugin" href="./webpack/" description="Auto-start with webpack" />
9693
<LinkCard title="Docker" href="./docker/" description="Run in a container" />
@@ -102,22 +99,22 @@ Choose the method that fits your workflow:
10299
**Standalone Server:**
103100
```bash
104101
# Using CLI
105-
spotlight-sidecar server
102+
spotlight server
106103

107104
# Using npx
108-
npx @spotlightjs/sidecar
105+
npx @spotlightjs/spotlight
109106
```
110107

111108
**With Your Application:**
112109
```bash
113110
# Run your app with Spotlight
114-
spotlight-sidecar run npm run dev
111+
spotlight run npm run dev
115112
```
116113

117114
**For MCP Integration:**
118115
```bash
119116
# Start with MCP support
120-
spotlight-sidecar mcp
117+
spotlight mcp
121118
```
122119

123120
## Architecture
@@ -268,4 +265,3 @@ Run one sidecar and point all your services to it for unified debugging across y
268265

269266
- [Learn about CLI commands](/docs/cli/) - Control sidecar via terminal
270267
- [MCP Integration](/docs/mcp/) - Connect to AI assistants
271-
- [Configuration reference](/docs/reference/configuration/) - Advanced settings

packages/website/src/content/docs/docs/sidecar/webpack.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ module.exports = {
3030
plugins: [
3131
new WebpackHookPlugin({
3232
onBuildStart: ['npx @spotlightjs/spotlight'],
33-
// Or you package manager of you choice e.g. yarn run spotlight-sidecar
33+
// Or you package manager of your choice e.g. yarn run spotlight
3434
}),
3535
],
3636
};
3737

38-
```
38+
```

0 commit comments

Comments
 (0)