Repository navigation
perf(issues): Skip source-map-debug request when no frame can be unminified - #130615
Merged
Merged
Conversation
…ions Follow the frontend data-fetching guidance: build on apiOptions, not useQuery, and disable queries with skipToken. The source map issue page now uses the same options instead of its own inline copy. No behavior change. Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
fix/skip-source-map-debug-without-minified-frames
branch
from
November 10, 2026 15:05
21e69c0 to
b50ed2a
Compare
lcian
enabled auto-merge (squash)
November 12, 2026 10:38
lcian
approved these changes
Nov 12, 2026
auto-merge was automatically disabled
November 12, 2026 10:39
Head branch was modified
lcian
enabled auto-merge (squash)
November 12, 2026 10:40
auto-merge was automatically disabled
November 12, 2026 10:40
Head branch was modified
…nified The issue stack trace fetched source-map-debug for every JavaScript SDK event, even when no frame could show the Unminify Code button. Pass skipToken unless the frame passes the local button checks. The query is shared, so it still runs once when any frame is eligible. Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
fix/skip-source-map-debug-without-minified-frames
branch
from
November 12, 2026 10:41
545290e to
15ab063
Compare
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.
The issue page calls
GET /projects/{org}/{project}/events/{eventId}/source-map-debug/for everysentry.javascript.*event when the Stack Trace section renders. It does this even when no frame can show the "Unminify Code" button. In that case, the user cannot open the source map debugger modal, which is the only way to show the data we just fetched, so the call is not necessary.This endpoint is expensive. In the last 7 days it had about 287k requests, with a frontend p95 of 1.5s and a backend p99 of 4.1s at about 27 DB queries per request.
This PR has two commits:
ref: ReplaceuseSourceMapDebugQuerywithsourceMapDebugApiOptions, which follows the establishedapiOptions+skipTokenfrontend pattern. No behavior change.perf: Do the per-frame button checks (no source context, in-app, supported file extension, debugger not hidden) before the query, and passskipTokenwhen they fail. The request now runs only when at least one frame can show the button.via @lcian.
--
View Session [Sentry]