Skip to content

Classify SOFA RPC failures by structured error category - #20783

Merged
laurit merged 5 commits into
mainfrom
copilot/sofa-rpc-structured-error-classification
Oct 21, 2026
Merged

laurit merged 5 commits into
mainfrom
copilot/sofa-rpc-structured-error-classification

Conversation

Copilot AI commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Classify client and server failures from thrown exceptions, error responses, and asynchronous completion.
  • Preserve legacy and duplicate telemetry behavior, and keep successful responses unclassified.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-21 06:12 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

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
Copilot AI requested a review from trask October 20, 2026 19:08
@trask
trask requested a balanced review from Copilot October 20, 2026 19:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 RpcErrorType values to numeric error.type strings.
  • 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

Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot AI requested a review from trask October 20, 2026 21:36
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot AI requested a review from trask October 20, 2026 21:55
@trask
trask marked this pull request as ready for review October 20, 2026 22:11
@trask
trask requested a review from a team as a code owner October 20, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unknown-code handling needs contract clarification, and structured server, asynchronous failure, and unsupported-code paths need coverage.

2 open issues

Review effort: Balanced

Co-authored-by: trask <218610+trask@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The scoped classification preserves fallback behavior, and the supplied reviews confirm integration coverage and test wiring without blocking issues.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@laurit
laurit merged commit 3dce284 into main Oct 21, 2026
70 checks passed
@laurit
laurit deleted the copilot/sofa-rpc-structured-error-classification branch October 21, 2026 06:11
@trask trask mentioned this pull request Oct 22, 2026
14 of 25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants