Skip to content

feat(issues): Show the agent run an error was raised in - #130898

Open
sentry-junior[bot] wants to merge 1 commit into
masterfrom
feat/issue-details-agent-run
Open

sentry-junior[bot] wants to merge 1 commit into
masterfrom
feat/issue-details-agent-run

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Issue details only links to an error's trace as a plain waterfall. When the error came from an AI agent, the useful view is the trace's Agent Activity tab, but nothing on the issue page points there.

Behind organizations:issue-details-agent-run (registered in #130897, which must land first):

  • Agent Run section, shown below the stack trace when the error was raised inside an AI span. It shows the agent name, model, the step the error was raised in, and the run duration. Below that is the run's AI spans in the existing AiSpanTimeline, with the failing step selected. Open Agent Activity and clicking a step link to /trace/<id>/?tab=ai-spans&node=span-<id>, which opens the Agent Activity timeline with that span selected.
  • Trace Preview hint: when the trace has AI spans but the error was raised outside them, Trace Preview shows a one-line hint linking to the same tab.
  • Nothing is shown when there's no trace, the trace wasn't sampled, or it has no AI spans.

Detection fetches the event's trace once with the same extra attributes the Agent Activity tab requests. The fetch is pinned to the event's timestamp and ID. It then walks up from the error's span to the nearest AI span and its agent span. The fetch only runs when the flag is on and the issue already shows Trace Preview.

The plan is to enable the flag for the Sentry org first. On our own data, about half of the issues in agent-heavy projects with a stored trace were raised inside an agent run.

I haven't checked the section visually against real data. The first dogfood pass should confirm how it renders on a long agent run.

via ale.

--

View Session [Sentry]

Behind organizations:issue-details-agent-run. When an error event's trace shows it was raised inside an AI span, issue details gets an Agent Run section with the run's AI spans and a link to the failing span in the trace's Agent Activity tab. When the trace has AI spans but the error is outside them, Trace Preview gets a hint linking to that tab.

Co-Authored-By: ale <alexandra.cota@sentry.io>
@sentry-junior
sentry-junior Bot requested review from a team as code owners November 12, 2026 12:05
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 12, 2026

This branch was successfully deployed

1 active deployment
Preview — a4a8ce15 Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants