Skip to content

perf(cli): Prefetch issue view details for org/numeric IDs - #1931

Merged
BYK merged 1 commit into
mainfrom
perf/issue-view-prefetch-latest-event
Nov 4, 2026
Merged

BYK merged 1 commit into
mainfrom
perf/issue-view-prefetch-latest-event

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

sentry issue view <org>/<numeric-id> ran its requests in a strict chain: issue, then latest event and replays, then trace. The latest event and replay lookups only need the org and ID, which the argument already gives. Now they start alongside the issue fetch, and the trace request starts as soon as the latest event arrives instead of also waiting on replays.

On slow connections, each step of the 3-request chain took more than 500ms, which tripped Sentry's Consecutive HTTP detector. Now the issue fetch overlaps the event→trace pair, so the chain is at most 2 steps.

JSON and human output are unchanged. Only the request timing changes.

Before:

issue    +0ms     764ms
replays  +778ms   271ms
latest   +784ms   478ms
trace    +1264ms  1369ms
waterfall 2512–2697ms (3 warm runs)

After:

issue    +0ms     701ms
replays  +0ms     339ms
latest   +20ms    437ms
trace    +459ms   1558ms
waterfall ~2017ms (2 warm runs)

(issue view <org>/<numeric-id> --json --fresh, local run from a low-latency connection. Slower connections save more, about one full issue round-trip.)

Other forms (short IDs, selectors, plain numeric IDs, pasted URLs) still wait for the issue. Short IDs, selectors, and plain numeric IDs need the issue response to know the ID or org. Pasted URLs only apply their server once resolveIssue runs. If the issue resolves to a different ID (a merged issue), the prefetched data is dropped and fetched again for the resolved ID.

Fixes CLI-3F5

via bete.

--

View Session [Sentry]

When the argument already names the org and numeric issue ID, start the
latest-event, replay, and trace requests alongside the issue fetch
instead of after it. The trace request also no longer waits on the
replay lookup. A merged issue that resolves to a different ID falls back
to fetching details for the resolved ID.

Fixes CLI-3F5

Co-Authored-By: Miguel Betegon <miguel.betegon@sentry.io>
@vercel

vercel Bot commented Nov 4, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 4, 2026 9:41am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 4, 2026

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Traces and issues taking this long is not great, we should look into that as a follow up.

@BYK
BYK merged commit 9d921fb into main Nov 4, 2026
34 of 36 checks passed
@BYK
BYK deleted the perf/issue-view-prefetch-latest-event branch November 4, 2026 14:54

This branch was previously deployed

1 inactive deployment
Preview — d773d6e3 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant