Feature: non-watch snapshot for `sentry local` (`local dump` / `serve --once`)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- cli
Research direction
Start by reading the existing sentry local serve and run command entry points and the server's in-memory envelope buffer and SSE replay behavior. Resolve whether the change is local dump or a serve --once mode, define behavior when no server is running, and verify that filtering, formatting, buffer draining, and clean exit status work for scripts.
Written by the indexing model from the issue text.
Description
Summary
sentry local is watch-only today: serve tails a live SSE stream and run wraps a process. There's no non-interactive way to grab the events captured so far and exit. A one-shot sentry local dump (or a --once flag on serve) would print the current buffer and return, which is handy for scripts, CI checks, and AI coding agents.
Motivation
The server already retains a buffer of recent envelopes for late subscribers, but the only way to read it is to attach to the stream and disconnect manually (serve -F json | head, or curl -N localhost:8969/stream). That's awkward for:
- Agents/automation that want "what did my app emit in the last run?" as a single command with a clean exit code.
- CI / scripts asserting on captured events without managing a long-lived process.
- Quick inspection without entering watch mode.
(Related but distinct: #998 adds --verify — run app, wait for first envelope, pass/fail, exit — and #809 is synthetic event generation. Neither gives a snapshot of captured events.)
Proposed behavior
sentry local dump— connect to a running server (or the buffer), print everything currently buffered, then exit 0. Honors the existing-f/--filter(error|transaction|log|ai) and-F/--format(human|json) flags.- Or equivalently
sentry local serve --once/--exit-after-drain: replay the buffer and exit instead of streaming. - Errors with a clear message if no server is running (or starts an ephemeral one for the
run-style case — TBD).
# Snapshot the buffer as NDJSON and query it
sentry local dump -F json | jq 'select(.type=="error")'
# Just the AI/agent spans captured so far
sentry local dump -f ai
Notes / open questions
- Scope is the in-memory Spotlight buffer (last N envelopes), not a persistent store — same data
servealready replays to late subscribers. - Should
dumpauto-start a server if none is running, or only read an existing one? (Probably read-only; error if none.) - Naming:
dumpvsserve --oncevstail --once.
🤖 Generated with Claude Code
- Dominant language
- TypeScript
- Stars
- 121
- Forks
- 14
- Avg merge
- 22h 3m
- Merged PRs (30d)
- 94
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
bug jared
-
jared
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·