temporalio / temporalio/sdk-typescript

[Feature Request] Add actual span time to spans create by workflow otel interceptors

Open
#384 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.