fix: use failure details for failed orchestration span messages#290
Open
YunchuWang wants to merge 1 commit into
Open
fix: use failure details for failed orchestration span messages#290YunchuWang wants to merge 1 commit into
YunchuWang wants to merge 1 commit into
Conversation
…tions setOrchestrationStatusFromActions() was reading the error message from completeAction.getResult(), but failed orchestrations store the error in failureDetails (not result). This caused all failed orchestration spans to show the generic 'Orchestration failed' message instead of the actual error. Now reads from failureDetails.getErrormessage() first, with fallback to result for backwards compatibility. Fixes #218 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves OpenTelemetry span diagnostics for failed orchestrations by sourcing the span status message from failureDetails (the field populated by the runtime) instead of the result field, aligning tracing output with actual failure data and addressing issue #218.
Changes:
- Update
setOrchestrationStatusFromActions()to read failed-orchestration error messages fromfailureDetails, with a fallback toresultfor backward compatibility. - Adjust and extend tracing tests to cover
failureDetails, legacyresultfallback, and the default-message fallback.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/durabletask-js/src/tracing/trace-helper.ts | Reads orchestration failure span message from failureDetails (with fallback chain). |
| packages/durabletask-js/test/tracing.spec.ts | Updates existing failure test and adds coverage for result/default fallback behavior. |
Comment on lines
+697
to
+700
| const errorMessage = | ||
| completeAction.getFailuredetails()?.getErrormessage() || | ||
| completeAction.getResult()?.getValue() || | ||
| "Orchestration failed"; |
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
Fixes #218