Skip to content

fix(otel): End all recording spans on non-terminal invocations - #650

Draft
ayushiahjolia wants to merge 2 commits into
feat/otel-backend-parented-topologyfrom
fix/otel-end-spans-non-terminal-v2
Draft

fix(otel): End all recording spans on non-terminal invocations#650
ayushiahjolia wants to merge 2 commits into
feat/otel-backend-parented-topologyfrom
fix/otel-end-spans-non-terminal-v2

Conversation

@ayushiahjolia

@ayushiahjolia ayushiahjolia commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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

#624

Description

Defers Workflow and operation span creation so no recording span is ever left un-ended. Both plugins now hold a deterministic Workflow context between invocations and start+end the Workflow span in a single call on the terminal invocation only. In ExecutionOtelPlugin, operation spans are created once in onOperationEnd (with a start-timestamp fallback for virtual map/parallel operations), and any attempt span still open at invocation end is force-ended. Non-terminal invocations (PENDING/RETRYING) no longer abandon a recording span.

Demo/Screenshots

N/A

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes? Updated

Integration Tests

Have integration tests been written for these changes? N/A

Examples

Has a new example been added for the change? (if applicable) N/A

@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Residual risk: tests were not executed under the read-only review constraints.

Reviewed commit 799642391028d84e46698fe711af93926d62225e. Workflow run

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.

1 participant