temporalio / temporalio/features
[Bug] Incomplete Span Reporting: Only RunActivity Spans Sent When Workflow Triggered via scheduler
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 32
- Forks
- 28
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
Description
What are you really trying to do?
I'm aiming to establish comprehensive tracing observability for temporal workflows initiated via scheduling.
Describe the bug
When the worfklow is triggered using create_schedule, only RunActivity spans are captured. However when it is triggered manually using start_workflow or execute_workflow, all spans are captured.
Tracing capture using jaeger for both manual and scheduled workflow executions. It shows workflow triggered manually with 5 spans, and the workflows triggered using schedule with 1 span.
The screenshot below show that the only span capture for the scheduled workflows is RunActivity
However for the workflows triggered manually using starter.py, we can see 5 spans captured. It is seen 5 spans: StartWorkflow, RunWorkflow, StartActivity, RunActivity and CompleteWorkflow
Minimal Reproduction
- Clone project https://github.com/temporalio/samples-python/tree/main/open_telemetry
- Run starter.py (execute workflow at demand)
- Run scheduler.py (execute workflow by scheduler) zip file attached to this issue
- Observe the difference of captured spans. The spans generated by the workflow triggered manually is 5, while for the workflow triggered using create_schedule is 1. It should be the same for both.
Environment/Versions
- OS and processor: M1 Mac
- Temporal Version: Python SDK 1.5.0
- Are you using Docker or Kubernetes or building Temporal from source? I am running docker container for jaeger
Additional context
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the open_telemetry sample, especially starter.py and scheduler.py, and run both workflows while comparing their Jaeger traces. Check why create_schedule produces only RunActivity while manual execution produces five spans. Done means scheduled executions report the same StartWorkflow, RunWorkflow, StartActivity, RunActivity, and CompleteWorkflow spans as manual executions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100