mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
90efb9653c
* otel(world-vercel): inject trace context on v4 event requests The v4 event path (createEvent / getEvent / listEvents) routes through fetchV4 → global fetch with a custom undici dispatcher, bypassing both the makeRequest path (where the explicit W3C trace-context injection lives) and ambient undici auto-instrumentation. As a result, v4 event traffic from the flow route carried no traceparent, so workflow-server could not parent its spans to the invocation — its spans never joined the /flow execution trace, even though v2/v3 reads/writes (via makeRequest) did join. fetchV4 now calls injectTraceContextIntoHeaders before fetch, the single choke point for all v4 create/get/list requests, mirroring makeRequest. No-op when no OpenTelemetry SDK is registered. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(agents): require trace-context injection on new world-vercel HTTP paths Codify the guardrail that the v4 regression revealed: any outgoing world-vercel request must call injectTraceContextIntoHeaders (auto- instrumentation can't be relied on with the custom dispatcher / global fetch), with a test in trace-propagation.test.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * changeset: make v4 trace-propagation note concise Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
297 B
297 B
@workflow/world-vercel
| @workflow/world-vercel |
|---|
| patch |
Inject W3C trace context (traceparent/tracestate/baggage) on v4 event requests, which previously bypassed it via fetchV4 — restoring workflow-server span correlation for traffic from the flow route. No-op when no OpenTelemetry SDK is registered.