fix(explore): Link conversation errors count to linked issues - #121505
Open
constantinius wants to merge 1 commit into
Open
fix(explore): Link conversation errors count to linked issues#121505constantinius wants to merge 1 commit into
constantinius wants to merge 1 commit into
Conversation
The conversation overview's "Errors" count reflects linked error issues on the conversation's spans (node.errors), but the count linked to a spans query filtered by gen_ai.conversation.id and span.status:[internal_error,error]. Error events don't carry gen_ai.conversation.id and are associated to spans by trace, often in a different project, so that query returned no results. Link the count based on the same data it aggregates: when spans have linked error issues, point at the issue stream filtered by issue.id:[...] scoped to project=-1 since trace-linked errors can live in any project. When the count comes only from span.status errors with no linked issue, fall back to the traces explorer filtered to this conversation's error-status spans. Refs TET-2757
constantinius
force-pushed
the
constantinius/fix/explore/TET-2757-conversation-errors-link
branch
from
August 7, 2026 07:45
b226f8a to
cd072ce
Compare
constantinius
marked this pull request as ready for review
August 7, 2026 08:19
Comment on lines
+357
to
+367
| // Linked error issues live in the issue stream; span-status errors without a | ||
| // linked issue fall back to the traces explorer. Undefined when there are none. | ||
| function getConversationErrorsUrl({ | ||
| organization, | ||
| selection, | ||
| conversationId, | ||
| errorIssueIds, | ||
| errorCount, | ||
| }: { | ||
| conversationId: string; | ||
| errorCount: number; |
Contributor
There was a problem hiding this comment.
Bug: The error count can be higher than the number of errors on the linked page because the link only filters for linked issues, ignoring errors from span statuses.
Severity: MEDIUM
Suggested Fix
Update the getConversationErrorsUrl function to generate a URL that filters for both errors from linked issues and errors indicated by span statuses. This will ensure the linked page displays all errors contributing to the count shown in the UI.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
static/app/views/explore/conversations/components/conversationSummary.tsx#L354-L367
Potential issue: The error count displayed for a conversation can be higher than the
number of errors shown on the linked page. This occurs when a conversation includes both
errors from linked issues (`node.errors`) and errors indicated by a span's status
(`span.status`). The `hasError` function counts both types of errors for the total
`errorCount`. However, the link generated by `getConversationErrorsUrl` only filters by
the IDs from linked issues (`errorIssueIds`), omitting the span-status errors from the
destination page. This results in a discrepancy, for example, showing '2 errors' but
linking to a page with only one.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
The conversation "Errors" count linked to a spans query (
span.status:[internal_error,error]) that never matched the errors it counts — those are linked error issues (node.errors), associated to spans by trace and often in a different project.Now the count links to where its errors actually live:
issue.id:[...],project=-1)Refs TET-2757