Skip to content

feat(local): Add browser viewer for local telemetry - #1560

Merged
MathurAditya724 merged 20 commits into
mainfrom
feat/local-connect
Sep 9, 2026
Merged

MathurAditya724 merged 20 commits into
mainfrom
feat/local-connect

Conversation

@MathurAditya724

Copy link
Copy Markdown
Member

sentry local serve --open and sentry local run --open now open a browser-based, read-only viewer for the local envelope stream. Development targets the Vite app at port 5173; released builds target local.sentry.dev and provide the loopback endpoint only in the URL fragment.

The receiver permits the hosted origin to read /stream only, including Chrome Private Network Access preflight support, while retaining localhost SDK ingest behavior. The new Vite app remembers a valid local stream after its original tab is closed, displays bounded decoded envelope items, and is covered by receiver, CLI, protocol, and real Hono-to-EventSource integration tests.

Add the Local Vite viewer and --open support for serve and run. The receiver exposes the hosted UI only as a read-only loopback SSE stream with Private Network Access support.
@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Sep 9, 2026 6:00am UTC

Request Review

Present envelope items as compact, expandable JSON entries with focused Shiki highlighting.
Use the remaining dynamic viewport height for the scrollable event list.
Use a full-width master/detail layout for live envelope items.
Use square panels, aligned headers, and smaller workspace gutters.
Extract transaction and trace metadata for an overview alongside raw JSON.
Place the navigation and master/detail workspace flush with the viewport.
Add feed filters, selected-event metrics, trace relationships, and non-disruptive new-event handling.
@MathurAditya724
MathurAditya724 marked this pull request as ready for review September 9, 2026 06:07
@MathurAditya724
MathurAditya724 merged commit 4ca8818 into main Sep 9, 2026
33 of 34 checks passed
@MathurAditya724
MathurAditya724 deleted the feat/local-connect branch September 9, 2026 06:11
BYK pushed a commit that referenced this pull request Sep 14, 2026
…l UI, env vars (#1579)

## Weekly Documentation Audit — 2026-09-14

This PR fixes documentation gaps found by cross-referencing the CLI
implementation against its docs, focusing on changes since the last
audit (2026-09-07).

---

### Gap Report

#### A. Undocumented or missing commands/subcommands

No new undocumented commands found. All 112 commands have auto-generated
doc pages. The `local` commands (`serve`, `run`) are fully documented.

#### B. Undocumented flags

**`--open` flag on `sentry local serve` and `sentry local run`** (added
in #1560):
- Both commands added an `--open` flag to launch the browser-based
Sentry Local UI at `local.sentry.dev`
- The flag was listed in auto-generated Options tables but had no
examples or explanation in the hand-written fragment
- **Fixed**: Added a "Browser UI" section to `local.md` with usage
examples and constraints

#### C. Missing usage examples

The Local UI (`--open`) had no examples → added.

#### D. Stale descriptions

No stale `brief` strings found.

#### E. Missing route mappings in skill generator

All routes are covered — `groupRoutesByReference()` provides automatic
1:1 mapping.

#### F. Installation / distribution gaps

**`SENTRY_CONFIG_DIR` stale default in env-registry.ts**:
- Source: `packages/cli/src/lib/env-registry.ts` line 151–154
- The description said "Defaults to `~/.sentry/`" and `defaultValue` was
`"~/.sentry/"`
- Since PR #1503 (XDG Base Directory migration), the actual default is
`$XDG_CONFIG_HOME/sentry/` (i.e. `~/.config/sentry/`)
- **Fixed**: Updated description, defaultValue, and devGuide to reflect
XDG paths
- **Cascaded**: Regenerated `configuration.md` and `DEVELOPMENT.md`
(auto-generated from env-registry)

**Curl install detection path stale in `cli.md`**:
- Source: `apps/cli-docs/src/fragments/commands/cli.md` line 56
- The upgrade detection table said curl binary is "in `~/.sentry/bin`" —
this is the legacy path
- The XDG-aligned default is `~/.local/bin`
- **Fixed**: Table now shows both paths: "XDG: `~/.local/bin`; legacy:
`~/.sentry/bin`"

#### G. Undocumented environment variables

All `SENTRY_*` env vars in `env-registry.ts` are documented in
`configuration.md` (auto-generated). The `SENTRY_RELEASE` var injected
by `local run` was missing from the fragment's env var table →
**fixed**.

Remaining intentionally excluded env vars (internal, test-only, or
SDK-inherited): `SENTRY_ENVIRONMENT`, `SENTRY_CLI_NO_EXIT_TRAP`,
`SENTRY_SCAN_DISABLE_WORKERS`,
`SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE`, `SENTRY_RN_*`,
`SENTRY_TRACES_SAMPLE_RATE`, `SENTRY_MONITOR_SLUG`, `SENTRY_DIST`.

#### H. Auth / self-hosted gaps

**Auth credential storage path stale in `auth.md`**:
- Source: `apps/cli-docs/src/fragments/commands/auth.md` line 109
- Said credentials stored in `~/.sentry/` — stale since XDG migration
(#1503)
- **Fixed**: Updated to `$XDG_CONFIG_HOME/sentry/` with legacy fallback
note

No other auth/self-hosted gaps found. OAuth scopes, trust anchor system,
and self-hosted guide are current.

#### I. Plugin/skills gaps

**Newly-detected agents missing from `agentic-usage.md`**:
- Source: `packages/cli/src/lib/detect-agent.ts` (`ENV_VAR_AGENTS`,
`PROCESS_NAME_AGENTS`)
- PR #1571 added detection for Cline, OpenClaw, Kimi, Grok, and Junie
- The Cowork variant of Claude Code was also undocumented
- **Fixed**: Added all 5 new agents plus Cowork to both the intro
paragraph and requirements section

Skill installation targets (`~/.claude`, `~/.agents`) and embedded
content system are correctly documented.

#### J. README / DEVELOPMENT.md drift

- `packages/cli/README.md` correctly uses XDG paths — no drift
- `DEVELOPMENT.md` env var table was auto-updated by the env-registry
regeneration
- Node.js version requirement (22.15+ dev, 20+ runtime) is correctly
documented
- Build/test commands in `README.md` and `DEVELOPMENT.md` match
`package.json`

---

### Top 5 Most Impactful Fixes (Prioritized)

1. **`SENTRY_CONFIG_DIR` stale default** — The env-registry (source of
truth for generated docs) pointed users at the wrong directory. This
cascaded to `configuration.md`, `DEVELOPMENT.md`, and the `sentry
--help` output. High impact because it directly misleads users about
where their credentials are stored.

2. **Auth credential path stale** — The auth command docs told users
their tokens live in `~/.sentry/` when they actually live in
`~/.config/sentry/`. Users looking for their stored credentials would
check the wrong directory.

3. **5 newly-detected agents undocumented** — Cline, Grok, Kimi, Junie,
and OpenClaw users wouldn't know the CLI recognizes their agent,
potentially causing confusion about skill installation behavior.

4. **`--open` / Local UI undocumented in fragment** — The browser-based
Sentry Local UI is a significant new feature with no examples in the
hand-written docs. Users wouldn't discover it without reading `--help`.

5. **`SENTRY_RELEASE` env var missing from local run table** — Minor but
affects users who need to understand what environment variables are
injected into their child process.

<div><a
href="https://cursor.com/agents/bc-dcce6e5a-d036-4d6c-ba6c-54750bd16fdb?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>

This branch was successfully deployed

1 active deployment
Preview — 2409bc08 Deployed Sep 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant