feat(local): Add browser viewer for local telemetry - #1560
Merged
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
marked this pull request as ready for review
September 9, 2026 06:07
5 tasks
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> <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> </div> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sentry local serve --openandsentry local run --opennow open a browser-based, read-only viewer for the local envelope stream. Development targets the Vite app at port 5173; released builds targetlocal.sentry.devand provide the loopback endpoint only in the URL fragment.The receiver permits the hosted origin to read
/streamonly, 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.