Skip to content

Commit 59daf6a

Browse files
fix(local): correct misleading docs in run subcommand
Remove the false claim that `sentry local run` auto-starts a server. The run subcommand is an env-var wrapper — users start the server separately via `sentry local serve`. Also adds `local` to the completions property test.
1 parent 266f804 commit 59daf6a

7 files changed

Lines changed: 27 additions & 28 deletions

File tree

docs/src/fragments/commands/local.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

22

3-
[Spotlight](https://spotlightjs.com) is "Sentry for Development" — a lightweight local proxy that ingests Sentry envelopes from SDKs running in your dev stack and surfaces them in real time. `sentry local` runs a minimal [Hono](https://hono.dev/) HTTP server that's wire-compatible with Spotlight's protocol, so your existing SDKs and the [Spotlight overlay](https://spotlightjs.com/about/) work without any changes.
3+
`sentry local` runs a local development server that captures Sentry SDK envelopes from your dev stack and surfaces errors, traces, and logs in real time — right in your terminal. No authentication required.
44

5-
No authentication is required — the server binds to `localhost` by default and is purely a development tool.
5+
If a server is already running on the port, the command attaches as an SSE consumer instead of starting a duplicate.
66

77
## Examples
88

99
```bash
1010
# Start the server and tail events (default)
1111
sentry local
1212

13-
# Run your app with Spotlight auto-enabled
13+
# Run your app with the local server auto-enabled
1414
sentry local run -- npm run dev
1515
sentry local run -- python manage.py runserver
1616

@@ -40,7 +40,7 @@ Env vars injected into the child process:
4040

4141
| Method | Path | Description |
4242
|--------|---------------------------------|----------------------------------------------------|
43-
| `POST` | `/stream` | Spotlight-compatible envelope ingest |
43+
| `POST` | `/stream` | Envelope ingest |
4444
| `POST` | `/api/{projectId}/envelope/` | Sentry SDK ingest path |
4545
| `GET` | `/stream` | Server-Sent Events feed of incoming envelopes |
4646
| `GET` | `/health` | Liveness check (returns `OK`) |
@@ -63,4 +63,4 @@ Use `--filter` / `-f` to narrow the output to specific event types (repeatable):
6363
sentry local -f error -f log # only errors and logs
6464
```
6565

66-
Use `--quiet` to suppress tail output entirely if you only need the SSE stream for the Spotlight overlay.
66+
Use `--quiet` to suppress tail output entirely if you only need the SSE stream.

plugins/sentry-cli/skills/sentry-cli/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,10 @@ Initialize Sentry in your project (experimental)
470470

471471
### Local
472472

473-
Run a local Spotlight server for development
473+
Sentry for local development
474474

475475
- `sentry local serve` — Run a local Spotlight server to capture dev SDK events
476-
- `sentry local run <command...>` — Run a command with Spotlight enabled
476+
- `sentry local run <command...>` — Run a command with the local dev server enabled
477477

478478
→ Full flags and examples: `references/local.md`
479479

plugins/sentry-cli/skills/sentry-cli/references/local.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
name: sentry-cli-local
33
version: 0.35.0-dev.0
4-
description: Run a local Spotlight server for development
4+
description: Sentry for local development
55
requires:
66
bins: ["sentry"]
77
auth: true
88
---
99

1010
# Local Commands
1111

12-
Run a local Spotlight server for development
12+
Sentry for local development
1313

1414
### `sentry local serve`
1515

@@ -23,19 +23,19 @@ Run a local Spotlight server to capture dev SDK events
2323

2424
### `sentry local run <command...>`
2525

26-
Run a command with Spotlight enabled
26+
Run a command with the local dev server enabled
2727

2828
**Flags:**
29-
- `-p, --port <value> - Port for the Spotlight server (default 8969) - (default: "8969")`
30-
- `--host <value> - Hostname for the Spotlight server (default localhost) - (default: "localhost")`
29+
- `-p, --port <value> - Port for the local server (default 8969) - (default: "8969")`
30+
- `--host <value> - Hostname for the local server (default localhost) - (default: "localhost")`
3131

3232
**Examples:**
3333

3434
```bash
3535
# Start the server and tail events (default)
3636
sentry local
3737

38-
# Run your app with Spotlight auto-enabled
38+
# Run your app with the local server auto-enabled
3939
sentry local run -- npm run dev
4040
sentry local run -- python manage.py runserver
4141

src/commands/local/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export const localRoute = buildRouteMap({
99
},
1010
defaultCommand: "serve",
1111
docs: {
12-
brief: "Run a local Spotlight server for development",
12+
brief: "Sentry for local development",
1313
fullDescription:
14-
"Run a local Spotlight-compatible server to capture Sentry SDK\n" +
15-
"events from your dev stack.\n\n" +
14+
"Run a local development server to capture Sentry SDK events\n" +
15+
"from your dev stack.\n\n" +
1616
"Commands:\n" +
1717
" serve Start the server and tail events (default)\n" +
1818
" run Run a command with SENTRY_SPOTLIGHT auto-injected",

src/commands/local/run.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
/**
22
* sentry local run
33
*
4-
* Run a command with Sentry Spotlight enabled. Starts the local Spotlight
5-
* server (or connects to an existing one), injects `SENTRY_SPOTLIGHT` into
6-
* the child process environment so the Sentry SDK auto-sends envelopes to
7-
* the local server, then tails events to the terminal.
4+
* Run a command with the local dev server enabled. Injects
5+
* `SENTRY_SPOTLIGHT` into the child process environment so the Sentry SDK
6+
* auto-sends envelopes to the local server.
87
*/
98

109
import type { SentryContext } from "../../context.js";
@@ -33,14 +32,13 @@ function parsePort(value: string): number {
3332

3433
export const runCommand = buildCommand({
3534
docs: {
36-
brief: "Run a command with Spotlight enabled",
35+
brief: "Run a command with the local dev server enabled",
3736
fullDescription:
3837
"Run a command with the SENTRY_SPOTLIGHT environment variable\n" +
3938
"injected so the Sentry SDK automatically sends envelopes to the\n" +
40-
"local Spotlight server.\n\n" +
41-
"If no server is running on the port, one is started automatically\n" +
42-
"in the background. The child process inherits all current env vars\n" +
43-
"plus SENTRY_SPOTLIGHT and SENTRY_TRACES_SAMPLE_RATE=1.\n\n" +
39+
"local server.\n\n" +
40+
"The child process inherits all current env vars plus\n" +
41+
"SENTRY_SPOTLIGHT and SENTRY_TRACES_SAMPLE_RATE=1.\n\n" +
4442
"Example:\n" +
4543
" sentry local run -- npm run dev\n" +
4644
" sentry local run -- python manage.py runserver",
@@ -58,13 +56,13 @@ export const runCommand = buildCommand({
5856
port: {
5957
kind: "parsed",
6058
parse: parsePort,
61-
brief: `Port for the Spotlight server (default ${DEFAULT_PORT})`,
59+
brief: `Port for the local server (default ${DEFAULT_PORT})`,
6260
default: String(DEFAULT_PORT),
6361
},
6462
host: {
6563
kind: "parsed",
6664
parse: String,
67-
brief: "Hostname for the Spotlight server (default localhost)",
65+
brief: "Hostname for the local server (default localhost)",
6866
default: "localhost",
6967
},
7068
},

src/commands/local/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ function feedSSELine(
705705
}
706706

707707
/**
708-
* Consume SSE events from an upstream Spotlight server and print them.
708+
* Consume SSE events from an upstream server and print them.
709709
*
710710
* Bun doesn't have a global `EventSource`, so we use `fetch` with a
711711
* streaming body and parse the SSE wire format manually.

test/lib/completions.property.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ describe("proposeCompletions: Stricli integration", () => {
192192
"trace",
193193
"span",
194194
"log",
195+
"local",
195196
]);
196197

197198
test("subcommands match extractCommandTree for each group without defaultCommand", async () => {

0 commit comments

Comments
 (0)