Repository navigation
fix: OTel operation spans report DurableOperationException instead of the original error type - #860
Merged
Merged
Conversation
Correct OTel operation exception types using stored errors in both trace views, preserving fallback and boundary reporting, with regression coverage. Codex-Automation: issue-implementation Codex-Issue: #847 Codex-Issue-Snapshot: a2e7dfa554acd069f7ad54c6350a2d20d53657d1ecfd96b1b92426aa12a596c0 Codex-Implementation-Command: 2d8c6dce52857c042e6fdd5b04b7a12628557051ef0b161efcb787e4b78b308a Codex-Publication-Metadata: eyJjaGFuZ2VkX3BhdGhfY291bnQiOjQsImNoYW5nZWRfcGF0aHMiOlsib3RlbC1wbHVnaW4vc3JjL21haW4vamF2YS9zb2Z0d2FyZS9hbWF6b24vbGFtYmRhL2R1cmFibGUvb3RlbC9PdGVsUGx1Z2luU3VwcG9ydC5qYXZhIiwib3RlbC1wbHVnaW4vc3JjL3Rlc3QvamF2YS9zb2Z0d2FyZS9hbWF6b24vbGFtYmRhL2R1cmFibGUvb3RlbC9CYWNrZW5kT3BlcmF0aW9uVGltaW5nVGVzdC5qYXZhIiwib3RlbC1wbHVnaW4vc3JjL3Rlc3QvamF2YS9zb2Z0d2FyZS9hbWF6b24vbGFtYmRhL2R1cmFibGUvb3RlbC9PcGVyYXRpb25FeGNlcHRpb25FdmVudFRlc3QuamF2YSIsIm90ZWwtcGx1Z2luL3NyYy90ZXN0L2phdmEvc29mdHdhcmUvYW1hem9uL2xhbWJkYS9kdXJhYmxlL290ZWwvT3BlcmF0aW9uRXhjZXB0aW9uVHlwZUludGVncmF0aW9uVGVzdC5qYXZhIl0sImltcGxlbWVudGF0aW9uX2NvbW1hbmQiOnsiZGlnZXN0IjoiMmQ4YzZkY2U1Mjg1N2MwNDJlNmZkZDViMDRiN2ExMjYyODU1NzA1MWVmMGIxNjFlZmNiNzg3ZTRiNzhiMzA4YSIsImd1aWRhbmNlIjoiIn0sInJlc3VsdCI6eyJvdXRjb21lIjoiY2hhbmdlZCIsInN1bW1hcnkiOiJDb3JyZWN0IE9UZWwgb3BlcmF0aW9uIGV4Y2VwdGlvbiB0eXBlcyB1c2luZyBzdG9yZWQgZXJyb3JzIGluIGJvdGggdHJhY2Ugdmlld3MsIHByZXNlcnZpbmcgZmFsbGJhY2sgYW5kIGJvdW5kYXJ5IHJlcG9ydGluZywgd2l0aCByZWdyZXNzaW9uIGNvdmVyYWdlLiIsInZhbGlkYXRpb24iOlsiSmF2YSAxNyBzeW50YXggcGFyc2luZyBwYXNzZWQgZm9yIGFsbCBmb3VyIGNoYW5nZWQgZmlsZXM7IHR5cGUgY2hlY2tpbmcgd2FzIG5vdCBwZXJmb3JtZWQuIiwiZ2l0IGRpZmYgLS1jaGVjayBhbmQgd2hpdGVzcGFjZSBjaGVja3MgcGFzc2VkLiIsIk9mZmxpbmUgTWF2ZW4gcmVncmVzc2lvbiB0ZXN0cyB3ZXJlIGJsb2NrZWQgYnkgdW5jYWNoZWQgQVdTIFNESyBhbmQgSmFja3NvbiBCT01zLiIsIm12biBzcG90bGVzczphcHBseSB3YXMgYXR0ZW1wdGVkIG9mZmxpbmUgYnV0IGJsb2NrZWQgYnkgdGhlIHNhbWUgbWlzc2luZyBkZXBlbmRlbmNpZXMuIl19LCJ2ZXJzaW9uIjoyfQ
This comment has been minimized.
This comment has been minimized.
Contributor
Author
Codex AI reviewNo actionable findings in the full diff against the SDK invariants and applicable contribution rules. Tests were not executed during this read-only review, so reported test results remain independently unverified. Reviewed commit |
SilanHe
approved these changes
Nov 2, 2026
This branch was successfully 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.
Closes #847
Summary
Failed durable-operation exception events now use a nonblank stored
ErrorObject.errorTypein both Invocation and Execution trace views. This preserves remote-language types such asRejectedErrorinstead of reporting the SDK'sDurableOperationExceptionwrapper. Missing, empty, or whitespace-only types retain the existing throwable-type fallback.Both event paths previously derived the type from the wrapper instead of its stored error. The shared helper supplies only the type override to native
recordExceptionand the existing timestamped event builder. A stored type must be nonblank to replace the fallback. Blank values still count as supplied error details, so the exception event remains present. Nonblank values are used verbatim, and checkpoint payloads are not normalized.Message/stack diagnostics, timestamps, attempt events, caller-visible exceptions, and Workflow/Invocation reporting remain unchanged. Replacing the throwable would change its diagnostic details, so the change reuses the existing event paths.
Regression coverage and corrected expectations
OperationExceptionEventTest.storedTypeChangesOnlyTheOperationExceptionTypecovers missing/null/empty/whitespace types, remote types, and current-clock/epoch/backend timestamps. It compares complete attribute maps because native OpenTelemetry events andAttributesBuilder.build()use different container implementations. The earlier empty-type expectation was incorrect: supplied error details do not imply a usable exception type. Empty, ASCII whitespace, and Unicode whitespace now assert the throwable fallback; nonblank padded values remain verbatim.CallbackErrorMetadataTestchecks type-only empty and whitespace callback errors through both trace views, retaining the event and the original checkpoint/caller payload. Replay still skips completed user code.OperationExceptionTypeIntegrationTestexercises child contexts, conditions, callbacks, and invokes. Replay requires exactly the documentedDurableExecutionRoot,Invocation, andWorkflowspans, rejecting repeated operation/attempt spans.Validation
mvn -o -B -ntp -pl otel-plugin -am clean verify spotless:check: passed; 2,630 tests, 0 failures/errors, 5 configured skips. All 979 OTel plugin tests passed.58927ff2: Java 17/21/25 builds, Spotless, all CodeQL analyses, and all four OTel cloud conformance jobs passed. The automated review of this commit reported no actionable findings.