Repository navigation
fix(tracing): Support streamed spans in Queries and traces - #1372
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Coverage Results 📊✅ Patch coverage is 100.00% (45 of 45 changed executable lines covered; target 80%). Changed files with executable lines (4)
Coverage diff@@ Coverage Diff @@
## main #1372 +/-##
==========================================
+ Coverage 51.85% 55.49% +3.64%
==========================================
Files 79 81 +2
Tracked lines 2520 2586 +66
Branches 1825 1889 +64
==========================================
+ Hits 1310 1439 +129
+ Misses 1210 1147 -63
- Partials 176 186 +10Generated by Coverage Action |
MathurAditya724
marked this pull request as ready for review
October 26, 2026 02:07
4 tasks done
MathurAditya724
added a commit
to getsentry/toolkit
that referenced
this pull request
Oct 26, 2026
Local discovers capturing and saved sessions from a daemon's plain loopback stream address. The searchable picker keeps feeds isolated, refreshes as runs start or expire, and restores the selected capture after reload. Local commands print a viewer link using the actual bound port. The viewer now supports investigation beyond raw payload inspection: - **Capture controls:** session/project context, capture state, connectivity, last received time and save deadline. Clear view, delete captured events, stop capture and disconnect have distinct scopes. Receiver switching probes the replacement before changing the feed; failed attempts preserve the current capture. Onboarding provides a copyable Local run command. - **Errors and feedback:** exception causes, captured source context and frame variables, breadcrumbs, request/context data, tags and modules. Absolute local source paths have VS Code links, and Copy for AI produces a Markdown summary. Modern feedback and legacy user reports link to their associated captured error. - **AI inspection:** standard GenAI and Vercel AI fields from embedded and standalone spans show model/provider, token usage, system instructions, messages, responses and tool arguments/results. Child AI steps stay connected to the interaction. Spans identified only by operation or origin remain visible when content was not captured. - **Performance insights:** queries and resources group exact operation/description pairs, sort by executions/duration/size, and open individual executions in their trace. Web Vitals compares captured measurements by page and visit, with explicit units and thresholds. - **Profiles and diagnostics:** legacy profiles and continuous chunks provide thread selection, inclusive/self function summaries, trace links and interactive flame, treemap and sunburst views. Timing and visualization limits are explicit. SDK inventory discovers name/version/platform metadata independently of client reports. Attachments preserve item headers and binary bytes, with text/JSON/raster-image/video previews and downloads; captured HTML and code remain inert. Download Blob URLs retain original MIME types only for allowlisted raster/video media. - **Investigation controls:** severity/logger facets, sorting and configurable event metadata; trace search, only-matches, branch collapse and adjustable tree width. Explicit event navigation reconciles active facets. Session-wide Cmd/Ctrl+K search stays independent of the view filter, resizable panes stack on narrow screens, and settings separates appearance from capture history capacity. For development, `pnpm --filter local sample` posts nine bundled, sanitized example envelopes through the real receiver. It also replays a custom file or recursive fixture directory, including Spotlight's corpus, with endpoint selection, gzip/Brotli, intervals and repeated passes. Byte-counted fixtures preserve their original bytes on Windows checkouts. See the [viewer and replay guide](https://github.com/getsentry/toolkit/blob/fbdbea3ec22b395de43c21910124e3ed68d55b0a/apps/local/README.md). Discovery uses a separate capability restricted to loopback and trusted hosted Local origins; it grants neither ingestion nor CLI control. Scoped retention updates require the session stream capability. Hosted viewers cannot delete receiver data or stop captures, and remote HTTPS streams remain read-only. Older receivers connect without discovery; restarting an older daemon to upgrade clears its in-memory telemetry. The span-v2 handling from [Spotlight #1372](getsentry/spotlight#1372) is adapted to Toolkit's viewer model, including container validation, typed HTTP attributes and late segment naming. Existing `/live` and `/sdks` routes remain compatible, and original envelopes remain inspectable. Validation: all 322 viewer tests pass, including HTTP/SSE replay, analysis drill-down, binary attachments, filtered navigation, a 150,000-sample profile and Windows checkout regressions. Root typecheck and lint pass. The Local workflow exercises viewer integration and npm/native process E2E on Linux, macOS and Windows. The full local suite still encounters the known macOS musl-installer and DerivedData-scan failures; the unrelated issue-link cache race is unchanged. The screenshots below show the capture/session flows: | Location | Screenshot | | --- | --- | | Local › Capture onboarding |  | | Local › Session picker, capturing and saved |  | | Local › Events, request inspector |  | | Local › Logs, structured details |  | | Local › Traces, selected span |  | | Local › Traces, narrow viewport |  | | Local › Saved capture, empty traces |  | | Local › Search this session, explicit view filter |  | | Local › Switch receiver |  | | Local › Capture actions, delete confirmation |  | | Local › Settings, narrow viewport |  | --------- Co-authored-by: GPT-6 Codex <[email protected]>
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.
Spotlight ignored standalone
spanenvelope items, so database queries sent by SDKs using the default streaming trace lifecycle were missing from Queries and trace details. Switching totraceLifecycle: "static"worked around the problem by sending transaction envelopes instead.This change decodes v2 span containers and typed attributes into Spotlight's trace model. Queries appear as spans arrive, and the trace tree updates when parents arrive later. Segment metadata, span timing, and attributes are preserved across envelopes without duplicating spans. Legacy standalone spans and transaction envelopes remain supported.