temporalio / temporalio/sdk-typescript
[Feature Request] Add actual span time to spans create by workflow otel interceptors
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 917
- Forks
- 224
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 43
Description
Spans created in the workflow isolate use workflow task time which different than the actual processing time.
Getting the actual time is useful for getting a clear picture of how a system behaves.
After discussing with the SDK team, we've decided not to use the real time for spans because a span can start in one workflow task and end in another, running on different workers and going through replays.
- This means there's no way to reliably get the real start time when the span is finally emitted
- We can avoid this scenario for spans generated by the interceptors but it's unavoidable if we want to let users create their own spans in workflow
- This will in fact make the TS SDK the only SDK that supports user spans in Workflow code
- Spans that span multiple workflow tasks require full determinism of workflow code in order for their IDs to be deterministically generated when replaying, if a user deploys a non deterministic update to their workflow code, tracing might break
Contributor guide
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
The issue names workflow OpenTelemetry interceptors but no files or tests. First clarify whether actual processing time is feasible for spans crossing workflow tasks, replays, and workers. A usable resolution needs an agreed scope and acceptance criteria; the current thread records constraints rather than a decided implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100