Skip to content

fix(otel): classify uncaught invocation errors#581

Open
zhongkechen wants to merge 2 commits into
mainfrom
codex/fix-otel-19-retry-status
Open

fix(otel): classify uncaught invocation errors#581
zhongkechen wants to merge 2 commits into
mainfrom
codex/fix-otel-19-retry-status

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • report raw uncaught handler errors to instrumentation as RETRY while preserving the terminal FAILED durable execution response
  • mark RETRY invocation spans with OpenTelemetry ERROR status
  • add regression coverage that keeps durable operation failures classified as FAILED

Root cause

The execution wrapper converts an uncaught handler exception into a FAILED durable output before PluginExecutor emits the invocation-end event. Instrumentation therefore received FAILED, and the OTel plugin also treated an explicit RETRY event as UNSET rather than ERROR.

This caused OTEL-19 to export an invocation span with durable.invocation.status: FAILED instead of the required RETRY value.

Testing

  • hatch run test:all (2980 passed, 2 skipped)
  • hatch run types:check
  • hatch fmt --check in the core package
  • hatch fmt --check in the OTel package
  • hatch run python .github/scripts/lintcommit.py

The hosted conformance fixture installs the SDK from main, so OTEL-19 will consume this fix once the fixture points at this branch or the change lands.

CI note

The hosted child, map, and parallel conformance jobs fail on the initial run and a targeted rerun. They fail on custom-serdes output and cloud history assertions unrelated to invocation instrumentation. The immediately preceding unrelated PR run 30064400076 has the same three failing jobs. All other PR checks pass.

zhongkechen and others added 2 commits July 23, 2026 20:52
Report raw handler exceptions to instrumentation as RETRY while
keeping the durable execution output FAILED.

Mark retry invocation spans as OpenTelemetry errors and preserve
FAILED telemetry for durable operation errors.
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