[pull] main from vercel:main - #398
Merged
Merged
Conversation
…per-invocation traces (#2363) * otel: explicit traceparent injection + linked-trace mode for bounded per-invocation traces - Add WORKFLOW_TRACE_MODE ('linked' default, 'continuous' legacy) to the workflow and step queue handlers. In linked mode, WORKFLOW_V2/STEP spans start a new trace root with span links to the incoming delivery context and the run-origin context, and re-enqueued messages forward the ORIGINAL run-origin trace carrier unchanged. - world-vercel now explicitly injects W3C traceparent/tracestate/baggage headers on outgoing workflow-server HTTP requests from inside the client span (no-op without an OTEL SDK registered). - New workflow.trace.mode span attribute; unit tests for both modes and for header injection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * changeset: call out behavioral telemetry changes of the linked default Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: add v5 observability tracing page Documents OTEL spans/attributes, linked trace mode and WORKFLOW_TRACE_MODE, span links, context propagation, and the v4 behavior-change callout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * otel: human-friendly span names for workflow and step spans WORKFLOW_V2/STEP prefixes with full machine names (workflow//./src/...//fn) become workflow.execute / step.execute / workflow.start with the short function name. New workflowDisplayName/stepDisplayName helpers in @workflow/utils handle both raw and queue-sanitized name forms; full names remain in the workflow.name/step.name attributes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * changeset: merge span-name and linked-trace notes into one changeset Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: update trace-shape prose to renamed span names Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: replace ascii trace diagram with mermaid Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * address review: empty carriers, shared trace helpers, mode warning, name edge cases, consumer span kind - Treat an empty ({}) trace carrier as absent everywhere the trace-mode logic branches, so linked mode falls back to a fresh origin instead of forwarding a useless {} forever; workflow.trace.propagated now reports whether a usable carrier arrived. - Extract the duplicated linked-mode logic into shared telemetry helpers getNextTraceCarrier() and buildInvocationSpanLinks(), used by both the workflow and step queue handlers; resume-hook now uses linkToTraceCarrier (gaining the isSpanContextValid guard). - Warn once per distinct unrecognized WORKFLOW_TRACE_MODE value instead of silently selecting linked. - shortNameFromSanitized: map default/__default to the module short name (mirroring parseName) and document the `$`-sanitization limitation. - Queue-delivered workflow.execute spans now use the CONSUMER span kind, matching queue-delivered step.execute spans; docs span table and changeset updated accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…2439) @workflow/ai declares `workflow` as a peerDependency. By default, changesets force-bumps a package a full major whenever a peer dependency takes a minor/major bump, regardless of whether the new version is still within the declared range (`onlyUpdatePeerDependentsWhenOutOfRange` defaults to false). On the `stable` branch (regular changeset mode) this caused three ordinary `workflow` minors (4.3.0/4.4.0/4.5.0) to drag @workflow/ai to 5.0.0/6.0.0/7.0.0 with no real changes. Setting the option to true makes the major bump fire only when a new `workflow` version actually leaves @workflow/ai's `^4` peer range. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )