Skip to content

fix(tools): Send a real event ID to related issues for event aliases - #2608

Open
sentry-junior[bot] wants to merge 3 commits into
mainfrom
fix/related-issues-event-alias
Open

sentry-junior[bot] wants to merge 3 commits into
mainfrom
fix/related-issues-event-alias

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

get_sentry_resource passes the event segment of an event URL straight to get_issue_details, so a URL like /issues/123/events/recommended/ arrives with eventId: "recommended" (or latest / oldest). The event lookup accepts those aliases, but GET /organizations/{org}/issues/{id}/related/ takes eventId as a UUID (GroupRelatedQuerySerializer) and answers 400. get_issue_details treats client errors from the related lookup as expected, so related issues silently dropped out of these responses. Since #2504 turned the lookup on for everyone, these aliases account for nearly all 400s on /related/ from the MCP server.

When the event is picked by alias, the related lookup now waits for the event the tool already fetches and sends its real ID, so same_trace still follows the event shown. A real 32-hex event ID still goes out in parallel as before. If the event fetch fails, eventId is omitted (the tool errors on the event fetch anyway).

find_related_issues and update_issue never send eventId, so they aren't affected.

via @Christinarlong.

--

View Session [Sentry]

get_sentry_resource passes the event segment of an event URL, such as
`latest` or `recommended`, through to get_issue_details. The event lookup
accepts these aliases, but /related/ only takes an event ID and answers
400, so related issues silently dropped out. When the event is selected
by alias, wait for the fetched event and send its ID instead.

Co-Authored-By: Christina Long <60594860+Christinarlong@users.noreply.github.com>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 30, 2026 18:16
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Nov 30, 2026 7:44pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 30, 2026 7:44pm UTC

Request Review

…ent-alias

# Conflicts:
#	packages/mcp-core/src/tools/catalog/get-issue-details.test.ts

This branch was successfully deployed

1 active and 2 inactive deployments
Preview – cli — 262b916c Deployed Nov 30, 2026 by vercel[bot]
Actions — 262b916c Deployed Nov 30, 2026 by sentry-junior[bot] via eval #2111
Preview – sentry-local — 262b916c Deployed Nov 30, 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