Repository navigation
feat(mcp): Link each search_logs result to its pinned log in Sentry - #1699
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
@cursor review |
Contributor
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5a9b3a3. Configure here.
JoshuaKGoldberg
marked this pull request as ready for review
October 28, 2026 16:26
nsdeschenes
approved these changes
Oct 30, 2026
…ogs-pinned-links # Conflicts: # packages/mcp-core/src/tools/support/search-events/search.ts
JoshuaKGoldberg
enabled auto-merge (squash)
October 30, 2026 17:08
Comment on lines
+135
to
+137
| if (dataset === "logs") { | ||
| return [...new Set([...fields, "id"])]; | ||
| } |
There was a problem hiding this comment.
Log pin URLs request/read id instead of sentry.item_id
Non-aggregate logs searches append id, but Explore/Events log rows identify logs as sentry.item_id; formatLogResults also builds Log URLs from event.id, so pinned links are missing (or validation may reject the field). Request and read sentry.item_id instead.
Evidence
buildRequestFields()appends"id"for non-aggregatedataset === "logs"before validate/search.- This monorepo’s Explore/Events logs contract uses
sentry.item_idas the unique log ID: CLISentryLogSchema,LOG_FIELDS/DETAILED_LOG_FIELDS, e2edata[0]["sentry.item_id"], and logs attribute fixtures ("The unique ID of the log item."). - CLI documents
idas the trace-logs endpoint field, not Explore/Events (idinstead ofsentry.item_id). - MCP logs field catalog and
formatLogResultspriority fields listsentry.item_id, but Log URLs are emitted only whentypeof event.id === "string". - Default recommended logs fields omit
id(unlike spans/metrics), and unit tests mockid: "log1"rather than the production response shape.
Identified by Warden · code-review · 4QK-MVJ
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.
Agents previously had to hand-build filter-and-time-range links to share a specific log, which break once a relative range moves past it. Pinned logs both focus on the log itself and resolve their own time window from the log ID.
Individual-log results from
search_logsnow include a Log URL that opens the logs explorer with that log pinned vialogsPinned.