Repository navigation
fix(mcp): Return the event-level stacktrace from issue and event tools - #2402
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Sentry returns an event's top-level stack (a message captured with attach_stacktrace, common on native) as an entry of type "stacktrace", outside exceptions and threads. get_event_stacktrace read only threads and get_issue_details read only exceptions and threads, so these events looked stackless. get_event_stacktrace now returns the stack in a new `stacktrace` field when the event has no threads. get_issue_details adds `event.stacktrace` to its structured output and renders the stack in markdown when there is no exception.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
Sentry returns an event's top-level stack, such as a native
captureMessagewithattach_stacktrace, as an entry of typestacktrace, outsideexceptionandthreads(src/sentry/api/serializers/models/event.py:159,src/sentry/interfaces/stacktrace.py:528in getsentry/sentry).get_event_stacktraceread onlythreads, andget_issue_detailsread onlyexceptionandthreads. As a result these events looked stackless.get_event_stacktrace: when the event has no threads, it returns the event-level stack in a new nullablestacktracefield, andselection.messagepoints to it.statusstaysno_threads.get_issue_details/get_sentry_resource: the structured output getsevent.stacktrace, and the markdown renders a### Stacktracesection when there is no exception.formatStackFrames, so threads and the new section share it.This adds output fields, so it has the same closed-
outputSchemarisk as #2293 for clients that cached an oldertools/list.This doesn't change #2144 (exception-only events in
get_event_stacktrace). That's a separate code path.Fixes #2401
via automation
evt_905b9c478746fd9deeb853f85ad7441b· Run IDdispatch_4e78d780ff1972f0f26d34e55cc804be.--
View Session [Sentry]