Repository navigation
Document OpenTelemetry plugin span caveats for Workflow Task failures and resets - #5720
Merged
Merged
Conversation
… and resets The replay paragraph said Worker restarts and cache evictions never produce duplicate spans, which holds, but didn't cover the two cases that do re-export or collide: spans ended inside a failed Workflow Task are exported again with the same IDs, and before temporalio 1.36.0 a reapplied Update or Signal handler after a reset reused the original RunWorkflow span's ID (temporalio/sdk-python#2081).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📖 Docs PR preview links
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The OpenAI Agents documentation still claims spans export only when a Workflow completes, contradicting the caveat that ended spans can export during a failed Workflow Task.
1 open issue
What changed in this PR
This PR adds plugin-wide tracing caveats to the Python observability documentation, complementing the Arize-specific guidance in #5306.
Changes:
- Explains that failed Workflow Tasks can re-export ended spans, with duplicate visibility depending on backend deduplication.
- Documents the
temporalio1.36.0 requirement to avoid span identifier reuse when resets reapply Updates or Signals.
| File | Description |
|---|---|
docs/develop/python/platform/observability.mdx |
Adds failed-task and reset caveats for OpenTelemetryPlugin. |
Review effort: Balanced
Comment on lines
+199
to
+201
| A failed Workflow Task is the exception. The Worker re-executes the Workflow code since the last completed Workflow | ||
| Task, and spans that already ended inside the failed task are exported again with the same span identifiers. Whether | ||
| they appear twice depends on the backend: one that deduplicates by span identifier keeps a single copy. |
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.

The Python observability page says Worker restarts and cache evictions never produce duplicate spans under
OpenTelemetryPlugin. That holds, but two cases weren't covered:temporalio1.36.0, the reapplied handler's span reused the original run'sRunWorkflowspan identifier. Fixed by Enable single-batch workflow activation processing by default sdk-python#2081.Both came up while reviewing the Arize integration page in #5306, which documents them for Arize specifically. They're plugin behavior, so this states them on the general tracing page. Kept separate from #5306 so that PR stays scoped to Arize.
CI Vale config and
yarn buildare clean.