$ the-wire · showcase
Workflow failure logs regain their stacks, OpenTelemetry e2e stops flaking
By RepoJournal · Filed · About Vercel · Composed from the cited sources · methodology
vercel/workflow now renders the source-map-remapped error stack in its run-failure log, and vercel/next.js stabilized the OpenTelemetry instrumentation e2e suite that had been failing with closed-socket export errors.
vercel/workflow fixed a logging defect in `packages/core/src/log-format.ts` where `composeLogLine` unconditionally called `redundant.add('errorStack')` [1]. That assumption holds for the step executor and combined runtime, which render `${framing}\n${stack}` into the message, but not for the run-failure log whose framing line, "Error while running workflow", has no body of its own. The source-map-remapped `errorStack` that `runtime.ts` computed and passed in was dropped before reaching the console. The stack now renders in the run-failure log [2], closing the gap #4021 had noted.
vercel/next.js stabilized the OpenTelemetry instrumentation e2e suite by keeping its local span collector alive for each application's full lifetime [3]. The suite previously kept Next.js and custom-server exporters running across tests while closing and rebinding their collector port after every test, so exports landing in that gap failed with closed, reset, or refused socket errors before trace assertions could run [4]. Span state is now reset between tests without closing the collector, and the suite covers continuity across a test boundary.
Next.js also cut v16.4.0-canary.28 [5]. Routine canary traffic, no breaking changes described.
Action items
- → Upgrade @vercel/workflow to the release containing the run-failure log stack fix to get source-mapped stacks in production failure logs vercel/workflow [plan]
- → If you maintain OpenTelemetry instrumentation tests against Next.js, pick up the collector lifecycle stabilization from next.js to avoid closed-socket export flakes vercel/next.js [monitor]
References
- [1] fix(core): keep the error message and stack in the run-failure log ↗ vercel/workflow
- [2] fix(core): render the error stack in the run-failure log (#4145) ↗ vercel/workflow
- [3] test: stabilize OpenTelemetry collector lifecycle ↗ vercel/next.js
- [4] test: stabilize OpenTelemetry collector lifecycle (#98427) ↗ vercel/next.js
- [5] v16.4.0-canary.28 ↗ vercel/next.js