Skip to content

fix(typescript-sdk): add workflow span fallback for dashboard-triggered runs#3710

Open
onthebed wants to merge 1 commit intohatchet-dev:mainfrom
onthebed:clawoss/fix/3706-dashboard-workflow-parent-span
Open

fix(typescript-sdk): add workflow span fallback for dashboard-triggered runs#3710
onthebed wants to merge 1 commit intohatchet-dev:mainfrom
onthebed:clawoss/fix/3706-dashboard-workflow-parent-span

Conversation

@onthebed
Copy link
Copy Markdown

Dashboard-triggered runs arrive at the worker with a propagated traceparent, but no exported producer span from the TS SDK side. That left step spans attached to a missing parent and the workflow envelope never showed up in traces.

This adds a worker-side hatchet.workflow_run fallback span when a valid upstream trace context exists but the metadata was not marked as coming from an SDK-exported trigger span. SDK-triggered runs still use their existing producer spans because instrumented trigger paths now mark the injected metadata before the worker sees it.

Verification:

  • pnpm test:unit -- --runInBand src/opentelemetry/instrumentor.test.ts
  • pnpm lint:check && npx tsc
  • pnpm test:unit is still noisy in this environment because unrelated admin-client tests hit local gRPC connection failures (ECONNREFUSED 127.0.0.1:50051).

Fixes #3706

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

@onthebed is attempting to deploy a commit to the Hatchet Team on Vercel.

A member of the Team first needs to authorize it.

@gregfurman gregfurman requested a review from mrkaye97 April 28, 2026 15:55
@mrkaye97
Copy link
Copy Markdown
Contributor

hi @onthebed, thanks for the contribution! I'd like a little more context here: If you're triggering from the dashboard, why would there be a parent span from the SDK? The SDK doesn't know anything about this run until it lands on a worker

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.

[BUG] [TS SDK OTEL] No workflow-level parent span when a run is triggered from the Hatchet dashboard

2 participants