Repository navigation
fix(otel): preserve original exception types and remove parent duplicates - #846
Draft
zhongkechen wants to merge 1 commit into
Draft
zhongkechen wants to merge 1 commit into
zhongkechen wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
Reported OTel exception-attribution failures in child contexts, wait-for-condition, wait-for-callback, and chained invoke.
Description
Failed operation spans currently report
DurableOperationExceptioninstead of the original stored error type, and Workflow/Invocation spans record additional exception events for the propagated failure. Both trace views now useErrorObject.errorTypefor operation exception events, so a Java failure remainsjava.lang.RuntimeExceptionand a callback rejection remainsRejectedError. Workflow and Invocation retain their error status and description without exception events; attempt events remain intact.Demo/Screenshots
Local regression tests reproduce all four operation scenarios and direct handler failures in both views. No cloud screenshots were captured.
Design
DurableOperationException; recording that wrapper directly loses the stored type. Both plugins also record the propagated execution error on Workflow and Invocation.recordExceptioncalls are removed.Assumptions
OperationExceptionEventTest.LocalDurableTestRunnerfor child contexts, conditions, callbacks, and invokes. Callback/invoke completions are supplied by the local backend.Decisions not covered by the issue or the design note
InvocationOtelPluginTest.failedInvocation_setsErrorOnBothWorkflowAndInvocationSpans: its old assertion required the extra Workflow exception event reported as a bug; it now checks that both parent spans have no events.BackendOperationTimingTest.publicHandlerUsesBackendEndAndCompletedReplaySkipsHooks: its old assertion required the wrapper type; it now requires the stored type while retaining the timing and replay checks.Checklist
Testing
Unit Tests
OperationExceptionEventTestcovers Java and remote error types, absent/empty types, native timestamps, the epoch sentinel, and backend timestamps. Existing timing, metadata, virtual-context, and invocation tests pass.Integration Tests
ExceptionAttributionIntegrationTestcovers child-context, condition, callback, invoke, and direct-handler failures in both trace views, including preserved error status, original operation/attempt exception types, failure replay, and skipped completed user code.Validation on JDK 21:
mvn test: all modules passed; 3,689 tests reported, 34 skipped, zero failures/errors (including all 961 OTel tests).mvn -pl otel-plugin spotless:apply spotless:check: passed.git diff --check: passed.The standard local suite leaves cloud tests disabled; live cloud conformance was not run.
Examples
Not applicable; no public usage change.