Repository navigation
fix(mcp): Report attached replays Sentry never stored as not found - #2850
Draft
sentry-junior[bot] wants to merge 2 commits into
Draft
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
An event's replay context or tag can name a replay that Sentry never
stored. SDKs set the replay ID on events before the replay is sent, so a
replay that was sampled out of buffer mode, never flushed, or dropped
leaves an ID that GET /organizations/{org}/replays/{id}/ 404s on.
get_issue_details reported that ID as `replays.attached`, so agents
called get_replay_details on it and got a bare 404.
get_issue_details now checks an attached replay ID that is not in the
issue's related replays (replay-count only returns stored replays) and,
when Sentry has no replay for it, reports it as
`replays.attachedNotFound` instead of `replays.attached`.
get_replay_details now explains a 404: the ID can name a replay that
was never stored, replays expire after 90 days, and replays in projects
the caller cannot access are not found, and it points to search_replays.
Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
📊 MCP Server Token Cost ReportSummary
Per-Tool Breakdown
Note: This measures the static overhead of tool definitions sent to LLM clients with every request. Lower is better. MCP Apps viewsEach
The budget applies to raw bytes, and the view's generator fails over it. |
The @sentry/mcp-server bundle went over its size budget. Check the attached replay once in issueDetailsResult instead of at both call sites, and shorten the new field description and the replay 404 message.
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.
An event can carry a replay ID for a replay that Sentry never stored. SDKs put the replay ID on events before the replay is sent, so a replay that was sampled out of buffer mode, never flushed, or dropped leaves an ID that
GET /organizations/{org}/replays/{id}/answers with a bare 404.get_issue_details(andget_sentry_resourcefor events) reported that ID asreplays.attached, so agents calledget_replay_detailson it and gotAPI error (404): Not Found. Related replay IDs on the same issue load becausereplay-countonly returns stored replays.get_issue_detailslooks up an attached replay ID that isn't in the related list. When Sentry has no replay for it, the ID moves fromreplays.attachedto the newreplays.attachedNotFoundfield. Other lookup failures keep the ID as attached. IDs already in the related list cost no extra request.get_replay_detailsturns the 404 into a user input error. The message says the replay was never stored or is older than 90 days, and points tosearch_replays. This also covers IDs that agents copy from raw event tags.The new output field is additive, so nothing breaks for existing clients.
The
@sentry/mcp-serverbundle sits right at its size budget:mainhad about 0.7 KB of headroom, so the new strings are kept short to fit. The budget comment inpackages/mcp-server/script/bundle.tsstill says it leaves 5 to 10 KB, so the next MCP change will likely hit it too.via @dcramer.
--
View Session [Sentry]