fix(otel): align operation status spans - #604
Conversation
Set completed CONTEXT span operation status from the user-function outcome in both OTel plugins. Omit durable.operation.status from STEP attempt spans while retaining terminal status on logical STEP operation spans. Cover successful and failed contexts and attempt attributes.
57d5d45 to
4f54996
Compare
Codex AI review
Reviewed commit |
SilanHe
left a comment
There was a problem hiding this comment.
We'll have to port the span status changes in this PR to JS and Java:
| Span | Python #604 | JS (merged) | Java (#572) |
|---|---|---|---|
| Attempt span (STEP attempt) | success → OK, failure → ERROR + recordException (explicit OK on success) |
failure → ERROR + recordException; success → UNSET (no OK) |
failure → ERROR + recordException; success → UNSET (no OK) |
| Operation / CONTEXT span (at op end) | success → OK, failure → ERROR |
failure → ERROR + recordException; success → UNSET |
failure → ERROR + recordException; success → UNSET |
| Continuation span | OK / ERROR |
ERROR only (UNSET on success) |
ERROR only (UNSET on success) |
|
I can get started on them once this is merged |
Summary
durable.operation.statusfor completedCONTEXTspansdurable.operation.statusfrom STEP attempt spans while preservingdurable.attempt.outcomeTesting
hatch run test:all(3078 passed, 2 skipped)hatch run types:checkhatch fmt --checkin the OTel packageCoordination
Aligns Python with the Java/JS status model tracked by aws/aws-durable-execution-conformance-tests#52 and the updated conformance requirements in aws/aws-durable-execution-conformance-tests#53.