fix(typescript-sdk): add workflow span fallback for dashboard-triggered runs#3710
Open
onthebed wants to merge 1 commit intohatchet-dev:mainfrom
Open
fix(typescript-sdk): add workflow span fallback for dashboard-triggered runs#3710onthebed wants to merge 1 commit intohatchet-dev:mainfrom
onthebed wants to merge 1 commit intohatchet-dev:mainfrom
Conversation
|
@onthebed is attempting to deploy a commit to the Hatchet Team on Vercel. A member of the Team first needs to authorize it. |
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 |
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.
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_runfallback 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.tspnpm lint:check && npx tscpnpm test:unitis still noisy in this environment because unrelated admin-client tests hit local gRPC connection failures (ECONNREFUSED 127.0.0.1:50051).Fixes #3706