Repository navigation
Classify SOFA RPC failures by structured error category - #20783
Merged
Merged
Conversation
Pull request dashboard statusMerged · refreshed 2026-10-21 06:12 UTC Status above doesn't look right?
|
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement SOFA RPC structured error category classification
Classify SOFA RPC failures by structured error category
Oct 20, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused classification change preserves fallback behavior and has coverage across telemetry modes, with no unresolved findings.
No open issues 🎉
What changed in this PR
Updates SOFA RPC preview telemetry to classify failures using structured error categories while preserving exception-class fallback and legacy behavior.
Changes:
- Maps recognized
RpcErrorTypevalues to numericerror.typestrings. - Adds failure, fallback, success, and asynchronous-completion coverage.
- Enables preview and duplicate semantic-convention test variants.
| File | Description |
|---|---|
| instrumentation/sofa-rpc-5.4/testing/src/main/java/io/opentelemetry/instrumentation/sofarpc/v5_4/AbstractSofaRpcTest.java | Verifies timeout classification in spans and metrics. |
| instrumentation/sofa-rpc-5.4/library/src/test/java/io/opentelemetry/instrumentation/sofarpc/v5_4/TracingFilterTest.java | Tests classification, fallback, and asynchronous completion. |
| instrumentation/sofa-rpc-5.4/library/src/main/java/io/opentelemetry/instrumentation/sofarpc/v5_4/SofaRpcAttributesGetter.java | Maps supported error categories to telemetry values. |
| instrumentation/sofa-rpc-5.4/library/build.gradle.kts | Adds preview and duplicate-mode test variants. |
Review effort: Balanced
trask
reviewed
Oct 20, 2026
Co-authored-by: trask <218610+trask@users.noreply.github.com>
trask
reviewed
Oct 20, 2026
Co-authored-by: trask <218610+trask@users.noreply.github.com>
trask
approved these changes
Oct 20, 2026
Co-authored-by: trask <218610+trask@users.noreply.github.com>
laurit
approved these changes
Oct 21, 2026
14 of 25 tasks
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.

Use SOFA RPC error codes in the server and client ranges (
100-299) for RPC previewerror.typevalues; for example,CLIENT_TIMEOUTemits"200". Codes outside those ranges and unrelated exceptions retain the exception-class fallback.