feat: propagate error categories to SGP spans - #486
Merged
Conversation
Capture ADK failures and preserve producer ownership metadata so SGP can distinguish application, platform, and unknown errors. Co-authored-by: Cursor <cursoragent@cursor.com>
Provide typed application and platform error classes with documented ownership boundaries instead of relying on arbitrary exception attributes. Co-authored-by: Cursor <cursoragent@cursor.com>
Require the released tracing SDK types so Agentex no longer maintains a duplicate ownership taxonomy that can drift. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Updated after |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
NiteshDhanpal
approved these changes
Aug 6, 2026
| error_category: ErrorCategory = ERROR_CATEGORY_UNKNOWN | ||
|
|
||
|
|
||
| class ApplicationError(CategorizedError): |
Contributor
There was a problem hiding this comment.
Why are these declared in both repos rather than agentex importing from scale_gp_beta? If it's to keep agentex's public exception API off scale_gp_beta.lib, we still need a bridge..
| return None | ||
|
|
||
|
|
||
| def _error_category( |
Contributor
There was a problem hiding this comment.
are the producing classes populating the Error categories?
Preserve the newer fail-open observability handling while retaining error category metadata and updated expectations. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
scale-gp-beta>=0.5.0and re-export its canonicalErrorCategory,CategorizedError,ApplicationError, andPlatformErrortypesunknownerror_categorymetadata alongside SGPstatus=ERROR, while remaining compatible with legacy recordsTest plan
.venv/bin/pytest -n 0 tests/lib/core/tracing/test_span_error.py tests/lib/adk/test_tracing_module.py tests/lib/core/tracing/processors/test_sgp_tracing_processor.py(66 passed)Greptile Summary
Adds canonical error categorization to traced failures.
scale-gp-beta.scale-gp-betato version 0.5.0 and expands tracing coverage.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Exception raised in traced operation] --> B[ADK or core span context manager] B --> C[set_span_error] C --> D{Canonical categorized error?} D -->|Yes| E[Use application or platform category] D -->|No| F[Use unknown category] E --> G[Store error record on span] F --> G G --> H[End span] H --> I[SGP tracing processor] I --> J[Set ERROR status and flat error_category metadata]Reviews (4): Last reviewed commit: "merge: resolve latest next tracing chang..." | Re-trigger Greptile