Skip to content

Consolidate console logging to structured logger utility - #935

Merged
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging
Feb 5, 2026
Merged

Consolidate console logging to structured logger utility#935
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging

Conversation

@pranaygp

@pranaygppranaygp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all console.log, console.warn, and console.error calls in packages/core/src with the structured logger utility from logger.ts
  • Fix logger to always output error/warn to console - Previously errors were silently swallowed unless DEBUG env var was set
  • Fix log levels - Downgrade warnings that are really info (expected states), downgrade errors that are really warnings (transient failures with retry)
  • Remove verbose debug logs from hot paths (events-consumer)

Log Level Changes

MessageBeforeAfterReason
OpenTelemetry not availablewarninfoExpected in many environments
Workflow already completed, skippingwarninfoNormal state
Step/wait already exists, continuingwarninfoIdempotency case
Workflow run already completed, skipping step/hookwarninfoRace condition, normal
Step invoked erroneouslyerrorwarnHandled gracefully
Encountered Error, step will be retriederrorwarnTransient, will retry
Encountered RetryableErrorwarnwarnUnchanged (correct)
Step exceeded max retrieserrorerrorUnchanged (correct)
FatalError in steperrorerrorUnchanged (correct)
Error while running workflowerrorerrorUnchanged (correct)

Test plan

  • Build passes (pnpm build in packages/core)
  • All 304 tests pass (pnpm test in packages/core)
  • Verified error/warn logs now output to console with [Workflow] prefix
  • Verified no remaining raw console. calls in source files (only logger.ts and JSDoc examples)

🤖 Generated with Claude Code

Replace all console.log, console.warn, and console.error calls in
packages/core/src with the structured logger utility from logger.ts.
This provides consistent, filterable logging with OpenTelemetry
integration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 4, 2026 21:23
@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Feb 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7c9d7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/world-testingPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.032s (-29.6% 🟢)1.018s (~)0.987s101.00x
💻 LocalExpress0.043s (-3.6%)1.008s (~)0.965s101.36x
💻 LocalNitro0.044s (+2.8%)1.008s (~)0.964s101.38x
🐘 PostgresNitro0.196s (-7.8% 🟢)1.015s (~)0.818s106.19x
🐘 PostgresExpress0.233s (-4.4%)1.013s (~)0.780s107.36x
🐘 PostgresNext.js (Turbopack)0.269s (-29.4% 🟢)1.030s (+0.8%)0.762s108.47x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.780s (-0.9%)1.602s (-7.1% 🟢)0.822s101.00x
▲ VercelNitro0.790s (+10.1% 🔺)1.614s (-8.3% 🟢)0.824s101.01x
▲ VercelNext.js (Turbopack)1.223s (+42.2% 🔺)2.240s (+27.7% 🔺)1.017s101.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.087s (~)2.012s (~)0.924s101.00x
💻 LocalNitro1.114s (~)2.008s (~)0.893s101.02x
💻 LocalExpress1.119s (~)2.007s (~)0.888s101.03x
🐘 PostgresNext.js (Turbopack)1.837s (-1.6%)2.016s (-4.7%)0.179s101.69x
🐘 PostgresExpress2.189s (-1.7%)3.015s (~)0.826s102.01x
🐘 PostgresNitro2.336s (-4.2%)3.016s (~)0.680s102.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.941s (-5.2% 🟢)3.807s (-1.5%)0.867s101.00x
▲ VercelExpress2.945s (+2.4%)3.802s (+1.8%)0.857s101.00x
▲ VercelNitro2.948s (-2.3%)3.697s (-3.7%)0.749s101.00x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.569s (-1.3%)11.018s (~)0.449s31.00x
💻 LocalNitro10.818s (~)11.014s (~)0.195s31.02x
💻 LocalExpress10.833s (~)11.014s (~)0.181s31.02x
🐘 PostgresNext.js (Turbopack)14.537s (-2.7%)15.035s (-3.1%)0.498s21.38x
🐘 PostgresNitro20.441s (+0.6%)21.036s (~)0.595s21.93x
🐘 PostgresExpress20.505s (~)21.033s (~)0.529s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.599s (-3.3%)23.253s (-3.5%)0.654s21.00x
▲ VercelNext.js (Turbopack)23.230s (-2.4%)23.890s (-2.6%)0.660s21.03x
▲ VercelNitro23.816s (-1.8%)25.024s (-0.7%)1.208s21.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.858s (-1.4%)27.026s (-3.6%)0.168s31.00x
💻 LocalNitro27.447s (~)28.028s (~)0.581s31.02x
💻 LocalExpress27.484s (~)28.026s (~)0.543s31.02x
🐘 PostgresNext.js (Turbopack)34.968s (-5.1% 🟢)35.557s (-5.4% 🟢)0.589s21.30x
🐘 PostgresNitro50.310s (~)51.087s (~)0.776s21.87x
🐘 PostgresExpress50.411s (~)51.065s (~)0.653s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)56.506s (-5.0% 🟢)57.646s (-4.2%)1.140s21.00x
▲ VercelNitro57.748s (-3.2%)58.636s (-3.2%)0.888s21.02x
▲ VercelExpress58.274s (-3.4%)59.239s (-3.2%)0.965s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)55.651s (-1.7%)56.040s (-1.8%)0.388s21.00x
💻 LocalNitro57.103s (~)58.037s (~)0.933s21.03x
💻 LocalExpress57.194s (~)58.045s (~)0.851s21.03x
🐘 PostgresNext.js (Turbopack)69.502s (-6.0% 🟢)69.603s (-6.1% 🟢)0.101s21.25x
🐘 PostgresNitro100.122s (~)100.146s (-1.0%)0.024s11.80x
🐘 PostgresExpress100.229s (~)101.134s (~)0.905s11.80x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express119.676s (-2.4%)120.574s (-2.2%)0.898s11.00x
▲ VercelNitro119.902s (~)120.679s (~)0.777s11.00x
▲ VercelNext.js (Turbopack)120.556s (-0.7%)121.248s (-1.1%)0.692s11.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.364s (-1.6%)2.011s (~)0.647s151.00x
💻 LocalExpress1.401s (-1.9%)2.006s (~)0.605s151.03x
💻 LocalNitro1.403s (-1.0%)2.006s (~)0.603s151.03x
🐘 PostgresNext.js (Turbopack)2.038s (~)2.533s (-2.8%)0.495s121.49x
🐘 PostgresNitro2.267s (-2.7%)3.014s (~)0.747s101.66x
🐘 PostgresExpress2.334s (~)2.685s (-11.0% 🟢)0.351s121.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.989s (-3.7%)3.835s (+0.9%)0.846s81.00x
▲ VercelNitro3.009s (~)3.904s (-0.9%)0.895s81.01x
▲ VercelExpress3.147s (+9.9% 🔺)4.019s (+4.7%)0.873s81.05x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.292s (-8.9% 🟢)3.231s (+5.9% 🔺)0.939s101.00x
💻 LocalNitro2.539s (-1.0%)3.015s (~)0.476s101.11x
💻 LocalExpress2.572s (-0.9%)3.017s (~)0.445s101.12x
🐘 PostgresNitro8.459s (+2.5%)9.049s (~)0.591s43.69x
🐘 PostgresExpress10.865s (+13.7% 🔺)11.021s (+5.8% 🔺)0.156s34.74x
🐘 PostgresNext.js (Turbopack)11.642s (-7.0% 🟢)12.358s (-2.6%)0.715s35.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.197s (-9.6% 🟢)3.961s (-8.4% 🟢)0.764s81.00x
▲ VercelExpress3.855s (+17.9% 🔺)4.735s (+13.9% 🔺)0.880s71.21x
▲ VercelNext.js (Turbopack)3.867s (+10.6% 🔺)4.487s (+5.4% 🔺)0.620s71.21x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)5.573s (-19.8% 🟢)6.415s (-20.8% 🟢)0.842s51.00x
💻 LocalNitro7.111s (-2.7%)7.889s (-2.2%)0.778s41.28x
💻 LocalExpress7.505s (~)8.438s (-0.7%)0.933s41.35x
🐘 PostgresExpress49.315s (+9.3% 🔺)50.147s (+10.6% 🔺)0.832s18.85x
🐘 PostgresNitro52.542s (+8.7% 🔺)53.172s (+8.1% 🔺)0.630s19.43x
🐘 PostgresNext.js (Turbopack)57.286s (+10.4% 🔺)58.143s (+11.5% 🔺)0.857s110.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.560s (+32.0% 🔺)5.288s (+30.4% 🔺)0.728s71.00x
▲ VercelNext.js (Turbopack)5.302s (+52.3% 🔺)6.208s (+42.6% 🔺)0.906s51.16x
▲ VercelNitro5.705s (+73.2% 🔺)6.590s (+70.2% 🔺)0.885s61.25x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.393s (-1.7%)2.010s (~)0.617s151.00x
💻 LocalNitro1.425s (-0.5%)2.007s (~)0.582s151.02x
💻 LocalExpress1.432s (-1.1%)2.007s (~)0.575s151.03x
🐘 PostgresNext.js (Turbopack)1.859s (-14.2% 🟢)2.085s (-17.3% 🟢)0.226s151.33x
🐘 PostgresExpress1.959s (-6.2% 🟢)2.476s (-5.0% 🟢)0.518s131.41x
🐘 PostgresNitro2.151s (+8.8% 🔺)2.695s (+25.7% 🔺)0.544s121.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.829s (~)3.637s (-4.1%)0.808s91.00x
▲ VercelNitro2.830s (~)3.702s (-1.7%)0.872s91.00x
▲ VercelNext.js (Turbopack)2.918s (~)3.780s (~)0.863s81.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.453s (-7.2% 🟢)3.254s (+7.4% 🔺)0.801s101.00x
💻 LocalExpress2.659s (-1.5%)3.012s (~)0.353s101.08x
💻 LocalNitro2.678s (-3.3%)3.011s (~)0.333s101.09x
🐘 PostgresExpress11.178s (+2.5%)11.692s (~)0.514s34.56x
🐘 PostgresNext.js (Turbopack)11.590s (-8.6% 🟢)12.362s (-7.6% 🟢)0.771s34.73x
🐘 PostgresNitro13.220s (+27.1% 🔺)13.698s (+24.2% 🔺)0.479s35.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.976s (-4.2%)3.760s (-3.1%)0.785s91.00x
▲ VercelExpress3.011s (-1.6%)3.824s (+0.8%)0.814s81.01x
▲ VercelNitro3.083s (~)3.811s (-1.6%)0.728s81.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.822s (-8.0% 🟢)7.537s (-10.0% 🟢)0.715s51.00x
💻 LocalNitro7.715s (~)8.720s (~)1.005s41.13x
💻 LocalExpress7.835s (-2.4%)8.795s (-1.7%)0.960s41.15x
🐘 PostgresExpress51.962s (+8.9% 🔺)52.328s (+8.4% 🔺)0.366s17.62x
🐘 PostgresNitro52.639s (+4.0%)53.111s (+3.4%)0.472s17.72x
🐘 PostgresNext.js (Turbopack)56.380s (-2.0%)57.132s (-1.8%)0.752s18.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.445s (+6.8% 🔺)4.213s (+8.9% 🔺)0.768s81.00x
▲ VercelNext.js (Turbopack)3.478s (-11.4% 🟢)4.287s (-7.9% 🟢)0.809s71.01x
▲ VercelExpress3.930s (+12.9% 🔺)4.365s (+5.4% 🔺)0.435s71.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.117s (-18.7% 🟢)1.003s (~)0.013s (-20.2% 🟢)1.025s (~)0.908s101.00x
💻 LocalNitro0.180s (-1.6%)0.992s (~)0.014s (-2.9%)1.020s (~)0.840s101.54x
💻 LocalExpress0.187s (~)0.992s (~)0.015s (-6.5% 🟢)1.022s (~)0.834s101.60x
🐘 PostgresNext.js (Turbopack)0.614s (-7.7% 🟢)0.928s (-4.3%)0.000s (+Infinity% 🔺)1.016s (~)0.402s105.24x
🐘 PostgresExpress1.438s (-40.2% 🟢)1.602s (-39.4% 🟢)0.000s (+Infinity% 🔺)2.013s (-33.3% 🟢)0.575s1012.27x
🐘 PostgresNitro2.331s (+5.3% 🔺)2.712s (-4.1%)0.000s (~)3.016s (~)0.685s1019.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.890s (-6.3% 🟢)3.228s (-6.3% 🟢)0.149s (+8.6% 🔺)3.892s (-5.7% 🟢)1.003s101.00x
▲ VercelExpress2.986s (-3.8%)3.238s (-2.2%)0.182s (-4.5%)3.887s (-3.4%)0.901s101.03x
▲ VercelNext.js (Turbopack)3.076s (-1.4%)3.214s (-0.8%)0.217s (+45.1% 🔺)3.942s (+1.5%)0.866s101.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)12/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelExpress5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all console logging calls in packages/core/src to use a structured logger utility built on the debug library with OpenTelemetry integration. This provides consistent, filterable logging and removes duplicate logging patterns.

Changes:

  • Replaced all console.log, console.warn, and console.error calls with structured loggers (runtimeLogger, stepLogger) that accept structured metadata
  • Removed duplicate logging where both eventsLogger and console.error were called for the same event
  • Updated test expectations to remove console spy mocking since logging is now handled by the structured logger

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/core/src/telemetry.tsReplaced console.warn with runtimeLogger.warn for OpenTelemetry unavailable warning
packages/core/src/serialization.tsReplaced console.error calls with runtimeLogger.error, adding structured metadata for serialization failures
packages/core/src/runtime/suspension-handler.tsReplaced console.warn calls with runtimeLogger.warn, adding structured context including workflowRunId and correlationId
packages/core/src/runtime/step-handler.tsReplaced console.error/warn calls with stepLogger equivalents, converting formatted error stack strings to structured metadata
packages/core/src/runtime.tsReplaced console.warn/error calls with runtimeLogger equivalents, adding structured metadata for workflow status and errors
packages/core/src/observability.tsReplaced console.error with runtimeLogger.error for event data hydration errors
packages/core/src/events-consumer.tsRemoved duplicate console.error call, keeping only eventsLogger.error for callback errors
packages/core/src/events-consumer.test.tsRemoved console.error spy test code that is no longer needed since duplicate logging was removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Logger now outputs error/warn to console (always visible, not just when DEBUG enabled)
- Downgrade warn → info for expected states (OTel unavailable, workflow/step already completed, idempotency cases)
- Downgrade error → warn for transient failures (step invoked erroneously, error with retry pending)
- Remove verbose debug logs from hot paths (events-consumer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I also would love if the logger eventually moved to utils and then cli could use it too, among other packages, so that we eventually have a unified way of setting debug log level

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good

@pranaygp
pranaygp merged commit e0061b8 into mainFeb 5, 2026
98 checks passed
@pranaygp
pranaygp deleted the pranaygp/improved-logging branch February 5, 2026 00:16
pranaygp added a commit that referenced this pull request Feb 5, 2026
…-parallelization
* origin/main:
Add x-workflow-run-id header to queue messages (#922)
Bump Next.js and React in workbenches (#944)
Add subpath export resolution for package IDs (#901)
Consolidate console logging to structured logger utility (#935)
# Conflicts:
#	packages/core/src/runtime/step-handler.ts
Sign up for freeto 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.

4 participants

@pranaygp@VaguelySerious@karthikscale3
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Consolidate console logging to structured logger utility by pranaygp · Pull Request #935 · vercel/workflow · GitHub
Skip to content

Consolidate console logging to structured logger utility - #935

Merged
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging
Feb 5, 2026
Merged

Consolidate console logging to structured logger utility#935
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging

Conversation

@pranaygp

@pranaygppranaygp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all console.log, console.warn, and console.error calls in packages/core/src with the structured logger utility from logger.ts
  • Fix logger to always output error/warn to console - Previously errors were silently swallowed unless DEBUG env var was set
  • Fix log levels - Downgrade warnings that are really info (expected states), downgrade errors that are really warnings (transient failures with retry)
  • Remove verbose debug logs from hot paths (events-consumer)

Log Level Changes

MessageBeforeAfterReason
OpenTelemetry not availablewarninfoExpected in many environments
Workflow already completed, skippingwarninfoNormal state
Step/wait already exists, continuingwarninfoIdempotency case
Workflow run already completed, skipping step/hookwarninfoRace condition, normal
Step invoked erroneouslyerrorwarnHandled gracefully
Encountered Error, step will be retriederrorwarnTransient, will retry
Encountered RetryableErrorwarnwarnUnchanged (correct)
Step exceeded max retrieserrorerrorUnchanged (correct)
FatalError in steperrorerrorUnchanged (correct)
Error while running workflowerrorerrorUnchanged (correct)

Test plan

  • Build passes (pnpm build in packages/core)
  • All 304 tests pass (pnpm test in packages/core)
  • Verified error/warn logs now output to console with [Workflow] prefix
  • Verified no remaining raw console. calls in source files (only logger.ts and JSDoc examples)

🤖 Generated with Claude Code

Replace all console.log, console.warn, and console.error calls in
packages/core/src with the structured logger utility from logger.ts.
This provides consistent, filterable logging with OpenTelemetry
integration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 4, 2026 21:23
@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Feb 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7c9d7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/world-testingPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.032s (-29.6% 🟢)1.018s (~)0.987s101.00x
💻 LocalExpress0.043s (-3.6%)1.008s (~)0.965s101.36x
💻 LocalNitro0.044s (+2.8%)1.008s (~)0.964s101.38x
🐘 PostgresNitro0.196s (-7.8% 🟢)1.015s (~)0.818s106.19x
🐘 PostgresExpress0.233s (-4.4%)1.013s (~)0.780s107.36x
🐘 PostgresNext.js (Turbopack)0.269s (-29.4% 🟢)1.030s (+0.8%)0.762s108.47x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.780s (-0.9%)1.602s (-7.1% 🟢)0.822s101.00x
▲ VercelNitro0.790s (+10.1% 🔺)1.614s (-8.3% 🟢)0.824s101.01x
▲ VercelNext.js (Turbopack)1.223s (+42.2% 🔺)2.240s (+27.7% 🔺)1.017s101.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.087s (~)2.012s (~)0.924s101.00x
💻 LocalNitro1.114s (~)2.008s (~)0.893s101.02x
💻 LocalExpress1.119s (~)2.007s (~)0.888s101.03x
🐘 PostgresNext.js (Turbopack)1.837s (-1.6%)2.016s (-4.7%)0.179s101.69x
🐘 PostgresExpress2.189s (-1.7%)3.015s (~)0.826s102.01x
🐘 PostgresNitro2.336s (-4.2%)3.016s (~)0.680s102.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.941s (-5.2% 🟢)3.807s (-1.5%)0.867s101.00x
▲ VercelExpress2.945s (+2.4%)3.802s (+1.8%)0.857s101.00x
▲ VercelNitro2.948s (-2.3%)3.697s (-3.7%)0.749s101.00x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.569s (-1.3%)11.018s (~)0.449s31.00x
💻 LocalNitro10.818s (~)11.014s (~)0.195s31.02x
💻 LocalExpress10.833s (~)11.014s (~)0.181s31.02x
🐘 PostgresNext.js (Turbopack)14.537s (-2.7%)15.035s (-3.1%)0.498s21.38x
🐘 PostgresNitro20.441s (+0.6%)21.036s (~)0.595s21.93x
🐘 PostgresExpress20.505s (~)21.033s (~)0.529s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.599s (-3.3%)23.253s (-3.5%)0.654s21.00x
▲ VercelNext.js (Turbopack)23.230s (-2.4%)23.890s (-2.6%)0.660s21.03x
▲ VercelNitro23.816s (-1.8%)25.024s (-0.7%)1.208s21.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.858s (-1.4%)27.026s (-3.6%)0.168s31.00x
💻 LocalNitro27.447s (~)28.028s (~)0.581s31.02x
💻 LocalExpress27.484s (~)28.026s (~)0.543s31.02x
🐘 PostgresNext.js (Turbopack)34.968s (-5.1% 🟢)35.557s (-5.4% 🟢)0.589s21.30x
🐘 PostgresNitro50.310s (~)51.087s (~)0.776s21.87x
🐘 PostgresExpress50.411s (~)51.065s (~)0.653s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)56.506s (-5.0% 🟢)57.646s (-4.2%)1.140s21.00x
▲ VercelNitro57.748s (-3.2%)58.636s (-3.2%)0.888s21.02x
▲ VercelExpress58.274s (-3.4%)59.239s (-3.2%)0.965s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)55.651s (-1.7%)56.040s (-1.8%)0.388s21.00x
💻 LocalNitro57.103s (~)58.037s (~)0.933s21.03x
💻 LocalExpress57.194s (~)58.045s (~)0.851s21.03x
🐘 PostgresNext.js (Turbopack)69.502s (-6.0% 🟢)69.603s (-6.1% 🟢)0.101s21.25x
🐘 PostgresNitro100.122s (~)100.146s (-1.0%)0.024s11.80x
🐘 PostgresExpress100.229s (~)101.134s (~)0.905s11.80x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express119.676s (-2.4%)120.574s (-2.2%)0.898s11.00x
▲ VercelNitro119.902s (~)120.679s (~)0.777s11.00x
▲ VercelNext.js (Turbopack)120.556s (-0.7%)121.248s (-1.1%)0.692s11.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.364s (-1.6%)2.011s (~)0.647s151.00x
💻 LocalExpress1.401s (-1.9%)2.006s (~)0.605s151.03x
💻 LocalNitro1.403s (-1.0%)2.006s (~)0.603s151.03x
🐘 PostgresNext.js (Turbopack)2.038s (~)2.533s (-2.8%)0.495s121.49x
🐘 PostgresNitro2.267s (-2.7%)3.014s (~)0.747s101.66x
🐘 PostgresExpress2.334s (~)2.685s (-11.0% 🟢)0.351s121.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.989s (-3.7%)3.835s (+0.9%)0.846s81.00x
▲ VercelNitro3.009s (~)3.904s (-0.9%)0.895s81.01x
▲ VercelExpress3.147s (+9.9% 🔺)4.019s (+4.7%)0.873s81.05x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.292s (-8.9% 🟢)3.231s (+5.9% 🔺)0.939s101.00x
💻 LocalNitro2.539s (-1.0%)3.015s (~)0.476s101.11x
💻 LocalExpress2.572s (-0.9%)3.017s (~)0.445s101.12x
🐘 PostgresNitro8.459s (+2.5%)9.049s (~)0.591s43.69x
🐘 PostgresExpress10.865s (+13.7% 🔺)11.021s (+5.8% 🔺)0.156s34.74x
🐘 PostgresNext.js (Turbopack)11.642s (-7.0% 🟢)12.358s (-2.6%)0.715s35.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.197s (-9.6% 🟢)3.961s (-8.4% 🟢)0.764s81.00x
▲ VercelExpress3.855s (+17.9% 🔺)4.735s (+13.9% 🔺)0.880s71.21x
▲ VercelNext.js (Turbopack)3.867s (+10.6% 🔺)4.487s (+5.4% 🔺)0.620s71.21x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)5.573s (-19.8% 🟢)6.415s (-20.8% 🟢)0.842s51.00x
💻 LocalNitro7.111s (-2.7%)7.889s (-2.2%)0.778s41.28x
💻 LocalExpress7.505s (~)8.438s (-0.7%)0.933s41.35x
🐘 PostgresExpress49.315s (+9.3% 🔺)50.147s (+10.6% 🔺)0.832s18.85x
🐘 PostgresNitro52.542s (+8.7% 🔺)53.172s (+8.1% 🔺)0.630s19.43x
🐘 PostgresNext.js (Turbopack)57.286s (+10.4% 🔺)58.143s (+11.5% 🔺)0.857s110.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.560s (+32.0% 🔺)5.288s (+30.4% 🔺)0.728s71.00x
▲ VercelNext.js (Turbopack)5.302s (+52.3% 🔺)6.208s (+42.6% 🔺)0.906s51.16x
▲ VercelNitro5.705s (+73.2% 🔺)6.590s (+70.2% 🔺)0.885s61.25x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.393s (-1.7%)2.010s (~)0.617s151.00x
💻 LocalNitro1.425s (-0.5%)2.007s (~)0.582s151.02x
💻 LocalExpress1.432s (-1.1%)2.007s (~)0.575s151.03x
🐘 PostgresNext.js (Turbopack)1.859s (-14.2% 🟢)2.085s (-17.3% 🟢)0.226s151.33x
🐘 PostgresExpress1.959s (-6.2% 🟢)2.476s (-5.0% 🟢)0.518s131.41x
🐘 PostgresNitro2.151s (+8.8% 🔺)2.695s (+25.7% 🔺)0.544s121.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.829s (~)3.637s (-4.1%)0.808s91.00x
▲ VercelNitro2.830s (~)3.702s (-1.7%)0.872s91.00x
▲ VercelNext.js (Turbopack)2.918s (~)3.780s (~)0.863s81.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.453s (-7.2% 🟢)3.254s (+7.4% 🔺)0.801s101.00x
💻 LocalExpress2.659s (-1.5%)3.012s (~)0.353s101.08x
💻 LocalNitro2.678s (-3.3%)3.011s (~)0.333s101.09x
🐘 PostgresExpress11.178s (+2.5%)11.692s (~)0.514s34.56x
🐘 PostgresNext.js (Turbopack)11.590s (-8.6% 🟢)12.362s (-7.6% 🟢)0.771s34.73x
🐘 PostgresNitro13.220s (+27.1% 🔺)13.698s (+24.2% 🔺)0.479s35.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.976s (-4.2%)3.760s (-3.1%)0.785s91.00x
▲ VercelExpress3.011s (-1.6%)3.824s (+0.8%)0.814s81.01x
▲ VercelNitro3.083s (~)3.811s (-1.6%)0.728s81.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.822s (-8.0% 🟢)7.537s (-10.0% 🟢)0.715s51.00x
💻 LocalNitro7.715s (~)8.720s (~)1.005s41.13x
💻 LocalExpress7.835s (-2.4%)8.795s (-1.7%)0.960s41.15x
🐘 PostgresExpress51.962s (+8.9% 🔺)52.328s (+8.4% 🔺)0.366s17.62x
🐘 PostgresNitro52.639s (+4.0%)53.111s (+3.4%)0.472s17.72x
🐘 PostgresNext.js (Turbopack)56.380s (-2.0%)57.132s (-1.8%)0.752s18.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.445s (+6.8% 🔺)4.213s (+8.9% 🔺)0.768s81.00x
▲ VercelNext.js (Turbopack)3.478s (-11.4% 🟢)4.287s (-7.9% 🟢)0.809s71.01x
▲ VercelExpress3.930s (+12.9% 🔺)4.365s (+5.4% 🔺)0.435s71.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.117s (-18.7% 🟢)1.003s (~)0.013s (-20.2% 🟢)1.025s (~)0.908s101.00x
💻 LocalNitro0.180s (-1.6%)0.992s (~)0.014s (-2.9%)1.020s (~)0.840s101.54x
💻 LocalExpress0.187s (~)0.992s (~)0.015s (-6.5% 🟢)1.022s (~)0.834s101.60x
🐘 PostgresNext.js (Turbopack)0.614s (-7.7% 🟢)0.928s (-4.3%)0.000s (+Infinity% 🔺)1.016s (~)0.402s105.24x
🐘 PostgresExpress1.438s (-40.2% 🟢)1.602s (-39.4% 🟢)0.000s (+Infinity% 🔺)2.013s (-33.3% 🟢)0.575s1012.27x
🐘 PostgresNitro2.331s (+5.3% 🔺)2.712s (-4.1%)0.000s (~)3.016s (~)0.685s1019.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.890s (-6.3% 🟢)3.228s (-6.3% 🟢)0.149s (+8.6% 🔺)3.892s (-5.7% 🟢)1.003s101.00x
▲ VercelExpress2.986s (-3.8%)3.238s (-2.2%)0.182s (-4.5%)3.887s (-3.4%)0.901s101.03x
▲ VercelNext.js (Turbopack)3.076s (-1.4%)3.214s (-0.8%)0.217s (+45.1% 🔺)3.942s (+1.5%)0.866s101.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)12/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelExpress5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all console logging calls in packages/core/src to use a structured logger utility built on the debug library with OpenTelemetry integration. This provides consistent, filterable logging and removes duplicate logging patterns.

Changes:

  • Replaced all console.log, console.warn, and console.error calls with structured loggers (runtimeLogger, stepLogger) that accept structured metadata
  • Removed duplicate logging where both eventsLogger and console.error were called for the same event
  • Updated test expectations to remove console spy mocking since logging is now handled by the structured logger

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/core/src/telemetry.tsReplaced console.warn with runtimeLogger.warn for OpenTelemetry unavailable warning
packages/core/src/serialization.tsReplaced console.error calls with runtimeLogger.error, adding structured metadata for serialization failures
packages/core/src/runtime/suspension-handler.tsReplaced console.warn calls with runtimeLogger.warn, adding structured context including workflowRunId and correlationId
packages/core/src/runtime/step-handler.tsReplaced console.error/warn calls with stepLogger equivalents, converting formatted error stack strings to structured metadata
packages/core/src/runtime.tsReplaced console.warn/error calls with runtimeLogger equivalents, adding structured metadata for workflow status and errors
packages/core/src/observability.tsReplaced console.error with runtimeLogger.error for event data hydration errors
packages/core/src/events-consumer.tsRemoved duplicate console.error call, keeping only eventsLogger.error for callback errors
packages/core/src/events-consumer.test.tsRemoved console.error spy test code that is no longer needed since duplicate logging was removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Logger now outputs error/warn to console (always visible, not just when DEBUG enabled)
- Downgrade warn → info for expected states (OTel unavailable, workflow/step already completed, idempotency cases)
- Downgrade error → warn for transient failures (step invoked erroneously, error with retry pending)
- Remove verbose debug logs from hot paths (events-consumer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I also would love if the logger eventually moved to utils and then cli could use it too, among other packages, so that we eventually have a unified way of setting debug log level

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good

@pranaygp
pranaygp merged commit e0061b8 into mainFeb 5, 2026
98 checks passed
@pranaygp
pranaygp deleted the pranaygp/improved-logging branch February 5, 2026 00:16
pranaygp added a commit that referenced this pull request Feb 5, 2026
…-parallelization
* origin/main:
Add x-workflow-run-id header to queue messages (#922)
Bump Next.js and React in workbenches (#944)
Add subpath export resolution for package IDs (#901)
Consolidate console logging to structured logger utility (#935)
# Conflicts:
#	packages/core/src/runtime/step-handler.ts
Sign up for freeto 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.

4 participants

@pranaygp@VaguelySerious@karthikscale3
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Consolidate console logging to structured logger utility by pranaygp · Pull Request #935 · vercel/workflow · GitHub
Skip to content

Consolidate console logging to structured logger utility - #935

Merged
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging
Feb 5, 2026
Merged

Consolidate console logging to structured logger utility#935
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging

Conversation

@pranaygp

@pranaygppranaygp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all console.log, console.warn, and console.error calls in packages/core/src with the structured logger utility from logger.ts
  • Fix logger to always output error/warn to console - Previously errors were silently swallowed unless DEBUG env var was set
  • Fix log levels - Downgrade warnings that are really info (expected states), downgrade errors that are really warnings (transient failures with retry)
  • Remove verbose debug logs from hot paths (events-consumer)

Log Level Changes

MessageBeforeAfterReason
OpenTelemetry not availablewarninfoExpected in many environments
Workflow already completed, skippingwarninfoNormal state
Step/wait already exists, continuingwarninfoIdempotency case
Workflow run already completed, skipping step/hookwarninfoRace condition, normal
Step invoked erroneouslyerrorwarnHandled gracefully
Encountered Error, step will be retriederrorwarnTransient, will retry
Encountered RetryableErrorwarnwarnUnchanged (correct)
Step exceeded max retrieserrorerrorUnchanged (correct)
FatalError in steperrorerrorUnchanged (correct)
Error while running workflowerrorerrorUnchanged (correct)

Test plan

  • Build passes (pnpm build in packages/core)
  • All 304 tests pass (pnpm test in packages/core)
  • Verified error/warn logs now output to console with [Workflow] prefix
  • Verified no remaining raw console. calls in source files (only logger.ts and JSDoc examples)

🤖 Generated with Claude Code

Replace all console.log, console.warn, and console.error calls in
packages/core/src with the structured logger utility from logger.ts.
This provides consistent, filterable logging with OpenTelemetry
integration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 4, 2026 21:23
@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Feb 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7c9d7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/world-testingPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.032s (-29.6% 🟢)1.018s (~)0.987s101.00x
💻 LocalExpress0.043s (-3.6%)1.008s (~)0.965s101.36x
💻 LocalNitro0.044s (+2.8%)1.008s (~)0.964s101.38x
🐘 PostgresNitro0.196s (-7.8% 🟢)1.015s (~)0.818s106.19x
🐘 PostgresExpress0.233s (-4.4%)1.013s (~)0.780s107.36x
🐘 PostgresNext.js (Turbopack)0.269s (-29.4% 🟢)1.030s (+0.8%)0.762s108.47x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.780s (-0.9%)1.602s (-7.1% 🟢)0.822s101.00x
▲ VercelNitro0.790s (+10.1% 🔺)1.614s (-8.3% 🟢)0.824s101.01x
▲ VercelNext.js (Turbopack)1.223s (+42.2% 🔺)2.240s (+27.7% 🔺)1.017s101.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.087s (~)2.012s (~)0.924s101.00x
💻 LocalNitro1.114s (~)2.008s (~)0.893s101.02x
💻 LocalExpress1.119s (~)2.007s (~)0.888s101.03x
🐘 PostgresNext.js (Turbopack)1.837s (-1.6%)2.016s (-4.7%)0.179s101.69x
🐘 PostgresExpress2.189s (-1.7%)3.015s (~)0.826s102.01x
🐘 PostgresNitro2.336s (-4.2%)3.016s (~)0.680s102.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.941s (-5.2% 🟢)3.807s (-1.5%)0.867s101.00x
▲ VercelExpress2.945s (+2.4%)3.802s (+1.8%)0.857s101.00x
▲ VercelNitro2.948s (-2.3%)3.697s (-3.7%)0.749s101.00x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.569s (-1.3%)11.018s (~)0.449s31.00x
💻 LocalNitro10.818s (~)11.014s (~)0.195s31.02x
💻 LocalExpress10.833s (~)11.014s (~)0.181s31.02x
🐘 PostgresNext.js (Turbopack)14.537s (-2.7%)15.035s (-3.1%)0.498s21.38x
🐘 PostgresNitro20.441s (+0.6%)21.036s (~)0.595s21.93x
🐘 PostgresExpress20.505s (~)21.033s (~)0.529s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.599s (-3.3%)23.253s (-3.5%)0.654s21.00x
▲ VercelNext.js (Turbopack)23.230s (-2.4%)23.890s (-2.6%)0.660s21.03x
▲ VercelNitro23.816s (-1.8%)25.024s (-0.7%)1.208s21.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.858s (-1.4%)27.026s (-3.6%)0.168s31.00x
💻 LocalNitro27.447s (~)28.028s (~)0.581s31.02x
💻 LocalExpress27.484s (~)28.026s (~)0.543s31.02x
🐘 PostgresNext.js (Turbopack)34.968s (-5.1% 🟢)35.557s (-5.4% 🟢)0.589s21.30x
🐘 PostgresNitro50.310s (~)51.087s (~)0.776s21.87x
🐘 PostgresExpress50.411s (~)51.065s (~)0.653s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)56.506s (-5.0% 🟢)57.646s (-4.2%)1.140s21.00x
▲ VercelNitro57.748s (-3.2%)58.636s (-3.2%)0.888s21.02x
▲ VercelExpress58.274s (-3.4%)59.239s (-3.2%)0.965s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)55.651s (-1.7%)56.040s (-1.8%)0.388s21.00x
💻 LocalNitro57.103s (~)58.037s (~)0.933s21.03x
💻 LocalExpress57.194s (~)58.045s (~)0.851s21.03x
🐘 PostgresNext.js (Turbopack)69.502s (-6.0% 🟢)69.603s (-6.1% 🟢)0.101s21.25x
🐘 PostgresNitro100.122s (~)100.146s (-1.0%)0.024s11.80x
🐘 PostgresExpress100.229s (~)101.134s (~)0.905s11.80x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express119.676s (-2.4%)120.574s (-2.2%)0.898s11.00x
▲ VercelNitro119.902s (~)120.679s (~)0.777s11.00x
▲ VercelNext.js (Turbopack)120.556s (-0.7%)121.248s (-1.1%)0.692s11.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.364s (-1.6%)2.011s (~)0.647s151.00x
💻 LocalExpress1.401s (-1.9%)2.006s (~)0.605s151.03x
💻 LocalNitro1.403s (-1.0%)2.006s (~)0.603s151.03x
🐘 PostgresNext.js (Turbopack)2.038s (~)2.533s (-2.8%)0.495s121.49x
🐘 PostgresNitro2.267s (-2.7%)3.014s (~)0.747s101.66x
🐘 PostgresExpress2.334s (~)2.685s (-11.0% 🟢)0.351s121.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.989s (-3.7%)3.835s (+0.9%)0.846s81.00x
▲ VercelNitro3.009s (~)3.904s (-0.9%)0.895s81.01x
▲ VercelExpress3.147s (+9.9% 🔺)4.019s (+4.7%)0.873s81.05x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.292s (-8.9% 🟢)3.231s (+5.9% 🔺)0.939s101.00x
💻 LocalNitro2.539s (-1.0%)3.015s (~)0.476s101.11x
💻 LocalExpress2.572s (-0.9%)3.017s (~)0.445s101.12x
🐘 PostgresNitro8.459s (+2.5%)9.049s (~)0.591s43.69x
🐘 PostgresExpress10.865s (+13.7% 🔺)11.021s (+5.8% 🔺)0.156s34.74x
🐘 PostgresNext.js (Turbopack)11.642s (-7.0% 🟢)12.358s (-2.6%)0.715s35.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.197s (-9.6% 🟢)3.961s (-8.4% 🟢)0.764s81.00x
▲ VercelExpress3.855s (+17.9% 🔺)4.735s (+13.9% 🔺)0.880s71.21x
▲ VercelNext.js (Turbopack)3.867s (+10.6% 🔺)4.487s (+5.4% 🔺)0.620s71.21x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)5.573s (-19.8% 🟢)6.415s (-20.8% 🟢)0.842s51.00x
💻 LocalNitro7.111s (-2.7%)7.889s (-2.2%)0.778s41.28x
💻 LocalExpress7.505s (~)8.438s (-0.7%)0.933s41.35x
🐘 PostgresExpress49.315s (+9.3% 🔺)50.147s (+10.6% 🔺)0.832s18.85x
🐘 PostgresNitro52.542s (+8.7% 🔺)53.172s (+8.1% 🔺)0.630s19.43x
🐘 PostgresNext.js (Turbopack)57.286s (+10.4% 🔺)58.143s (+11.5% 🔺)0.857s110.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.560s (+32.0% 🔺)5.288s (+30.4% 🔺)0.728s71.00x
▲ VercelNext.js (Turbopack)5.302s (+52.3% 🔺)6.208s (+42.6% 🔺)0.906s51.16x
▲ VercelNitro5.705s (+73.2% 🔺)6.590s (+70.2% 🔺)0.885s61.25x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.393s (-1.7%)2.010s (~)0.617s151.00x
💻 LocalNitro1.425s (-0.5%)2.007s (~)0.582s151.02x
💻 LocalExpress1.432s (-1.1%)2.007s (~)0.575s151.03x
🐘 PostgresNext.js (Turbopack)1.859s (-14.2% 🟢)2.085s (-17.3% 🟢)0.226s151.33x
🐘 PostgresExpress1.959s (-6.2% 🟢)2.476s (-5.0% 🟢)0.518s131.41x
🐘 PostgresNitro2.151s (+8.8% 🔺)2.695s (+25.7% 🔺)0.544s121.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.829s (~)3.637s (-4.1%)0.808s91.00x
▲ VercelNitro2.830s (~)3.702s (-1.7%)0.872s91.00x
▲ VercelNext.js (Turbopack)2.918s (~)3.780s (~)0.863s81.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.453s (-7.2% 🟢)3.254s (+7.4% 🔺)0.801s101.00x
💻 LocalExpress2.659s (-1.5%)3.012s (~)0.353s101.08x
💻 LocalNitro2.678s (-3.3%)3.011s (~)0.333s101.09x
🐘 PostgresExpress11.178s (+2.5%)11.692s (~)0.514s34.56x
🐘 PostgresNext.js (Turbopack)11.590s (-8.6% 🟢)12.362s (-7.6% 🟢)0.771s34.73x
🐘 PostgresNitro13.220s (+27.1% 🔺)13.698s (+24.2% 🔺)0.479s35.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.976s (-4.2%)3.760s (-3.1%)0.785s91.00x
▲ VercelExpress3.011s (-1.6%)3.824s (+0.8%)0.814s81.01x
▲ VercelNitro3.083s (~)3.811s (-1.6%)0.728s81.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.822s (-8.0% 🟢)7.537s (-10.0% 🟢)0.715s51.00x
💻 LocalNitro7.715s (~)8.720s (~)1.005s41.13x
💻 LocalExpress7.835s (-2.4%)8.795s (-1.7%)0.960s41.15x
🐘 PostgresExpress51.962s (+8.9% 🔺)52.328s (+8.4% 🔺)0.366s17.62x
🐘 PostgresNitro52.639s (+4.0%)53.111s (+3.4%)0.472s17.72x
🐘 PostgresNext.js (Turbopack)56.380s (-2.0%)57.132s (-1.8%)0.752s18.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.445s (+6.8% 🔺)4.213s (+8.9% 🔺)0.768s81.00x
▲ VercelNext.js (Turbopack)3.478s (-11.4% 🟢)4.287s (-7.9% 🟢)0.809s71.01x
▲ VercelExpress3.930s (+12.9% 🔺)4.365s (+5.4% 🔺)0.435s71.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.117s (-18.7% 🟢)1.003s (~)0.013s (-20.2% 🟢)1.025s (~)0.908s101.00x
💻 LocalNitro0.180s (-1.6%)0.992s (~)0.014s (-2.9%)1.020s (~)0.840s101.54x
💻 LocalExpress0.187s (~)0.992s (~)0.015s (-6.5% 🟢)1.022s (~)0.834s101.60x
🐘 PostgresNext.js (Turbopack)0.614s (-7.7% 🟢)0.928s (-4.3%)0.000s (+Infinity% 🔺)1.016s (~)0.402s105.24x
🐘 PostgresExpress1.438s (-40.2% 🟢)1.602s (-39.4% 🟢)0.000s (+Infinity% 🔺)2.013s (-33.3% 🟢)0.575s1012.27x
🐘 PostgresNitro2.331s (+5.3% 🔺)2.712s (-4.1%)0.000s (~)3.016s (~)0.685s1019.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.890s (-6.3% 🟢)3.228s (-6.3% 🟢)0.149s (+8.6% 🔺)3.892s (-5.7% 🟢)1.003s101.00x
▲ VercelExpress2.986s (-3.8%)3.238s (-2.2%)0.182s (-4.5%)3.887s (-3.4%)0.901s101.03x
▲ VercelNext.js (Turbopack)3.076s (-1.4%)3.214s (-0.8%)0.217s (+45.1% 🔺)3.942s (+1.5%)0.866s101.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)12/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelExpress5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all console logging calls in packages/core/src to use a structured logger utility built on the debug library with OpenTelemetry integration. This provides consistent, filterable logging and removes duplicate logging patterns.

Changes:

  • Replaced all console.log, console.warn, and console.error calls with structured loggers (runtimeLogger, stepLogger) that accept structured metadata
  • Removed duplicate logging where both eventsLogger and console.error were called for the same event
  • Updated test expectations to remove console spy mocking since logging is now handled by the structured logger

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/core/src/telemetry.tsReplaced console.warn with runtimeLogger.warn for OpenTelemetry unavailable warning
packages/core/src/serialization.tsReplaced console.error calls with runtimeLogger.error, adding structured metadata for serialization failures
packages/core/src/runtime/suspension-handler.tsReplaced console.warn calls with runtimeLogger.warn, adding structured context including workflowRunId and correlationId
packages/core/src/runtime/step-handler.tsReplaced console.error/warn calls with stepLogger equivalents, converting formatted error stack strings to structured metadata
packages/core/src/runtime.tsReplaced console.warn/error calls with runtimeLogger equivalents, adding structured metadata for workflow status and errors
packages/core/src/observability.tsReplaced console.error with runtimeLogger.error for event data hydration errors
packages/core/src/events-consumer.tsRemoved duplicate console.error call, keeping only eventsLogger.error for callback errors
packages/core/src/events-consumer.test.tsRemoved console.error spy test code that is no longer needed since duplicate logging was removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Logger now outputs error/warn to console (always visible, not just when DEBUG enabled)
- Downgrade warn → info for expected states (OTel unavailable, workflow/step already completed, idempotency cases)
- Downgrade error → warn for transient failures (step invoked erroneously, error with retry pending)
- Remove verbose debug logs from hot paths (events-consumer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I also would love if the logger eventually moved to utils and then cli could use it too, among other packages, so that we eventually have a unified way of setting debug log level

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good

@pranaygp
pranaygp merged commit e0061b8 into mainFeb 5, 2026
98 checks passed
@pranaygp
pranaygp deleted the pranaygp/improved-logging branch February 5, 2026 00:16
pranaygp added a commit that referenced this pull request Feb 5, 2026
…-parallelization
* origin/main:
Add x-workflow-run-id header to queue messages (#922)
Bump Next.js and React in workbenches (#944)
Add subpath export resolution for package IDs (#901)
Consolidate console logging to structured logger utility (#935)
# Conflicts:
#	packages/core/src/runtime/step-handler.ts
Sign up for freeto 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.

4 participants

@pranaygp@VaguelySerious@karthikscale3
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Consolidate console logging to structured logger utility by pranaygp · Pull Request #935 · vercel/workflow · GitHub
Skip to content

Consolidate console logging to structured logger utility - #935

Merged
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging
Feb 5, 2026
Merged

Consolidate console logging to structured logger utility#935
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging

Conversation

@pranaygp

@pranaygppranaygp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all console.log, console.warn, and console.error calls in packages/core/src with the structured logger utility from logger.ts
  • Fix logger to always output error/warn to console - Previously errors were silently swallowed unless DEBUG env var was set
  • Fix log levels - Downgrade warnings that are really info (expected states), downgrade errors that are really warnings (transient failures with retry)
  • Remove verbose debug logs from hot paths (events-consumer)

Log Level Changes

MessageBeforeAfterReason
OpenTelemetry not availablewarninfoExpected in many environments
Workflow already completed, skippingwarninfoNormal state
Step/wait already exists, continuingwarninfoIdempotency case
Workflow run already completed, skipping step/hookwarninfoRace condition, normal
Step invoked erroneouslyerrorwarnHandled gracefully
Encountered Error, step will be retriederrorwarnTransient, will retry
Encountered RetryableErrorwarnwarnUnchanged (correct)
Step exceeded max retrieserrorerrorUnchanged (correct)
FatalError in steperrorerrorUnchanged (correct)
Error while running workflowerrorerrorUnchanged (correct)

Test plan

  • Build passes (pnpm build in packages/core)
  • All 304 tests pass (pnpm test in packages/core)
  • Verified error/warn logs now output to console with [Workflow] prefix
  • Verified no remaining raw console. calls in source files (only logger.ts and JSDoc examples)

🤖 Generated with Claude Code

Replace all console.log, console.warn, and console.error calls in
packages/core/src with the structured logger utility from logger.ts.
This provides consistent, filterable logging with OpenTelemetry
integration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 4, 2026 21:23
@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Feb 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7c9d7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/world-testingPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.032s (-29.6% 🟢)1.018s (~)0.987s101.00x
💻 LocalExpress0.043s (-3.6%)1.008s (~)0.965s101.36x
💻 LocalNitro0.044s (+2.8%)1.008s (~)0.964s101.38x
🐘 PostgresNitro0.196s (-7.8% 🟢)1.015s (~)0.818s106.19x
🐘 PostgresExpress0.233s (-4.4%)1.013s (~)0.780s107.36x
🐘 PostgresNext.js (Turbopack)0.269s (-29.4% 🟢)1.030s (+0.8%)0.762s108.47x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.780s (-0.9%)1.602s (-7.1% 🟢)0.822s101.00x
▲ VercelNitro0.790s (+10.1% 🔺)1.614s (-8.3% 🟢)0.824s101.01x
▲ VercelNext.js (Turbopack)1.223s (+42.2% 🔺)2.240s (+27.7% 🔺)1.017s101.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.087s (~)2.012s (~)0.924s101.00x
💻 LocalNitro1.114s (~)2.008s (~)0.893s101.02x
💻 LocalExpress1.119s (~)2.007s (~)0.888s101.03x
🐘 PostgresNext.js (Turbopack)1.837s (-1.6%)2.016s (-4.7%)0.179s101.69x
🐘 PostgresExpress2.189s (-1.7%)3.015s (~)0.826s102.01x
🐘 PostgresNitro2.336s (-4.2%)3.016s (~)0.680s102.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.941s (-5.2% 🟢)3.807s (-1.5%)0.867s101.00x
▲ VercelExpress2.945s (+2.4%)3.802s (+1.8%)0.857s101.00x
▲ VercelNitro2.948s (-2.3%)3.697s (-3.7%)0.749s101.00x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.569s (-1.3%)11.018s (~)0.449s31.00x
💻 LocalNitro10.818s (~)11.014s (~)0.195s31.02x
💻 LocalExpress10.833s (~)11.014s (~)0.181s31.02x
🐘 PostgresNext.js (Turbopack)14.537s (-2.7%)15.035s (-3.1%)0.498s21.38x
🐘 PostgresNitro20.441s (+0.6%)21.036s (~)0.595s21.93x
🐘 PostgresExpress20.505s (~)21.033s (~)0.529s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.599s (-3.3%)23.253s (-3.5%)0.654s21.00x
▲ VercelNext.js (Turbopack)23.230s (-2.4%)23.890s (-2.6%)0.660s21.03x
▲ VercelNitro23.816s (-1.8%)25.024s (-0.7%)1.208s21.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.858s (-1.4%)27.026s (-3.6%)0.168s31.00x
💻 LocalNitro27.447s (~)28.028s (~)0.581s31.02x
💻 LocalExpress27.484s (~)28.026s (~)0.543s31.02x
🐘 PostgresNext.js (Turbopack)34.968s (-5.1% 🟢)35.557s (-5.4% 🟢)0.589s21.30x
🐘 PostgresNitro50.310s (~)51.087s (~)0.776s21.87x
🐘 PostgresExpress50.411s (~)51.065s (~)0.653s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)56.506s (-5.0% 🟢)57.646s (-4.2%)1.140s21.00x
▲ VercelNitro57.748s (-3.2%)58.636s (-3.2%)0.888s21.02x
▲ VercelExpress58.274s (-3.4%)59.239s (-3.2%)0.965s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)55.651s (-1.7%)56.040s (-1.8%)0.388s21.00x
💻 LocalNitro57.103s (~)58.037s (~)0.933s21.03x
💻 LocalExpress57.194s (~)58.045s (~)0.851s21.03x
🐘 PostgresNext.js (Turbopack)69.502s (-6.0% 🟢)69.603s (-6.1% 🟢)0.101s21.25x
🐘 PostgresNitro100.122s (~)100.146s (-1.0%)0.024s11.80x
🐘 PostgresExpress100.229s (~)101.134s (~)0.905s11.80x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express119.676s (-2.4%)120.574s (-2.2%)0.898s11.00x
▲ VercelNitro119.902s (~)120.679s (~)0.777s11.00x
▲ VercelNext.js (Turbopack)120.556s (-0.7%)121.248s (-1.1%)0.692s11.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.364s (-1.6%)2.011s (~)0.647s151.00x
💻 LocalExpress1.401s (-1.9%)2.006s (~)0.605s151.03x
💻 LocalNitro1.403s (-1.0%)2.006s (~)0.603s151.03x
🐘 PostgresNext.js (Turbopack)2.038s (~)2.533s (-2.8%)0.495s121.49x
🐘 PostgresNitro2.267s (-2.7%)3.014s (~)0.747s101.66x
🐘 PostgresExpress2.334s (~)2.685s (-11.0% 🟢)0.351s121.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.989s (-3.7%)3.835s (+0.9%)0.846s81.00x
▲ VercelNitro3.009s (~)3.904s (-0.9%)0.895s81.01x
▲ VercelExpress3.147s (+9.9% 🔺)4.019s (+4.7%)0.873s81.05x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.292s (-8.9% 🟢)3.231s (+5.9% 🔺)0.939s101.00x
💻 LocalNitro2.539s (-1.0%)3.015s (~)0.476s101.11x
💻 LocalExpress2.572s (-0.9%)3.017s (~)0.445s101.12x
🐘 PostgresNitro8.459s (+2.5%)9.049s (~)0.591s43.69x
🐘 PostgresExpress10.865s (+13.7% 🔺)11.021s (+5.8% 🔺)0.156s34.74x
🐘 PostgresNext.js (Turbopack)11.642s (-7.0% 🟢)12.358s (-2.6%)0.715s35.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.197s (-9.6% 🟢)3.961s (-8.4% 🟢)0.764s81.00x
▲ VercelExpress3.855s (+17.9% 🔺)4.735s (+13.9% 🔺)0.880s71.21x
▲ VercelNext.js (Turbopack)3.867s (+10.6% 🔺)4.487s (+5.4% 🔺)0.620s71.21x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)5.573s (-19.8% 🟢)6.415s (-20.8% 🟢)0.842s51.00x
💻 LocalNitro7.111s (-2.7%)7.889s (-2.2%)0.778s41.28x
💻 LocalExpress7.505s (~)8.438s (-0.7%)0.933s41.35x
🐘 PostgresExpress49.315s (+9.3% 🔺)50.147s (+10.6% 🔺)0.832s18.85x
🐘 PostgresNitro52.542s (+8.7% 🔺)53.172s (+8.1% 🔺)0.630s19.43x
🐘 PostgresNext.js (Turbopack)57.286s (+10.4% 🔺)58.143s (+11.5% 🔺)0.857s110.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.560s (+32.0% 🔺)5.288s (+30.4% 🔺)0.728s71.00x
▲ VercelNext.js (Turbopack)5.302s (+52.3% 🔺)6.208s (+42.6% 🔺)0.906s51.16x
▲ VercelNitro5.705s (+73.2% 🔺)6.590s (+70.2% 🔺)0.885s61.25x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.393s (-1.7%)2.010s (~)0.617s151.00x
💻 LocalNitro1.425s (-0.5%)2.007s (~)0.582s151.02x
💻 LocalExpress1.432s (-1.1%)2.007s (~)0.575s151.03x
🐘 PostgresNext.js (Turbopack)1.859s (-14.2% 🟢)2.085s (-17.3% 🟢)0.226s151.33x
🐘 PostgresExpress1.959s (-6.2% 🟢)2.476s (-5.0% 🟢)0.518s131.41x
🐘 PostgresNitro2.151s (+8.8% 🔺)2.695s (+25.7% 🔺)0.544s121.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.829s (~)3.637s (-4.1%)0.808s91.00x
▲ VercelNitro2.830s (~)3.702s (-1.7%)0.872s91.00x
▲ VercelNext.js (Turbopack)2.918s (~)3.780s (~)0.863s81.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.453s (-7.2% 🟢)3.254s (+7.4% 🔺)0.801s101.00x
💻 LocalExpress2.659s (-1.5%)3.012s (~)0.353s101.08x
💻 LocalNitro2.678s (-3.3%)3.011s (~)0.333s101.09x
🐘 PostgresExpress11.178s (+2.5%)11.692s (~)0.514s34.56x
🐘 PostgresNext.js (Turbopack)11.590s (-8.6% 🟢)12.362s (-7.6% 🟢)0.771s34.73x
🐘 PostgresNitro13.220s (+27.1% 🔺)13.698s (+24.2% 🔺)0.479s35.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.976s (-4.2%)3.760s (-3.1%)0.785s91.00x
▲ VercelExpress3.011s (-1.6%)3.824s (+0.8%)0.814s81.01x
▲ VercelNitro3.083s (~)3.811s (-1.6%)0.728s81.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.822s (-8.0% 🟢)7.537s (-10.0% 🟢)0.715s51.00x
💻 LocalNitro7.715s (~)8.720s (~)1.005s41.13x
💻 LocalExpress7.835s (-2.4%)8.795s (-1.7%)0.960s41.15x
🐘 PostgresExpress51.962s (+8.9% 🔺)52.328s (+8.4% 🔺)0.366s17.62x
🐘 PostgresNitro52.639s (+4.0%)53.111s (+3.4%)0.472s17.72x
🐘 PostgresNext.js (Turbopack)56.380s (-2.0%)57.132s (-1.8%)0.752s18.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.445s (+6.8% 🔺)4.213s (+8.9% 🔺)0.768s81.00x
▲ VercelNext.js (Turbopack)3.478s (-11.4% 🟢)4.287s (-7.9% 🟢)0.809s71.01x
▲ VercelExpress3.930s (+12.9% 🔺)4.365s (+5.4% 🔺)0.435s71.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.117s (-18.7% 🟢)1.003s (~)0.013s (-20.2% 🟢)1.025s (~)0.908s101.00x
💻 LocalNitro0.180s (-1.6%)0.992s (~)0.014s (-2.9%)1.020s (~)0.840s101.54x
💻 LocalExpress0.187s (~)0.992s (~)0.015s (-6.5% 🟢)1.022s (~)0.834s101.60x
🐘 PostgresNext.js (Turbopack)0.614s (-7.7% 🟢)0.928s (-4.3%)0.000s (+Infinity% 🔺)1.016s (~)0.402s105.24x
🐘 PostgresExpress1.438s (-40.2% 🟢)1.602s (-39.4% 🟢)0.000s (+Infinity% 🔺)2.013s (-33.3% 🟢)0.575s1012.27x
🐘 PostgresNitro2.331s (+5.3% 🔺)2.712s (-4.1%)0.000s (~)3.016s (~)0.685s1019.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.890s (-6.3% 🟢)3.228s (-6.3% 🟢)0.149s (+8.6% 🔺)3.892s (-5.7% 🟢)1.003s101.00x
▲ VercelExpress2.986s (-3.8%)3.238s (-2.2%)0.182s (-4.5%)3.887s (-3.4%)0.901s101.03x
▲ VercelNext.js (Turbopack)3.076s (-1.4%)3.214s (-0.8%)0.217s (+45.1% 🔺)3.942s (+1.5%)0.866s101.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)12/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelExpress5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all console logging calls in packages/core/src to use a structured logger utility built on the debug library with OpenTelemetry integration. This provides consistent, filterable logging and removes duplicate logging patterns.

Changes:

  • Replaced all console.log, console.warn, and console.error calls with structured loggers (runtimeLogger, stepLogger) that accept structured metadata
  • Removed duplicate logging where both eventsLogger and console.error were called for the same event
  • Updated test expectations to remove console spy mocking since logging is now handled by the structured logger

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/core/src/telemetry.tsReplaced console.warn with runtimeLogger.warn for OpenTelemetry unavailable warning
packages/core/src/serialization.tsReplaced console.error calls with runtimeLogger.error, adding structured metadata for serialization failures
packages/core/src/runtime/suspension-handler.tsReplaced console.warn calls with runtimeLogger.warn, adding structured context including workflowRunId and correlationId
packages/core/src/runtime/step-handler.tsReplaced console.error/warn calls with stepLogger equivalents, converting formatted error stack strings to structured metadata
packages/core/src/runtime.tsReplaced console.warn/error calls with runtimeLogger equivalents, adding structured metadata for workflow status and errors
packages/core/src/observability.tsReplaced console.error with runtimeLogger.error for event data hydration errors
packages/core/src/events-consumer.tsRemoved duplicate console.error call, keeping only eventsLogger.error for callback errors
packages/core/src/events-consumer.test.tsRemoved console.error spy test code that is no longer needed since duplicate logging was removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Logger now outputs error/warn to console (always visible, not just when DEBUG enabled)
- Downgrade warn → info for expected states (OTel unavailable, workflow/step already completed, idempotency cases)
- Downgrade error → warn for transient failures (step invoked erroneously, error with retry pending)
- Remove verbose debug logs from hot paths (events-consumer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I also would love if the logger eventually moved to utils and then cli could use it too, among other packages, so that we eventually have a unified way of setting debug log level

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good

@pranaygp
pranaygp merged commit e0061b8 into mainFeb 5, 2026
98 checks passed
@pranaygp
pranaygp deleted the pranaygp/improved-logging branch February 5, 2026 00:16
pranaygp added a commit that referenced this pull request Feb 5, 2026
…-parallelization
* origin/main:
Add x-workflow-run-id header to queue messages (#922)
Bump Next.js and React in workbenches (#944)
Add subpath export resolution for package IDs (#901)
Consolidate console logging to structured logger utility (#935)
# Conflicts:
#	packages/core/src/runtime/step-handler.ts
Sign up for freeto 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.

4 participants

@pranaygp@VaguelySerious@karthikscale3
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Consolidate console logging to structured logger utility by pranaygp · Pull Request #935 · vercel/workflow · GitHub
Skip to content

Consolidate console logging to structured logger utility - #935

Merged
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging
Feb 5, 2026
Merged

Consolidate console logging to structured logger utility#935
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging

Conversation

@pranaygp

@pranaygppranaygp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all console.log, console.warn, and console.error calls in packages/core/src with the structured logger utility from logger.ts
  • Fix logger to always output error/warn to console - Previously errors were silently swallowed unless DEBUG env var was set
  • Fix log levels - Downgrade warnings that are really info (expected states), downgrade errors that are really warnings (transient failures with retry)
  • Remove verbose debug logs from hot paths (events-consumer)

Log Level Changes

MessageBeforeAfterReason
OpenTelemetry not availablewarninfoExpected in many environments
Workflow already completed, skippingwarninfoNormal state
Step/wait already exists, continuingwarninfoIdempotency case
Workflow run already completed, skipping step/hookwarninfoRace condition, normal
Step invoked erroneouslyerrorwarnHandled gracefully
Encountered Error, step will be retriederrorwarnTransient, will retry
Encountered RetryableErrorwarnwarnUnchanged (correct)
Step exceeded max retrieserrorerrorUnchanged (correct)
FatalError in steperrorerrorUnchanged (correct)
Error while running workflowerrorerrorUnchanged (correct)

Test plan

  • Build passes (pnpm build in packages/core)
  • All 304 tests pass (pnpm test in packages/core)
  • Verified error/warn logs now output to console with [Workflow] prefix
  • Verified no remaining raw console. calls in source files (only logger.ts and JSDoc examples)

🤖 Generated with Claude Code

Replace all console.log, console.warn, and console.error calls in
packages/core/src with the structured logger utility from logger.ts.
This provides consistent, filterable logging with OpenTelemetry
integration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 4, 2026 21:23
@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Feb 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7c9d7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/world-testingPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.032s (-29.6% 🟢)1.018s (~)0.987s101.00x
💻 LocalExpress0.043s (-3.6%)1.008s (~)0.965s101.36x
💻 LocalNitro0.044s (+2.8%)1.008s (~)0.964s101.38x
🐘 PostgresNitro0.196s (-7.8% 🟢)1.015s (~)0.818s106.19x
🐘 PostgresExpress0.233s (-4.4%)1.013s (~)0.780s107.36x
🐘 PostgresNext.js (Turbopack)0.269s (-29.4% 🟢)1.030s (+0.8%)0.762s108.47x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.780s (-0.9%)1.602s (-7.1% 🟢)0.822s101.00x
▲ VercelNitro0.790s (+10.1% 🔺)1.614s (-8.3% 🟢)0.824s101.01x
▲ VercelNext.js (Turbopack)1.223s (+42.2% 🔺)2.240s (+27.7% 🔺)1.017s101.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.087s (~)2.012s (~)0.924s101.00x
💻 LocalNitro1.114s (~)2.008s (~)0.893s101.02x
💻 LocalExpress1.119s (~)2.007s (~)0.888s101.03x
🐘 PostgresNext.js (Turbopack)1.837s (-1.6%)2.016s (-4.7%)0.179s101.69x
🐘 PostgresExpress2.189s (-1.7%)3.015s (~)0.826s102.01x
🐘 PostgresNitro2.336s (-4.2%)3.016s (~)0.680s102.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.941s (-5.2% 🟢)3.807s (-1.5%)0.867s101.00x
▲ VercelExpress2.945s (+2.4%)3.802s (+1.8%)0.857s101.00x
▲ VercelNitro2.948s (-2.3%)3.697s (-3.7%)0.749s101.00x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.569s (-1.3%)11.018s (~)0.449s31.00x
💻 LocalNitro10.818s (~)11.014s (~)0.195s31.02x
💻 LocalExpress10.833s (~)11.014s (~)0.181s31.02x
🐘 PostgresNext.js (Turbopack)14.537s (-2.7%)15.035s (-3.1%)0.498s21.38x
🐘 PostgresNitro20.441s (+0.6%)21.036s (~)0.595s21.93x
🐘 PostgresExpress20.505s (~)21.033s (~)0.529s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.599s (-3.3%)23.253s (-3.5%)0.654s21.00x
▲ VercelNext.js (Turbopack)23.230s (-2.4%)23.890s (-2.6%)0.660s21.03x
▲ VercelNitro23.816s (-1.8%)25.024s (-0.7%)1.208s21.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.858s (-1.4%)27.026s (-3.6%)0.168s31.00x
💻 LocalNitro27.447s (~)28.028s (~)0.581s31.02x
💻 LocalExpress27.484s (~)28.026s (~)0.543s31.02x
🐘 PostgresNext.js (Turbopack)34.968s (-5.1% 🟢)35.557s (-5.4% 🟢)0.589s21.30x
🐘 PostgresNitro50.310s (~)51.087s (~)0.776s21.87x
🐘 PostgresExpress50.411s (~)51.065s (~)0.653s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)56.506s (-5.0% 🟢)57.646s (-4.2%)1.140s21.00x
▲ VercelNitro57.748s (-3.2%)58.636s (-3.2%)0.888s21.02x
▲ VercelExpress58.274s (-3.4%)59.239s (-3.2%)0.965s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)55.651s (-1.7%)56.040s (-1.8%)0.388s21.00x
💻 LocalNitro57.103s (~)58.037s (~)0.933s21.03x
💻 LocalExpress57.194s (~)58.045s (~)0.851s21.03x
🐘 PostgresNext.js (Turbopack)69.502s (-6.0% 🟢)69.603s (-6.1% 🟢)0.101s21.25x
🐘 PostgresNitro100.122s (~)100.146s (-1.0%)0.024s11.80x
🐘 PostgresExpress100.229s (~)101.134s (~)0.905s11.80x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express119.676s (-2.4%)120.574s (-2.2%)0.898s11.00x
▲ VercelNitro119.902s (~)120.679s (~)0.777s11.00x
▲ VercelNext.js (Turbopack)120.556s (-0.7%)121.248s (-1.1%)0.692s11.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.364s (-1.6%)2.011s (~)0.647s151.00x
💻 LocalExpress1.401s (-1.9%)2.006s (~)0.605s151.03x
💻 LocalNitro1.403s (-1.0%)2.006s (~)0.603s151.03x
🐘 PostgresNext.js (Turbopack)2.038s (~)2.533s (-2.8%)0.495s121.49x
🐘 PostgresNitro2.267s (-2.7%)3.014s (~)0.747s101.66x
🐘 PostgresExpress2.334s (~)2.685s (-11.0% 🟢)0.351s121.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.989s (-3.7%)3.835s (+0.9%)0.846s81.00x
▲ VercelNitro3.009s (~)3.904s (-0.9%)0.895s81.01x
▲ VercelExpress3.147s (+9.9% 🔺)4.019s (+4.7%)0.873s81.05x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.292s (-8.9% 🟢)3.231s (+5.9% 🔺)0.939s101.00x
💻 LocalNitro2.539s (-1.0%)3.015s (~)0.476s101.11x
💻 LocalExpress2.572s (-0.9%)3.017s (~)0.445s101.12x
🐘 PostgresNitro8.459s (+2.5%)9.049s (~)0.591s43.69x
🐘 PostgresExpress10.865s (+13.7% 🔺)11.021s (+5.8% 🔺)0.156s34.74x
🐘 PostgresNext.js (Turbopack)11.642s (-7.0% 🟢)12.358s (-2.6%)0.715s35.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.197s (-9.6% 🟢)3.961s (-8.4% 🟢)0.764s81.00x
▲ VercelExpress3.855s (+17.9% 🔺)4.735s (+13.9% 🔺)0.880s71.21x
▲ VercelNext.js (Turbopack)3.867s (+10.6% 🔺)4.487s (+5.4% 🔺)0.620s71.21x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)5.573s (-19.8% 🟢)6.415s (-20.8% 🟢)0.842s51.00x
💻 LocalNitro7.111s (-2.7%)7.889s (-2.2%)0.778s41.28x
💻 LocalExpress7.505s (~)8.438s (-0.7%)0.933s41.35x
🐘 PostgresExpress49.315s (+9.3% 🔺)50.147s (+10.6% 🔺)0.832s18.85x
🐘 PostgresNitro52.542s (+8.7% 🔺)53.172s (+8.1% 🔺)0.630s19.43x
🐘 PostgresNext.js (Turbopack)57.286s (+10.4% 🔺)58.143s (+11.5% 🔺)0.857s110.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.560s (+32.0% 🔺)5.288s (+30.4% 🔺)0.728s71.00x
▲ VercelNext.js (Turbopack)5.302s (+52.3% 🔺)6.208s (+42.6% 🔺)0.906s51.16x
▲ VercelNitro5.705s (+73.2% 🔺)6.590s (+70.2% 🔺)0.885s61.25x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.393s (-1.7%)2.010s (~)0.617s151.00x
💻 LocalNitro1.425s (-0.5%)2.007s (~)0.582s151.02x
💻 LocalExpress1.432s (-1.1%)2.007s (~)0.575s151.03x
🐘 PostgresNext.js (Turbopack)1.859s (-14.2% 🟢)2.085s (-17.3% 🟢)0.226s151.33x
🐘 PostgresExpress1.959s (-6.2% 🟢)2.476s (-5.0% 🟢)0.518s131.41x
🐘 PostgresNitro2.151s (+8.8% 🔺)2.695s (+25.7% 🔺)0.544s121.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.829s (~)3.637s (-4.1%)0.808s91.00x
▲ VercelNitro2.830s (~)3.702s (-1.7%)0.872s91.00x
▲ VercelNext.js (Turbopack)2.918s (~)3.780s (~)0.863s81.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.453s (-7.2% 🟢)3.254s (+7.4% 🔺)0.801s101.00x
💻 LocalExpress2.659s (-1.5%)3.012s (~)0.353s101.08x
💻 LocalNitro2.678s (-3.3%)3.011s (~)0.333s101.09x
🐘 PostgresExpress11.178s (+2.5%)11.692s (~)0.514s34.56x
🐘 PostgresNext.js (Turbopack)11.590s (-8.6% 🟢)12.362s (-7.6% 🟢)0.771s34.73x
🐘 PostgresNitro13.220s (+27.1% 🔺)13.698s (+24.2% 🔺)0.479s35.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.976s (-4.2%)3.760s (-3.1%)0.785s91.00x
▲ VercelExpress3.011s (-1.6%)3.824s (+0.8%)0.814s81.01x
▲ VercelNitro3.083s (~)3.811s (-1.6%)0.728s81.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.822s (-8.0% 🟢)7.537s (-10.0% 🟢)0.715s51.00x
💻 LocalNitro7.715s (~)8.720s (~)1.005s41.13x
💻 LocalExpress7.835s (-2.4%)8.795s (-1.7%)0.960s41.15x
🐘 PostgresExpress51.962s (+8.9% 🔺)52.328s (+8.4% 🔺)0.366s17.62x
🐘 PostgresNitro52.639s (+4.0%)53.111s (+3.4%)0.472s17.72x
🐘 PostgresNext.js (Turbopack)56.380s (-2.0%)57.132s (-1.8%)0.752s18.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.445s (+6.8% 🔺)4.213s (+8.9% 🔺)0.768s81.00x
▲ VercelNext.js (Turbopack)3.478s (-11.4% 🟢)4.287s (-7.9% 🟢)0.809s71.01x
▲ VercelExpress3.930s (+12.9% 🔺)4.365s (+5.4% 🔺)0.435s71.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.117s (-18.7% 🟢)1.003s (~)0.013s (-20.2% 🟢)1.025s (~)0.908s101.00x
💻 LocalNitro0.180s (-1.6%)0.992s (~)0.014s (-2.9%)1.020s (~)0.840s101.54x
💻 LocalExpress0.187s (~)0.992s (~)0.015s (-6.5% 🟢)1.022s (~)0.834s101.60x
🐘 PostgresNext.js (Turbopack)0.614s (-7.7% 🟢)0.928s (-4.3%)0.000s (+Infinity% 🔺)1.016s (~)0.402s105.24x
🐘 PostgresExpress1.438s (-40.2% 🟢)1.602s (-39.4% 🟢)0.000s (+Infinity% 🔺)2.013s (-33.3% 🟢)0.575s1012.27x
🐘 PostgresNitro2.331s (+5.3% 🔺)2.712s (-4.1%)0.000s (~)3.016s (~)0.685s1019.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.890s (-6.3% 🟢)3.228s (-6.3% 🟢)0.149s (+8.6% 🔺)3.892s (-5.7% 🟢)1.003s101.00x
▲ VercelExpress2.986s (-3.8%)3.238s (-2.2%)0.182s (-4.5%)3.887s (-3.4%)0.901s101.03x
▲ VercelNext.js (Turbopack)3.076s (-1.4%)3.214s (-0.8%)0.217s (+45.1% 🔺)3.942s (+1.5%)0.866s101.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)12/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelExpress5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all console logging calls in packages/core/src to use a structured logger utility built on the debug library with OpenTelemetry integration. This provides consistent, filterable logging and removes duplicate logging patterns.

Changes:

  • Replaced all console.log, console.warn, and console.error calls with structured loggers (runtimeLogger, stepLogger) that accept structured metadata
  • Removed duplicate logging where both eventsLogger and console.error were called for the same event
  • Updated test expectations to remove console spy mocking since logging is now handled by the structured logger

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/core/src/telemetry.tsReplaced console.warn with runtimeLogger.warn for OpenTelemetry unavailable warning
packages/core/src/serialization.tsReplaced console.error calls with runtimeLogger.error, adding structured metadata for serialization failures
packages/core/src/runtime/suspension-handler.tsReplaced console.warn calls with runtimeLogger.warn, adding structured context including workflowRunId and correlationId
packages/core/src/runtime/step-handler.tsReplaced console.error/warn calls with stepLogger equivalents, converting formatted error stack strings to structured metadata
packages/core/src/runtime.tsReplaced console.warn/error calls with runtimeLogger equivalents, adding structured metadata for workflow status and errors
packages/core/src/observability.tsReplaced console.error with runtimeLogger.error for event data hydration errors
packages/core/src/events-consumer.tsRemoved duplicate console.error call, keeping only eventsLogger.error for callback errors
packages/core/src/events-consumer.test.tsRemoved console.error spy test code that is no longer needed since duplicate logging was removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Logger now outputs error/warn to console (always visible, not just when DEBUG enabled)
- Downgrade warn → info for expected states (OTel unavailable, workflow/step already completed, idempotency cases)
- Downgrade error → warn for transient failures (step invoked erroneously, error with retry pending)
- Remove verbose debug logs from hot paths (events-consumer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I also would love if the logger eventually moved to utils and then cli could use it too, among other packages, so that we eventually have a unified way of setting debug log level

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good

@pranaygp
pranaygp merged commit e0061b8 into mainFeb 5, 2026
98 checks passed
@pranaygp
pranaygp deleted the pranaygp/improved-logging branch February 5, 2026 00:16
pranaygp added a commit that referenced this pull request Feb 5, 2026
…-parallelization
* origin/main:
Add x-workflow-run-id header to queue messages (#922)
Bump Next.js and React in workbenches (#944)
Add subpath export resolution for package IDs (#901)
Consolidate console logging to structured logger utility (#935)
# Conflicts:
#	packages/core/src/runtime/step-handler.ts
Sign up for freeto 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.

4 participants

@pranaygp@VaguelySerious@karthikscale3
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Consolidate console logging to structured logger utility by pranaygp · Pull Request #935 · vercel/workflow · GitHub
Skip to content

Consolidate console logging to structured logger utility - #935

Merged
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging
Feb 5, 2026
Merged

Consolidate console logging to structured logger utility#935
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging

Conversation

@pranaygp

@pranaygppranaygp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all console.log, console.warn, and console.error calls in packages/core/src with the structured logger utility from logger.ts
  • Fix logger to always output error/warn to console - Previously errors were silently swallowed unless DEBUG env var was set
  • Fix log levels - Downgrade warnings that are really info (expected states), downgrade errors that are really warnings (transient failures with retry)
  • Remove verbose debug logs from hot paths (events-consumer)

Log Level Changes

MessageBeforeAfterReason
OpenTelemetry not availablewarninfoExpected in many environments
Workflow already completed, skippingwarninfoNormal state
Step/wait already exists, continuingwarninfoIdempotency case
Workflow run already completed, skipping step/hookwarninfoRace condition, normal
Step invoked erroneouslyerrorwarnHandled gracefully
Encountered Error, step will be retriederrorwarnTransient, will retry
Encountered RetryableErrorwarnwarnUnchanged (correct)
Step exceeded max retrieserrorerrorUnchanged (correct)
FatalError in steperrorerrorUnchanged (correct)
Error while running workflowerrorerrorUnchanged (correct)

Test plan

  • Build passes (pnpm build in packages/core)
  • All 304 tests pass (pnpm test in packages/core)
  • Verified error/warn logs now output to console with [Workflow] prefix
  • Verified no remaining raw console. calls in source files (only logger.ts and JSDoc examples)

🤖 Generated with Claude Code

Replace all console.log, console.warn, and console.error calls in
packages/core/src with the structured logger utility from logger.ts.
This provides consistent, filterable logging with OpenTelemetry
integration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 4, 2026 21:23
@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Feb 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7c9d7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/world-testingPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.032s (-29.6% 🟢)1.018s (~)0.987s101.00x
💻 LocalExpress0.043s (-3.6%)1.008s (~)0.965s101.36x
💻 LocalNitro0.044s (+2.8%)1.008s (~)0.964s101.38x
🐘 PostgresNitro0.196s (-7.8% 🟢)1.015s (~)0.818s106.19x
🐘 PostgresExpress0.233s (-4.4%)1.013s (~)0.780s107.36x
🐘 PostgresNext.js (Turbopack)0.269s (-29.4% 🟢)1.030s (+0.8%)0.762s108.47x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.780s (-0.9%)1.602s (-7.1% 🟢)0.822s101.00x
▲ VercelNitro0.790s (+10.1% 🔺)1.614s (-8.3% 🟢)0.824s101.01x
▲ VercelNext.js (Turbopack)1.223s (+42.2% 🔺)2.240s (+27.7% 🔺)1.017s101.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.087s (~)2.012s (~)0.924s101.00x
💻 LocalNitro1.114s (~)2.008s (~)0.893s101.02x
💻 LocalExpress1.119s (~)2.007s (~)0.888s101.03x
🐘 PostgresNext.js (Turbopack)1.837s (-1.6%)2.016s (-4.7%)0.179s101.69x
🐘 PostgresExpress2.189s (-1.7%)3.015s (~)0.826s102.01x
🐘 PostgresNitro2.336s (-4.2%)3.016s (~)0.680s102.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.941s (-5.2% 🟢)3.807s (-1.5%)0.867s101.00x
▲ VercelExpress2.945s (+2.4%)3.802s (+1.8%)0.857s101.00x
▲ VercelNitro2.948s (-2.3%)3.697s (-3.7%)0.749s101.00x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.569s (-1.3%)11.018s (~)0.449s31.00x
💻 LocalNitro10.818s (~)11.014s (~)0.195s31.02x
💻 LocalExpress10.833s (~)11.014s (~)0.181s31.02x
🐘 PostgresNext.js (Turbopack)14.537s (-2.7%)15.035s (-3.1%)0.498s21.38x
🐘 PostgresNitro20.441s (+0.6%)21.036s (~)0.595s21.93x
🐘 PostgresExpress20.505s (~)21.033s (~)0.529s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.599s (-3.3%)23.253s (-3.5%)0.654s21.00x
▲ VercelNext.js (Turbopack)23.230s (-2.4%)23.890s (-2.6%)0.660s21.03x
▲ VercelNitro23.816s (-1.8%)25.024s (-0.7%)1.208s21.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.858s (-1.4%)27.026s (-3.6%)0.168s31.00x
💻 LocalNitro27.447s (~)28.028s (~)0.581s31.02x
💻 LocalExpress27.484s (~)28.026s (~)0.543s31.02x
🐘 PostgresNext.js (Turbopack)34.968s (-5.1% 🟢)35.557s (-5.4% 🟢)0.589s21.30x
🐘 PostgresNitro50.310s (~)51.087s (~)0.776s21.87x
🐘 PostgresExpress50.411s (~)51.065s (~)0.653s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)56.506s (-5.0% 🟢)57.646s (-4.2%)1.140s21.00x
▲ VercelNitro57.748s (-3.2%)58.636s (-3.2%)0.888s21.02x
▲ VercelExpress58.274s (-3.4%)59.239s (-3.2%)0.965s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)55.651s (-1.7%)56.040s (-1.8%)0.388s21.00x
💻 LocalNitro57.103s (~)58.037s (~)0.933s21.03x
💻 LocalExpress57.194s (~)58.045s (~)0.851s21.03x
🐘 PostgresNext.js (Turbopack)69.502s (-6.0% 🟢)69.603s (-6.1% 🟢)0.101s21.25x
🐘 PostgresNitro100.122s (~)100.146s (-1.0%)0.024s11.80x
🐘 PostgresExpress100.229s (~)101.134s (~)0.905s11.80x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express119.676s (-2.4%)120.574s (-2.2%)0.898s11.00x
▲ VercelNitro119.902s (~)120.679s (~)0.777s11.00x
▲ VercelNext.js (Turbopack)120.556s (-0.7%)121.248s (-1.1%)0.692s11.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.364s (-1.6%)2.011s (~)0.647s151.00x
💻 LocalExpress1.401s (-1.9%)2.006s (~)0.605s151.03x
💻 LocalNitro1.403s (-1.0%)2.006s (~)0.603s151.03x
🐘 PostgresNext.js (Turbopack)2.038s (~)2.533s (-2.8%)0.495s121.49x
🐘 PostgresNitro2.267s (-2.7%)3.014s (~)0.747s101.66x
🐘 PostgresExpress2.334s (~)2.685s (-11.0% 🟢)0.351s121.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.989s (-3.7%)3.835s (+0.9%)0.846s81.00x
▲ VercelNitro3.009s (~)3.904s (-0.9%)0.895s81.01x
▲ VercelExpress3.147s (+9.9% 🔺)4.019s (+4.7%)0.873s81.05x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.292s (-8.9% 🟢)3.231s (+5.9% 🔺)0.939s101.00x
💻 LocalNitro2.539s (-1.0%)3.015s (~)0.476s101.11x
💻 LocalExpress2.572s (-0.9%)3.017s (~)0.445s101.12x
🐘 PostgresNitro8.459s (+2.5%)9.049s (~)0.591s43.69x
🐘 PostgresExpress10.865s (+13.7% 🔺)11.021s (+5.8% 🔺)0.156s34.74x
🐘 PostgresNext.js (Turbopack)11.642s (-7.0% 🟢)12.358s (-2.6%)0.715s35.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.197s (-9.6% 🟢)3.961s (-8.4% 🟢)0.764s81.00x
▲ VercelExpress3.855s (+17.9% 🔺)4.735s (+13.9% 🔺)0.880s71.21x
▲ VercelNext.js (Turbopack)3.867s (+10.6% 🔺)4.487s (+5.4% 🔺)0.620s71.21x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)5.573s (-19.8% 🟢)6.415s (-20.8% 🟢)0.842s51.00x
💻 LocalNitro7.111s (-2.7%)7.889s (-2.2%)0.778s41.28x
💻 LocalExpress7.505s (~)8.438s (-0.7%)0.933s41.35x
🐘 PostgresExpress49.315s (+9.3% 🔺)50.147s (+10.6% 🔺)0.832s18.85x
🐘 PostgresNitro52.542s (+8.7% 🔺)53.172s (+8.1% 🔺)0.630s19.43x
🐘 PostgresNext.js (Turbopack)57.286s (+10.4% 🔺)58.143s (+11.5% 🔺)0.857s110.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.560s (+32.0% 🔺)5.288s (+30.4% 🔺)0.728s71.00x
▲ VercelNext.js (Turbopack)5.302s (+52.3% 🔺)6.208s (+42.6% 🔺)0.906s51.16x
▲ VercelNitro5.705s (+73.2% 🔺)6.590s (+70.2% 🔺)0.885s61.25x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.393s (-1.7%)2.010s (~)0.617s151.00x
💻 LocalNitro1.425s (-0.5%)2.007s (~)0.582s151.02x
💻 LocalExpress1.432s (-1.1%)2.007s (~)0.575s151.03x
🐘 PostgresNext.js (Turbopack)1.859s (-14.2% 🟢)2.085s (-17.3% 🟢)0.226s151.33x
🐘 PostgresExpress1.959s (-6.2% 🟢)2.476s (-5.0% 🟢)0.518s131.41x
🐘 PostgresNitro2.151s (+8.8% 🔺)2.695s (+25.7% 🔺)0.544s121.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.829s (~)3.637s (-4.1%)0.808s91.00x
▲ VercelNitro2.830s (~)3.702s (-1.7%)0.872s91.00x
▲ VercelNext.js (Turbopack)2.918s (~)3.780s (~)0.863s81.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.453s (-7.2% 🟢)3.254s (+7.4% 🔺)0.801s101.00x
💻 LocalExpress2.659s (-1.5%)3.012s (~)0.353s101.08x
💻 LocalNitro2.678s (-3.3%)3.011s (~)0.333s101.09x
🐘 PostgresExpress11.178s (+2.5%)11.692s (~)0.514s34.56x
🐘 PostgresNext.js (Turbopack)11.590s (-8.6% 🟢)12.362s (-7.6% 🟢)0.771s34.73x
🐘 PostgresNitro13.220s (+27.1% 🔺)13.698s (+24.2% 🔺)0.479s35.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.976s (-4.2%)3.760s (-3.1%)0.785s91.00x
▲ VercelExpress3.011s (-1.6%)3.824s (+0.8%)0.814s81.01x
▲ VercelNitro3.083s (~)3.811s (-1.6%)0.728s81.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.822s (-8.0% 🟢)7.537s (-10.0% 🟢)0.715s51.00x
💻 LocalNitro7.715s (~)8.720s (~)1.005s41.13x
💻 LocalExpress7.835s (-2.4%)8.795s (-1.7%)0.960s41.15x
🐘 PostgresExpress51.962s (+8.9% 🔺)52.328s (+8.4% 🔺)0.366s17.62x
🐘 PostgresNitro52.639s (+4.0%)53.111s (+3.4%)0.472s17.72x
🐘 PostgresNext.js (Turbopack)56.380s (-2.0%)57.132s (-1.8%)0.752s18.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.445s (+6.8% 🔺)4.213s (+8.9% 🔺)0.768s81.00x
▲ VercelNext.js (Turbopack)3.478s (-11.4% 🟢)4.287s (-7.9% 🟢)0.809s71.01x
▲ VercelExpress3.930s (+12.9% 🔺)4.365s (+5.4% 🔺)0.435s71.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.117s (-18.7% 🟢)1.003s (~)0.013s (-20.2% 🟢)1.025s (~)0.908s101.00x
💻 LocalNitro0.180s (-1.6%)0.992s (~)0.014s (-2.9%)1.020s (~)0.840s101.54x
💻 LocalExpress0.187s (~)0.992s (~)0.015s (-6.5% 🟢)1.022s (~)0.834s101.60x
🐘 PostgresNext.js (Turbopack)0.614s (-7.7% 🟢)0.928s (-4.3%)0.000s (+Infinity% 🔺)1.016s (~)0.402s105.24x
🐘 PostgresExpress1.438s (-40.2% 🟢)1.602s (-39.4% 🟢)0.000s (+Infinity% 🔺)2.013s (-33.3% 🟢)0.575s1012.27x
🐘 PostgresNitro2.331s (+5.3% 🔺)2.712s (-4.1%)0.000s (~)3.016s (~)0.685s1019.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.890s (-6.3% 🟢)3.228s (-6.3% 🟢)0.149s (+8.6% 🔺)3.892s (-5.7% 🟢)1.003s101.00x
▲ VercelExpress2.986s (-3.8%)3.238s (-2.2%)0.182s (-4.5%)3.887s (-3.4%)0.901s101.03x
▲ VercelNext.js (Turbopack)3.076s (-1.4%)3.214s (-0.8%)0.217s (+45.1% 🔺)3.942s (+1.5%)0.866s101.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)12/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelExpress5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all console logging calls in packages/core/src to use a structured logger utility built on the debug library with OpenTelemetry integration. This provides consistent, filterable logging and removes duplicate logging patterns.

Changes:

  • Replaced all console.log, console.warn, and console.error calls with structured loggers (runtimeLogger, stepLogger) that accept structured metadata
  • Removed duplicate logging where both eventsLogger and console.error were called for the same event
  • Updated test expectations to remove console spy mocking since logging is now handled by the structured logger

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/core/src/telemetry.tsReplaced console.warn with runtimeLogger.warn for OpenTelemetry unavailable warning
packages/core/src/serialization.tsReplaced console.error calls with runtimeLogger.error, adding structured metadata for serialization failures
packages/core/src/runtime/suspension-handler.tsReplaced console.warn calls with runtimeLogger.warn, adding structured context including workflowRunId and correlationId
packages/core/src/runtime/step-handler.tsReplaced console.error/warn calls with stepLogger equivalents, converting formatted error stack strings to structured metadata
packages/core/src/runtime.tsReplaced console.warn/error calls with runtimeLogger equivalents, adding structured metadata for workflow status and errors
packages/core/src/observability.tsReplaced console.error with runtimeLogger.error for event data hydration errors
packages/core/src/events-consumer.tsRemoved duplicate console.error call, keeping only eventsLogger.error for callback errors
packages/core/src/events-consumer.test.tsRemoved console.error spy test code that is no longer needed since duplicate logging was removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Logger now outputs error/warn to console (always visible, not just when DEBUG enabled)
- Downgrade warn → info for expected states (OTel unavailable, workflow/step already completed, idempotency cases)
- Downgrade error → warn for transient failures (step invoked erroneously, error with retry pending)
- Remove verbose debug logs from hot paths (events-consumer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I also would love if the logger eventually moved to utils and then cli could use it too, among other packages, so that we eventually have a unified way of setting debug log level

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good

@pranaygp
pranaygp merged commit e0061b8 into mainFeb 5, 2026
98 checks passed
@pranaygp
pranaygp deleted the pranaygp/improved-logging branch February 5, 2026 00:16
pranaygp added a commit that referenced this pull request Feb 5, 2026
…-parallelization
* origin/main:
Add x-workflow-run-id header to queue messages (#922)
Bump Next.js and React in workbenches (#944)
Add subpath export resolution for package IDs (#901)
Consolidate console logging to structured logger utility (#935)
# Conflicts:
#	packages/core/src/runtime/step-handler.ts
Sign up for freeto 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.

4 participants

@pranaygp@VaguelySerious@karthikscale3
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Consolidate console logging to structured logger utility by pranaygp · Pull Request #935 · vercel/workflow · GitHub
Skip to content

Consolidate console logging to structured logger utility - #935

Merged
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging
Feb 5, 2026
Merged

Consolidate console logging to structured logger utility#935
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging

Conversation

@pranaygp

@pranaygppranaygp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all console.log, console.warn, and console.error calls in packages/core/src with the structured logger utility from logger.ts
  • Fix logger to always output error/warn to console - Previously errors were silently swallowed unless DEBUG env var was set
  • Fix log levels - Downgrade warnings that are really info (expected states), downgrade errors that are really warnings (transient failures with retry)
  • Remove verbose debug logs from hot paths (events-consumer)

Log Level Changes

MessageBeforeAfterReason
OpenTelemetry not availablewarninfoExpected in many environments
Workflow already completed, skippingwarninfoNormal state
Step/wait already exists, continuingwarninfoIdempotency case
Workflow run already completed, skipping step/hookwarninfoRace condition, normal
Step invoked erroneouslyerrorwarnHandled gracefully
Encountered Error, step will be retriederrorwarnTransient, will retry
Encountered RetryableErrorwarnwarnUnchanged (correct)
Step exceeded max retrieserrorerrorUnchanged (correct)
FatalError in steperrorerrorUnchanged (correct)
Error while running workflowerrorerrorUnchanged (correct)

Test plan

  • Build passes (pnpm build in packages/core)
  • All 304 tests pass (pnpm test in packages/core)
  • Verified error/warn logs now output to console with [Workflow] prefix
  • Verified no remaining raw console. calls in source files (only logger.ts and JSDoc examples)

🤖 Generated with Claude Code

Replace all console.log, console.warn, and console.error calls in
packages/core/src with the structured logger utility from logger.ts.
This provides consistent, filterable logging with OpenTelemetry
integration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 4, 2026 21:23
@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Feb 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7c9d7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/world-testingPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.032s (-29.6% 🟢)1.018s (~)0.987s101.00x
💻 LocalExpress0.043s (-3.6%)1.008s (~)0.965s101.36x
💻 LocalNitro0.044s (+2.8%)1.008s (~)0.964s101.38x
🐘 PostgresNitro0.196s (-7.8% 🟢)1.015s (~)0.818s106.19x
🐘 PostgresExpress0.233s (-4.4%)1.013s (~)0.780s107.36x
🐘 PostgresNext.js (Turbopack)0.269s (-29.4% 🟢)1.030s (+0.8%)0.762s108.47x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.780s (-0.9%)1.602s (-7.1% 🟢)0.822s101.00x
▲ VercelNitro0.790s (+10.1% 🔺)1.614s (-8.3% 🟢)0.824s101.01x
▲ VercelNext.js (Turbopack)1.223s (+42.2% 🔺)2.240s (+27.7% 🔺)1.017s101.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.087s (~)2.012s (~)0.924s101.00x
💻 LocalNitro1.114s (~)2.008s (~)0.893s101.02x
💻 LocalExpress1.119s (~)2.007s (~)0.888s101.03x
🐘 PostgresNext.js (Turbopack)1.837s (-1.6%)2.016s (-4.7%)0.179s101.69x
🐘 PostgresExpress2.189s (-1.7%)3.015s (~)0.826s102.01x
🐘 PostgresNitro2.336s (-4.2%)3.016s (~)0.680s102.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.941s (-5.2% 🟢)3.807s (-1.5%)0.867s101.00x
▲ VercelExpress2.945s (+2.4%)3.802s (+1.8%)0.857s101.00x
▲ VercelNitro2.948s (-2.3%)3.697s (-3.7%)0.749s101.00x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.569s (-1.3%)11.018s (~)0.449s31.00x
💻 LocalNitro10.818s (~)11.014s (~)0.195s31.02x
💻 LocalExpress10.833s (~)11.014s (~)0.181s31.02x
🐘 PostgresNext.js (Turbopack)14.537s (-2.7%)15.035s (-3.1%)0.498s21.38x
🐘 PostgresNitro20.441s (+0.6%)21.036s (~)0.595s21.93x
🐘 PostgresExpress20.505s (~)21.033s (~)0.529s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.599s (-3.3%)23.253s (-3.5%)0.654s21.00x
▲ VercelNext.js (Turbopack)23.230s (-2.4%)23.890s (-2.6%)0.660s21.03x
▲ VercelNitro23.816s (-1.8%)25.024s (-0.7%)1.208s21.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.858s (-1.4%)27.026s (-3.6%)0.168s31.00x
💻 LocalNitro27.447s (~)28.028s (~)0.581s31.02x
💻 LocalExpress27.484s (~)28.026s (~)0.543s31.02x
🐘 PostgresNext.js (Turbopack)34.968s (-5.1% 🟢)35.557s (-5.4% 🟢)0.589s21.30x
🐘 PostgresNitro50.310s (~)51.087s (~)0.776s21.87x
🐘 PostgresExpress50.411s (~)51.065s (~)0.653s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)56.506s (-5.0% 🟢)57.646s (-4.2%)1.140s21.00x
▲ VercelNitro57.748s (-3.2%)58.636s (-3.2%)0.888s21.02x
▲ VercelExpress58.274s (-3.4%)59.239s (-3.2%)0.965s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)55.651s (-1.7%)56.040s (-1.8%)0.388s21.00x
💻 LocalNitro57.103s (~)58.037s (~)0.933s21.03x
💻 LocalExpress57.194s (~)58.045s (~)0.851s21.03x
🐘 PostgresNext.js (Turbopack)69.502s (-6.0% 🟢)69.603s (-6.1% 🟢)0.101s21.25x
🐘 PostgresNitro100.122s (~)100.146s (-1.0%)0.024s11.80x
🐘 PostgresExpress100.229s (~)101.134s (~)0.905s11.80x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express119.676s (-2.4%)120.574s (-2.2%)0.898s11.00x
▲ VercelNitro119.902s (~)120.679s (~)0.777s11.00x
▲ VercelNext.js (Turbopack)120.556s (-0.7%)121.248s (-1.1%)0.692s11.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.364s (-1.6%)2.011s (~)0.647s151.00x
💻 LocalExpress1.401s (-1.9%)2.006s (~)0.605s151.03x
💻 LocalNitro1.403s (-1.0%)2.006s (~)0.603s151.03x
🐘 PostgresNext.js (Turbopack)2.038s (~)2.533s (-2.8%)0.495s121.49x
🐘 PostgresNitro2.267s (-2.7%)3.014s (~)0.747s101.66x
🐘 PostgresExpress2.334s (~)2.685s (-11.0% 🟢)0.351s121.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.989s (-3.7%)3.835s (+0.9%)0.846s81.00x
▲ VercelNitro3.009s (~)3.904s (-0.9%)0.895s81.01x
▲ VercelExpress3.147s (+9.9% 🔺)4.019s (+4.7%)0.873s81.05x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.292s (-8.9% 🟢)3.231s (+5.9% 🔺)0.939s101.00x
💻 LocalNitro2.539s (-1.0%)3.015s (~)0.476s101.11x
💻 LocalExpress2.572s (-0.9%)3.017s (~)0.445s101.12x
🐘 PostgresNitro8.459s (+2.5%)9.049s (~)0.591s43.69x
🐘 PostgresExpress10.865s (+13.7% 🔺)11.021s (+5.8% 🔺)0.156s34.74x
🐘 PostgresNext.js (Turbopack)11.642s (-7.0% 🟢)12.358s (-2.6%)0.715s35.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.197s (-9.6% 🟢)3.961s (-8.4% 🟢)0.764s81.00x
▲ VercelExpress3.855s (+17.9% 🔺)4.735s (+13.9% 🔺)0.880s71.21x
▲ VercelNext.js (Turbopack)3.867s (+10.6% 🔺)4.487s (+5.4% 🔺)0.620s71.21x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)5.573s (-19.8% 🟢)6.415s (-20.8% 🟢)0.842s51.00x
💻 LocalNitro7.111s (-2.7%)7.889s (-2.2%)0.778s41.28x
💻 LocalExpress7.505s (~)8.438s (-0.7%)0.933s41.35x
🐘 PostgresExpress49.315s (+9.3% 🔺)50.147s (+10.6% 🔺)0.832s18.85x
🐘 PostgresNitro52.542s (+8.7% 🔺)53.172s (+8.1% 🔺)0.630s19.43x
🐘 PostgresNext.js (Turbopack)57.286s (+10.4% 🔺)58.143s (+11.5% 🔺)0.857s110.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.560s (+32.0% 🔺)5.288s (+30.4% 🔺)0.728s71.00x
▲ VercelNext.js (Turbopack)5.302s (+52.3% 🔺)6.208s (+42.6% 🔺)0.906s51.16x
▲ VercelNitro5.705s (+73.2% 🔺)6.590s (+70.2% 🔺)0.885s61.25x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.393s (-1.7%)2.010s (~)0.617s151.00x
💻 LocalNitro1.425s (-0.5%)2.007s (~)0.582s151.02x
💻 LocalExpress1.432s (-1.1%)2.007s (~)0.575s151.03x
🐘 PostgresNext.js (Turbopack)1.859s (-14.2% 🟢)2.085s (-17.3% 🟢)0.226s151.33x
🐘 PostgresExpress1.959s (-6.2% 🟢)2.476s (-5.0% 🟢)0.518s131.41x
🐘 PostgresNitro2.151s (+8.8% 🔺)2.695s (+25.7% 🔺)0.544s121.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.829s (~)3.637s (-4.1%)0.808s91.00x
▲ VercelNitro2.830s (~)3.702s (-1.7%)0.872s91.00x
▲ VercelNext.js (Turbopack)2.918s (~)3.780s (~)0.863s81.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.453s (-7.2% 🟢)3.254s (+7.4% 🔺)0.801s101.00x
💻 LocalExpress2.659s (-1.5%)3.012s (~)0.353s101.08x
💻 LocalNitro2.678s (-3.3%)3.011s (~)0.333s101.09x
🐘 PostgresExpress11.178s (+2.5%)11.692s (~)0.514s34.56x
🐘 PostgresNext.js (Turbopack)11.590s (-8.6% 🟢)12.362s (-7.6% 🟢)0.771s34.73x
🐘 PostgresNitro13.220s (+27.1% 🔺)13.698s (+24.2% 🔺)0.479s35.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.976s (-4.2%)3.760s (-3.1%)0.785s91.00x
▲ VercelExpress3.011s (-1.6%)3.824s (+0.8%)0.814s81.01x
▲ VercelNitro3.083s (~)3.811s (-1.6%)0.728s81.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.822s (-8.0% 🟢)7.537s (-10.0% 🟢)0.715s51.00x
💻 LocalNitro7.715s (~)8.720s (~)1.005s41.13x
💻 LocalExpress7.835s (-2.4%)8.795s (-1.7%)0.960s41.15x
🐘 PostgresExpress51.962s (+8.9% 🔺)52.328s (+8.4% 🔺)0.366s17.62x
🐘 PostgresNitro52.639s (+4.0%)53.111s (+3.4%)0.472s17.72x
🐘 PostgresNext.js (Turbopack)56.380s (-2.0%)57.132s (-1.8%)0.752s18.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.445s (+6.8% 🔺)4.213s (+8.9% 🔺)0.768s81.00x
▲ VercelNext.js (Turbopack)3.478s (-11.4% 🟢)4.287s (-7.9% 🟢)0.809s71.01x
▲ VercelExpress3.930s (+12.9% 🔺)4.365s (+5.4% 🔺)0.435s71.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.117s (-18.7% 🟢)1.003s (~)0.013s (-20.2% 🟢)1.025s (~)0.908s101.00x
💻 LocalNitro0.180s (-1.6%)0.992s (~)0.014s (-2.9%)1.020s (~)0.840s101.54x
💻 LocalExpress0.187s (~)0.992s (~)0.015s (-6.5% 🟢)1.022s (~)0.834s101.60x
🐘 PostgresNext.js (Turbopack)0.614s (-7.7% 🟢)0.928s (-4.3%)0.000s (+Infinity% 🔺)1.016s (~)0.402s105.24x
🐘 PostgresExpress1.438s (-40.2% 🟢)1.602s (-39.4% 🟢)0.000s (+Infinity% 🔺)2.013s (-33.3% 🟢)0.575s1012.27x
🐘 PostgresNitro2.331s (+5.3% 🔺)2.712s (-4.1%)0.000s (~)3.016s (~)0.685s1019.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.890s (-6.3% 🟢)3.228s (-6.3% 🟢)0.149s (+8.6% 🔺)3.892s (-5.7% 🟢)1.003s101.00x
▲ VercelExpress2.986s (-3.8%)3.238s (-2.2%)0.182s (-4.5%)3.887s (-3.4%)0.901s101.03x
▲ VercelNext.js (Turbopack)3.076s (-1.4%)3.214s (-0.8%)0.217s (+45.1% 🔺)3.942s (+1.5%)0.866s101.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)12/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelExpress5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all console logging calls in packages/core/src to use a structured logger utility built on the debug library with OpenTelemetry integration. This provides consistent, filterable logging and removes duplicate logging patterns.

Changes:

  • Replaced all console.log, console.warn, and console.error calls with structured loggers (runtimeLogger, stepLogger) that accept structured metadata
  • Removed duplicate logging where both eventsLogger and console.error were called for the same event
  • Updated test expectations to remove console spy mocking since logging is now handled by the structured logger

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/core/src/telemetry.tsReplaced console.warn with runtimeLogger.warn for OpenTelemetry unavailable warning
packages/core/src/serialization.tsReplaced console.error calls with runtimeLogger.error, adding structured metadata for serialization failures
packages/core/src/runtime/suspension-handler.tsReplaced console.warn calls with runtimeLogger.warn, adding structured context including workflowRunId and correlationId
packages/core/src/runtime/step-handler.tsReplaced console.error/warn calls with stepLogger equivalents, converting formatted error stack strings to structured metadata
packages/core/src/runtime.tsReplaced console.warn/error calls with runtimeLogger equivalents, adding structured metadata for workflow status and errors
packages/core/src/observability.tsReplaced console.error with runtimeLogger.error for event data hydration errors
packages/core/src/events-consumer.tsRemoved duplicate console.error call, keeping only eventsLogger.error for callback errors
packages/core/src/events-consumer.test.tsRemoved console.error spy test code that is no longer needed since duplicate logging was removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Logger now outputs error/warn to console (always visible, not just when DEBUG enabled)
- Downgrade warn → info for expected states (OTel unavailable, workflow/step already completed, idempotency cases)
- Downgrade error → warn for transient failures (step invoked erroneously, error with retry pending)
- Remove verbose debug logs from hot paths (events-consumer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I also would love if the logger eventually moved to utils and then cli could use it too, among other packages, so that we eventually have a unified way of setting debug log level

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good

@pranaygp
pranaygp merged commit e0061b8 into mainFeb 5, 2026
98 checks passed
@pranaygp
pranaygp deleted the pranaygp/improved-logging branch February 5, 2026 00:16
pranaygp added a commit that referenced this pull request Feb 5, 2026
…-parallelization
* origin/main:
Add x-workflow-run-id header to queue messages (#922)
Bump Next.js and React in workbenches (#944)
Add subpath export resolution for package IDs (#901)
Consolidate console logging to structured logger utility (#935)
# Conflicts:
#	packages/core/src/runtime/step-handler.ts
Sign up for freeto 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.

4 participants

@pranaygp@VaguelySerious@karthikscale3
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); Consolidate console logging to structured logger utility by pranaygp · Pull Request #935 · vercel/workflow · GitHub
Skip to content

Consolidate console logging to structured logger utility - #935

Merged
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging
Feb 5, 2026
Merged

Consolidate console logging to structured logger utility#935
pranaygp merged 3 commits into
mainfrom
pranaygp/improved-logging

Conversation

@pranaygp

@pranaygppranaygp commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all console.log, console.warn, and console.error calls in packages/core/src with the structured logger utility from logger.ts
  • Fix logger to always output error/warn to console - Previously errors were silently swallowed unless DEBUG env var was set
  • Fix log levels - Downgrade warnings that are really info (expected states), downgrade errors that are really warnings (transient failures with retry)
  • Remove verbose debug logs from hot paths (events-consumer)

Log Level Changes

MessageBeforeAfterReason
OpenTelemetry not availablewarninfoExpected in many environments
Workflow already completed, skippingwarninfoNormal state
Step/wait already exists, continuingwarninfoIdempotency case
Workflow run already completed, skipping step/hookwarninfoRace condition, normal
Step invoked erroneouslyerrorwarnHandled gracefully
Encountered Error, step will be retriederrorwarnTransient, will retry
Encountered RetryableErrorwarnwarnUnchanged (correct)
Step exceeded max retrieserrorerrorUnchanged (correct)
FatalError in steperrorerrorUnchanged (correct)
Error while running workflowerrorerrorUnchanged (correct)

Test plan

  • Build passes (pnpm build in packages/core)
  • All 304 tests pass (pnpm test in packages/core)
  • Verified error/warn logs now output to console with [Workflow] prefix
  • Verified no remaining raw console. calls in source files (only logger.ts and JSDoc examples)

🤖 Generated with Claude Code

Replace all console.log, console.warn, and console.error calls in
packages/core/src with the structured logger utility from logger.ts.
This provides consistent, filterable logging with OpenTelemetry
integration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 4, 2026 21:23
@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Feb 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7c9d7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
NameType
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/world-testingPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@github-actions

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.032s (-29.6% 🟢)1.018s (~)0.987s101.00x
💻 LocalExpress0.043s (-3.6%)1.008s (~)0.965s101.36x
💻 LocalNitro0.044s (+2.8%)1.008s (~)0.964s101.38x
🐘 PostgresNitro0.196s (-7.8% 🟢)1.015s (~)0.818s106.19x
🐘 PostgresExpress0.233s (-4.4%)1.013s (~)0.780s107.36x
🐘 PostgresNext.js (Turbopack)0.269s (-29.4% 🟢)1.030s (+0.8%)0.762s108.47x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.780s (-0.9%)1.602s (-7.1% 🟢)0.822s101.00x
▲ VercelNitro0.790s (+10.1% 🔺)1.614s (-8.3% 🟢)0.824s101.01x
▲ VercelNext.js (Turbopack)1.223s (+42.2% 🔺)2.240s (+27.7% 🔺)1.017s101.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.087s (~)2.012s (~)0.924s101.00x
💻 LocalNitro1.114s (~)2.008s (~)0.893s101.02x
💻 LocalExpress1.119s (~)2.007s (~)0.888s101.03x
🐘 PostgresNext.js (Turbopack)1.837s (-1.6%)2.016s (-4.7%)0.179s101.69x
🐘 PostgresExpress2.189s (-1.7%)3.015s (~)0.826s102.01x
🐘 PostgresNitro2.336s (-4.2%)3.016s (~)0.680s102.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.941s (-5.2% 🟢)3.807s (-1.5%)0.867s101.00x
▲ VercelExpress2.945s (+2.4%)3.802s (+1.8%)0.857s101.00x
▲ VercelNitro2.948s (-2.3%)3.697s (-3.7%)0.749s101.00x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.569s (-1.3%)11.018s (~)0.449s31.00x
💻 LocalNitro10.818s (~)11.014s (~)0.195s31.02x
💻 LocalExpress10.833s (~)11.014s (~)0.181s31.02x
🐘 PostgresNext.js (Turbopack)14.537s (-2.7%)15.035s (-3.1%)0.498s21.38x
🐘 PostgresNitro20.441s (+0.6%)21.036s (~)0.595s21.93x
🐘 PostgresExpress20.505s (~)21.033s (~)0.529s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express22.599s (-3.3%)23.253s (-3.5%)0.654s21.00x
▲ VercelNext.js (Turbopack)23.230s (-2.4%)23.890s (-2.6%)0.660s21.03x
▲ VercelNitro23.816s (-1.8%)25.024s (-0.7%)1.208s21.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.858s (-1.4%)27.026s (-3.6%)0.168s31.00x
💻 LocalNitro27.447s (~)28.028s (~)0.581s31.02x
💻 LocalExpress27.484s (~)28.026s (~)0.543s31.02x
🐘 PostgresNext.js (Turbopack)34.968s (-5.1% 🟢)35.557s (-5.4% 🟢)0.589s21.30x
🐘 PostgresNitro50.310s (~)51.087s (~)0.776s21.87x
🐘 PostgresExpress50.411s (~)51.065s (~)0.653s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)56.506s (-5.0% 🟢)57.646s (-4.2%)1.140s21.00x
▲ VercelNitro57.748s (-3.2%)58.636s (-3.2%)0.888s21.02x
▲ VercelExpress58.274s (-3.4%)59.239s (-3.2%)0.965s21.03x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)55.651s (-1.7%)56.040s (-1.8%)0.388s21.00x
💻 LocalNitro57.103s (~)58.037s (~)0.933s21.03x
💻 LocalExpress57.194s (~)58.045s (~)0.851s21.03x
🐘 PostgresNext.js (Turbopack)69.502s (-6.0% 🟢)69.603s (-6.1% 🟢)0.101s21.25x
🐘 PostgresNitro100.122s (~)100.146s (-1.0%)0.024s11.80x
🐘 PostgresExpress100.229s (~)101.134s (~)0.905s11.80x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express119.676s (-2.4%)120.574s (-2.2%)0.898s11.00x
▲ VercelNitro119.902s (~)120.679s (~)0.777s11.00x
▲ VercelNext.js (Turbopack)120.556s (-0.7%)121.248s (-1.1%)0.692s11.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.364s (-1.6%)2.011s (~)0.647s151.00x
💻 LocalExpress1.401s (-1.9%)2.006s (~)0.605s151.03x
💻 LocalNitro1.403s (-1.0%)2.006s (~)0.603s151.03x
🐘 PostgresNext.js (Turbopack)2.038s (~)2.533s (-2.8%)0.495s121.49x
🐘 PostgresNitro2.267s (-2.7%)3.014s (~)0.747s101.66x
🐘 PostgresExpress2.334s (~)2.685s (-11.0% 🟢)0.351s121.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.989s (-3.7%)3.835s (+0.9%)0.846s81.00x
▲ VercelNitro3.009s (~)3.904s (-0.9%)0.895s81.01x
▲ VercelExpress3.147s (+9.9% 🔺)4.019s (+4.7%)0.873s81.05x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.292s (-8.9% 🟢)3.231s (+5.9% 🔺)0.939s101.00x
💻 LocalNitro2.539s (-1.0%)3.015s (~)0.476s101.11x
💻 LocalExpress2.572s (-0.9%)3.017s (~)0.445s101.12x
🐘 PostgresNitro8.459s (+2.5%)9.049s (~)0.591s43.69x
🐘 PostgresExpress10.865s (+13.7% 🔺)11.021s (+5.8% 🔺)0.156s34.74x
🐘 PostgresNext.js (Turbopack)11.642s (-7.0% 🟢)12.358s (-2.6%)0.715s35.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.197s (-9.6% 🟢)3.961s (-8.4% 🟢)0.764s81.00x
▲ VercelExpress3.855s (+17.9% 🔺)4.735s (+13.9% 🔺)0.880s71.21x
▲ VercelNext.js (Turbopack)3.867s (+10.6% 🔺)4.487s (+5.4% 🔺)0.620s71.21x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)5.573s (-19.8% 🟢)6.415s (-20.8% 🟢)0.842s51.00x
💻 LocalNitro7.111s (-2.7%)7.889s (-2.2%)0.778s41.28x
💻 LocalExpress7.505s (~)8.438s (-0.7%)0.933s41.35x
🐘 PostgresExpress49.315s (+9.3% 🔺)50.147s (+10.6% 🔺)0.832s18.85x
🐘 PostgresNitro52.542s (+8.7% 🔺)53.172s (+8.1% 🔺)0.630s19.43x
🐘 PostgresNext.js (Turbopack)57.286s (+10.4% 🔺)58.143s (+11.5% 🔺)0.857s110.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.560s (+32.0% 🔺)5.288s (+30.4% 🔺)0.728s71.00x
▲ VercelNext.js (Turbopack)5.302s (+52.3% 🔺)6.208s (+42.6% 🔺)0.906s51.16x
▲ VercelNitro5.705s (+73.2% 🔺)6.590s (+70.2% 🔺)0.885s61.25x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.393s (-1.7%)2.010s (~)0.617s151.00x
💻 LocalNitro1.425s (-0.5%)2.007s (~)0.582s151.02x
💻 LocalExpress1.432s (-1.1%)2.007s (~)0.575s151.03x
🐘 PostgresNext.js (Turbopack)1.859s (-14.2% 🟢)2.085s (-17.3% 🟢)0.226s151.33x
🐘 PostgresExpress1.959s (-6.2% 🟢)2.476s (-5.0% 🟢)0.518s131.41x
🐘 PostgresNitro2.151s (+8.8% 🔺)2.695s (+25.7% 🔺)0.544s121.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.829s (~)3.637s (-4.1%)0.808s91.00x
▲ VercelNitro2.830s (~)3.702s (-1.7%)0.872s91.00x
▲ VercelNext.js (Turbopack)2.918s (~)3.780s (~)0.863s81.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.453s (-7.2% 🟢)3.254s (+7.4% 🔺)0.801s101.00x
💻 LocalExpress2.659s (-1.5%)3.012s (~)0.353s101.08x
💻 LocalNitro2.678s (-3.3%)3.011s (~)0.333s101.09x
🐘 PostgresExpress11.178s (+2.5%)11.692s (~)0.514s34.56x
🐘 PostgresNext.js (Turbopack)11.590s (-8.6% 🟢)12.362s (-7.6% 🟢)0.771s34.73x
🐘 PostgresNitro13.220s (+27.1% 🔺)13.698s (+24.2% 🔺)0.479s35.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.976s (-4.2%)3.760s (-3.1%)0.785s91.00x
▲ VercelExpress3.011s (-1.6%)3.824s (+0.8%)0.814s81.01x
▲ VercelNitro3.083s (~)3.811s (-1.6%)0.728s81.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)6.822s (-8.0% 🟢)7.537s (-10.0% 🟢)0.715s51.00x
💻 LocalNitro7.715s (~)8.720s (~)1.005s41.13x
💻 LocalExpress7.835s (-2.4%)8.795s (-1.7%)0.960s41.15x
🐘 PostgresExpress51.962s (+8.9% 🔺)52.328s (+8.4% 🔺)0.366s17.62x
🐘 PostgresNitro52.639s (+4.0%)53.111s (+3.4%)0.472s17.72x
🐘 PostgresNext.js (Turbopack)56.380s (-2.0%)57.132s (-1.8%)0.752s18.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.445s (+6.8% 🔺)4.213s (+8.9% 🔺)0.768s81.00x
▲ VercelNext.js (Turbopack)3.478s (-11.4% 🟢)4.287s (-7.9% 🟢)0.809s71.01x
▲ VercelExpress3.930s (+12.9% 🔺)4.365s (+5.4% 🔺)0.435s71.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.117s (-18.7% 🟢)1.003s (~)0.013s (-20.2% 🟢)1.025s (~)0.908s101.00x
💻 LocalNitro0.180s (-1.6%)0.992s (~)0.014s (-2.9%)1.020s (~)0.840s101.54x
💻 LocalExpress0.187s (~)0.992s (~)0.015s (-6.5% 🟢)1.022s (~)0.834s101.60x
🐘 PostgresNext.js (Turbopack)0.614s (-7.7% 🟢)0.928s (-4.3%)0.000s (+Infinity% 🔺)1.016s (~)0.402s105.24x
🐘 PostgresExpress1.438s (-40.2% 🟢)1.602s (-39.4% 🟢)0.000s (+Infinity% 🔺)2.013s (-33.3% 🟢)0.575s1012.27x
🐘 PostgresNitro2.331s (+5.3% 🔺)2.712s (-4.1%)0.000s (~)3.016s (~)0.685s1019.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.890s (-6.3% 🟢)3.228s (-6.3% 🟢)0.149s (+8.6% 🔺)3.892s (-5.7% 🟢)1.003s101.00x
▲ VercelExpress2.986s (-3.8%)3.238s (-2.2%)0.182s (-4.5%)3.887s (-3.4%)0.901s101.03x
▲ VercelNext.js (Turbopack)3.076s (-1.4%)3.214s (-0.8%)0.217s (+45.1% 🔺)3.942s (+1.5%)0.866s101.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)12/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelExpress5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates all console logging calls in packages/core/src to use a structured logger utility built on the debug library with OpenTelemetry integration. This provides consistent, filterable logging and removes duplicate logging patterns.

Changes:

  • Replaced all console.log, console.warn, and console.error calls with structured loggers (runtimeLogger, stepLogger) that accept structured metadata
  • Removed duplicate logging where both eventsLogger and console.error were called for the same event
  • Updated test expectations to remove console spy mocking since logging is now handled by the structured logger

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/core/src/telemetry.tsReplaced console.warn with runtimeLogger.warn for OpenTelemetry unavailable warning
packages/core/src/serialization.tsReplaced console.error calls with runtimeLogger.error, adding structured metadata for serialization failures
packages/core/src/runtime/suspension-handler.tsReplaced console.warn calls with runtimeLogger.warn, adding structured context including workflowRunId and correlationId
packages/core/src/runtime/step-handler.tsReplaced console.error/warn calls with stepLogger equivalents, converting formatted error stack strings to structured metadata
packages/core/src/runtime.tsReplaced console.warn/error calls with runtimeLogger equivalents, adding structured metadata for workflow status and errors
packages/core/src/observability.tsReplaced console.error with runtimeLogger.error for event data hydration errors
packages/core/src/events-consumer.tsRemoved duplicate console.error call, keeping only eventsLogger.error for callback errors
packages/core/src/events-consumer.test.tsRemoved console.error spy test code that is no longer needed since duplicate logging was removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Logger now outputs error/warn to console (always visible, not just when DEBUG enabled)
- Downgrade warn → info for expected states (OTel unavailable, workflow/step already completed, idempotency cases)
- Downgrade error → warn for transient failures (step invoked erroneously, error with retry pending)
- Remove verbose debug logs from hot paths (events-consumer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I also would love if the logger eventually moved to utils and then cli could use it too, among other packages, so that we eventually have a unified way of setting debug log level

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good

@pranaygp
pranaygp merged commit e0061b8 into mainFeb 5, 2026
98 checks passed
@pranaygp
pranaygp deleted the pranaygp/improved-logging branch February 5, 2026 00:16
pranaygp added a commit that referenced this pull request Feb 5, 2026
…-parallelization
* origin/main:
Add x-workflow-run-id header to queue messages (#922)
Bump Next.js and React in workbenches (#944)
Add subpath export resolution for package IDs (#901)
Consolidate console logging to structured logger utility (#935)
# Conflicts:
#	packages/core/src/runtime/step-handler.ts
Sign up for freeto 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.

4 participants

@pranaygp@VaguelySerious@karthikscale3