Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: propagate error status codes to parent spans for improved visibility into trace exceptions #1824

Merged
merged 21 commits into from
Nov 30, 2023

Conversation

axiomofjoy
Copy link
Contributor

@axiomofjoy axiomofjoy commented Nov 29, 2023

Improve Visibility Into Trace Exceptions by Propagating Error Status Codes to Parent Spans

Overview

Previously, error status codes on children spans were not propagated upward to parent spans in the UI. This caused a usability issue where users could not identify traces that contained exceptions without exploding the traces into their constituent spans.

This PR adds a new field propagatedStatusCode to the Span GraphQL model that propagates errors from descendants to ancestors. This field is computed on the fly in a similar manner to the accumulated token counts.

Before and After

Collapsed Traces

Before

Screenshot 2023-11-28 at 11 21 00 PM

After

Screenshot 2023-11-28 at 11 12 17 PM

Exploded Traces

Before

Screenshot 2023-11-28 at 11 21 13 PM

After

Screenshot 2023-11-28 at 11 12 29 PM

Tree

Before

Screenshot 2023-11-28 at 11 21 44 PM

After

Screenshot 2023-11-28 at 11 11 50 PM

@axiomofjoy axiomofjoy changed the title feat: propagate error status codes feat: propagate error status codes to parent spans for improved visibility into trace exceptions Nov 29, 2023
@axiomofjoy axiomofjoy linked an issue Nov 29, 2023 that may be closed by this pull request
@axiomofjoy axiomofjoy marked this pull request as ready for review November 29, 2023 07:38
Copy link
Contributor

@RogerHYang RogerHYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending decision on the spans table

src/phoenix/core/traces.py Outdated Show resolved Hide resolved
app/src/pages/tracing/SpansTable.tsx Outdated Show resolved Hide resolved
app/src/components/trace/TraceTree.tsx Outdated Show resolved Hide resolved
app/src/components/trace/types.ts Outdated Show resolved Hide resolved
app/src/pages/tracing/SpansTable.tsx Outdated Show resolved Hide resolved
app/src/pages/tracing/TracesTable.tsx Outdated Show resolved Hide resolved
@axiomofjoy axiomofjoy merged commit 1a234e9 into main Nov 30, 2023
9 checks passed
@axiomofjoy axiomofjoy deleted the percolate-up-error-status-codes branch November 30, 2023 21:39
mikeldking pushed a commit that referenced this pull request Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[enhancement] improve visibility into error status codes
3 participants