Skip to content

feat: expose workflow and step names in metadata functions#1285

Merged
TooTallNate merged 5 commits into
mainfrom
feat/metadata-names
Mar 6, 2026
Merged

feat: expose workflow and step names in metadata functions#1285
TooTallNate merged 5 commits into
mainfrom
feat/metadata-names

Conversation

@TooTallNate
Copy link
Copy Markdown
Member

Summary

  • Adds workflowName to WorkflowMetadata and stepName to StepMetadata, making them available via getWorkflowMetadata() and getStepMetadata()
  • Useful for adding context to structured logs, collating logs during investigations, and bucketing errors by workflow/step name

Closes #1103

Add `workflowName` to `WorkflowMetadata` and `stepName` to `StepMetadata`,
making them available via `getWorkflowMetadata()` and `getStepMetadata()`.
This is useful for adding context to structured logs, collating logs during
investigations, and bucketing errors by workflow/step name.

Closes #1103
Copilot AI review requested due to automatic review settings March 6, 2026 04:18
@TooTallNate TooTallNate requested a review from a team as a code owner March 6, 2026 04:18
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 6, 2026

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 6, 2026

🦋 Changeset detected

Latest commit: 235466e

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

This PR includes changesets to release 15 packages
Name Type
@workflow/core Patch
workflow Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/world-testing Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 549 0 67 616
✅ 💻 Local Development 588 0 84 672
✅ 📦 Local Production 588 0 84 672
✅ 🐘 Local Postgres 588 0 84 672
✅ 🪟 Windows 53 0 3 56
❌ 🌍 Community Worlds 114 54 15 183
✅ 📋 Other 141 0 27 168
Total 2621 54 364 3039

❌ Failed Tests

🌍 Community Worlds (54 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint
  • webhookWorkflow
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously

turso (49 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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 (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 49 0 7
✅ example 49 0 7
✅ express 49 0 7
✅ fastify 49 0 7
✅ hono 49 0 7
✅ nextjs-turbopack 54 0 2
✅ nextjs-webpack 54 0 2
✅ nitro 49 0 7
✅ nuxt 49 0 7
✅ sveltekit 49 0 7
✅ vite 49 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 47 0 9
✅ express-stable 47 0 9
✅ fastify-stable 47 0 9
✅ hono-stable 47 0 9
✅ nextjs-turbopack-canary 53 0 3
✅ nextjs-turbopack-stable 53 0 3
✅ nextjs-webpack-canary 53 0 3
✅ nextjs-webpack-stable 53 0 3
✅ nitro-stable 47 0 9
✅ nuxt-stable 47 0 9
✅ sveltekit-stable 47 0 9
✅ vite-stable 47 0 9
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 47 0 9
✅ express-stable 47 0 9
✅ fastify-stable 47 0 9
✅ hono-stable 47 0 9
✅ nextjs-turbopack-canary 53 0 3
✅ nextjs-turbopack-stable 53 0 3
✅ nextjs-webpack-canary 53 0 3
✅ nextjs-webpack-stable 53 0 3
✅ nitro-stable 47 0 9
✅ nuxt-stable 47 0 9
✅ sveltekit-stable 47 0 9
✅ vite-stable 47 0 9
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 47 0 9
✅ express-stable 47 0 9
✅ fastify-stable 47 0 9
✅ hono-stable 47 0 9
✅ nextjs-turbopack-canary 53 0 3
✅ nextjs-turbopack-stable 53 0 3
✅ nextjs-webpack-canary 53 0 3
✅ nextjs-webpack-stable 53 0 3
✅ nitro-stable 47 0 9
✅ nuxt-stable 47 0 9
✅ sveltekit-stable 47 0 9
✅ vite-stable 47 0 9
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 53 0 3
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 2
❌ mongodb 50 3 3
✅ redis-dev 3 0 2
❌ redis 51 2 3
✅ turso-dev 3 0 2
❌ turso 4 49 3
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 47 0 9
✅ e2e-local-postgres-nest-stable 47 0 9
✅ e2e-local-prod-nest-stable 47 0 9

📋 View full workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.027s (-28.5% 🟢) 1.006s (~) 0.979s 10 1.00x
💻 Local Express 0.034s (+3.0%) 1.005s (~) 0.971s 10 1.26x
💻 Local Next.js (Turbopack) 0.041s 1.006s 0.964s 10 1.54x
🌐 Redis Next.js (Turbopack) 0.045s 1.005s 0.960s 10 1.68x
🐘 Postgres Next.js (Turbopack) 0.048s 1.011s 0.964s 10 1.77x
🐘 Postgres Nitro 0.056s (+6.1% 🔺) 1.012s (~) 0.956s 10 2.07x
🐘 Postgres Express 0.057s (+6.4% 🔺) 1.011s (~) 0.954s 10 2.11x
🌐 MongoDB Next.js (Turbopack) 0.087s 1.008s 0.921s 10 3.23x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 0.455s (-34.3% 🟢) 2.012s (-33.2% 🟢) 1.558s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.557s (-33.3% 🟢) 2.157s (-29.6% 🟢) 1.600s 10 1.22x
▲ Vercel Nitro 0.585s (-25.9% 🟢) 2.138s (-22.2% 🟢) 1.553s 10 1.29x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.076s (-2.7%) 2.006s (~) 0.930s 10 1.00x
💻 Local Next.js (Turbopack) 1.101s 2.006s 0.905s 10 1.02x
🌐 Redis Next.js (Turbopack) 1.103s 2.006s 0.904s 10 1.03x
💻 Local Express 1.107s (+0.5%) 2.006s (~) 0.899s 10 1.03x
🐘 Postgres Next.js (Turbopack) 1.122s 2.012s 0.890s 10 1.04x
🐘 Postgres Nitro 1.124s (-1.0%) 2.013s (~) 0.889s 10 1.05x
🐘 Postgres Express 1.131s (-1.0%) 2.012s (~) 0.881s 10 1.05x
🌐 MongoDB Next.js (Turbopack) 1.305s 2.009s 0.704s 10 1.21x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.030s (-10.8% 🟢) 3.759s (-18.7% 🟢) 1.729s 10 1.00x
▲ Vercel Nitro 2.132s (-4.1%) 3.980s (-8.0% 🟢) 1.848s 10 1.05x
▲ Vercel Next.js (Turbopack) 2.173s (-12.3% 🟢) 3.784s (-23.2% 🟢) 1.611s 10 1.07x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.570s (-1.9%) 11.022s (~) 0.453s 3 1.00x
🌐 Redis Next.js (Turbopack) 10.650s 11.022s 0.371s 3 1.01x
💻 Local Next.js (Turbopack) 10.671s 11.023s 0.352s 3 1.01x
🐘 Postgres Next.js (Turbopack) 10.768s 11.045s 0.277s 3 1.02x
💻 Local Express 10.812s (~) 11.023s (~) 0.211s 3 1.02x
🐘 Postgres Nitro 10.859s (~) 11.045s (~) 0.186s 3 1.03x
🐘 Postgres Express 10.897s (~) 11.043s (~) 0.146s 3 1.03x
🌐 MongoDB Next.js (Turbopack) 12.223s 13.019s 0.796s 3 1.16x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 16.627s (-2.0%) 17.708s (-6.5% 🟢) 1.081s 2 1.00x
▲ Vercel Nitro 16.998s (+0.9%) 18.258s (+1.0%) 1.259s 2 1.02x
▲ Vercel Next.js (Turbopack) 17.173s (-4.5%) 18.290s (-11.7% 🟢) 1.117s 2 1.03x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 26.568s 27.050s 0.482s 3 1.00x
💻 Local Nitro 26.601s (-2.1%) 27.050s (-3.6%) 0.449s 3 1.00x
🐘 Postgres Next.js (Turbopack) 26.871s 27.065s 0.194s 3 1.01x
💻 Local Next.js (Turbopack) 26.908s 27.055s 0.147s 3 1.01x
🐘 Postgres Nitro 26.928s (-0.7%) 27.068s (-3.6%) 0.140s 3 1.01x
🐘 Postgres Express 26.997s (~) 27.399s (-1.2%) 0.402s 3 1.02x
💻 Local Express 27.240s (~) 28.052s (~) 0.811s 3 1.03x
🌐 MongoDB Next.js (Turbopack) 30.380s 31.039s 0.660s 2 1.14x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 45.603s (+4.8%) 47.333s (+4.8%) 1.729s 2 1.00x
▲ Vercel Express 46.022s (+2.4%) 47.744s (+0.9%) 1.723s 2 1.01x
▲ Vercel Nitro 46.038s (+4.6%) 47.699s (+4.0%) 1.661s 2 1.01x

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

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 52.964s 53.097s 0.133s 2 1.00x
🐘 Postgres Next.js (Turbopack) 53.679s 54.112s 0.433s 2 1.01x
🐘 Postgres Nitro 53.813s (~) 54.103s (~) 0.290s 2 1.02x
🐘 Postgres Express 54.096s (~) 54.605s (+0.9%) 0.509s 2 1.02x
💻 Local Nitro 54.839s (-2.0%) 55.097s (-1.8%) 0.258s 2 1.04x
💻 Local Next.js (Turbopack) 55.401s 56.099s 0.699s 2 1.05x
💻 Local Express 55.983s (~) 56.101s (-0.9%) 0.119s 2 1.06x
🌐 MongoDB Next.js (Turbopack) 60.831s 61.075s 0.244s 2 1.15x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 96.808s (-3.6%) 98.732s (-3.9%) 1.924s 1 1.00x
▲ Vercel Next.js (Turbopack) 98.911s (+3.0%) 100.568s (+2.5%) 1.657s 1 1.02x
▲ Vercel Nitro 104.150s (+9.5% 🔺) 106.172s (+8.8% 🔺) 2.022s 1 1.08x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.240s 2.006s 0.767s 15 1.00x
🐘 Postgres Nitro 1.349s (-1.8%) 2.012s (~) 0.663s 15 1.09x
🐘 Postgres Express 1.351s (-1.8%) 2.012s (~) 0.660s 15 1.09x
💻 Local Nitro 1.389s (-0.9%) 2.006s (~) 0.617s 15 1.12x
🐘 Postgres Next.js (Turbopack) 1.391s 2.011s 0.620s 15 1.12x
💻 Local Express 1.397s (-1.9%) 2.006s (~) 0.609s 15 1.13x
💻 Local Next.js (Turbopack) 1.410s 2.006s 0.596s 15 1.14x
🌐 MongoDB Next.js (Turbopack) 2.160s 3.008s 0.848s 10 1.74x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.281s (-17.0% 🟢) 4.051s (-22.7% 🟢) 1.769s 8 1.00x
▲ Vercel Express 2.406s (-20.3% 🟢) 4.057s (-23.0% 🟢) 1.651s 8 1.05x
▲ Vercel Next.js (Turbopack) 2.454s (-12.2% 🟢) 4.045s (-19.7% 🟢) 1.590s 8 1.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.007s (+0.5%) 2.740s (+5.4% 🔺) 0.732s 11 1.00x
🐘 Postgres Nitro 2.077s (-0.6%) 2.601s (~) 0.523s 12 1.03x
🐘 Postgres Next.js (Turbopack) 2.112s 2.600s 0.488s 12 1.05x
💻 Local Nitro 2.388s (-8.0% 🟢) 3.009s (~) 0.621s 10 1.19x
🌐 Redis Next.js (Turbopack) 2.512s 3.008s 0.496s 10 1.25x
💻 Local Express 2.526s (-5.5% 🟢) 3.007s (-3.2%) 0.481s 10 1.26x
💻 Local Next.js (Turbopack) 2.547s 3.008s 0.460s 10 1.27x
🌐 MongoDB Next.js (Turbopack) 4.742s 5.177s 0.435s 6 2.36x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.735s (-20.8% 🟢) 4.822s (-7.1% 🟢) 2.086s 7 1.00x
▲ Vercel Nitro 3.031s (+9.6% 🔺) 6.266s (+39.4% 🔺) 3.234s 5 1.11x
▲ Vercel Next.js (Turbopack) 3.289s (+18.0% 🔺) 5.565s (+17.8% 🔺) 2.275s 6 1.20x

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

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 3.877s 4.589s 0.713s 7 1.00x
🐘 Postgres Nitro 4.015s (-6.7% 🟢) 4.738s (-5.9% 🟢) 0.723s 7 1.04x
🐘 Postgres Express 4.077s (+9.5% 🔺) 4.743s (+3.2%) 0.666s 7 1.05x
🌐 Redis Next.js (Turbopack) 4.247s 5.011s 0.764s 6 1.10x
💻 Local Nitro 6.814s (-11.4% 🟢) 7.013s (-12.5% 🟢) 0.200s 5 1.76x
💻 Local Express 6.935s (-10.0% 🟢) 7.218s (-10.0% 🟢) 0.283s 5 1.79x
💻 Local Next.js (Turbopack) 7.375s 8.019s 0.644s 4 1.90x
🌐 MongoDB Next.js (Turbopack) 9.882s 10.347s 0.465s 3 2.55x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.776s (+16.3% 🔺) 5.756s (+20.7% 🔺) 1.980s 6 1.00x
▲ Vercel Nitro 4.955s (+58.0% 🔺) 6.960s (+44.3% 🔺) 2.005s 5 1.31x
▲ Vercel Express 4.983s (+60.3% 🔺) 6.493s (+34.7% 🔺) 1.510s 5 1.32x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.234s 2.006s 0.772s 15 1.00x
💻 Local Nitro 1.384s (-3.4%) 2.005s (~) 0.621s 15 1.12x
🐘 Postgres Next.js (Turbopack) 1.385s 2.013s 0.628s 15 1.12x
🐘 Postgres Express 1.397s (~) 2.011s (~) 0.614s 15 1.13x
🐘 Postgres Nitro 1.403s (+1.0%) 2.013s (~) 0.609s 15 1.14x
💻 Local Next.js (Turbopack) 1.418s 2.005s 0.587s 15 1.15x
💻 Local Express 1.425s (-2.3%) 2.006s (~) 0.581s 15 1.15x
🌐 MongoDB Next.js (Turbopack) 2.168s 3.008s 0.840s 10 1.76x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.682s (-1.5%) 4.542s (-0.6%) 1.859s 7 1.00x
▲ Vercel Next.js (Turbopack) 2.778s (+4.3%) 4.567s (-4.2%) 1.789s 7 1.04x
▲ Vercel Nitro 2.892s (+26.8% 🔺) 4.884s (+23.2% 🔺) 1.993s 7 1.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.971s (-4.9%) 2.513s (~) 0.542s 12 1.00x
🐘 Postgres Next.js (Turbopack) 1.989s 2.596s 0.607s 12 1.01x
🐘 Postgres Express 1.999s (-3.2%) 2.475s (~) 0.476s 13 1.01x
💻 Local Nitro 2.469s (-11.4% 🟢) 3.007s (-3.3%) 0.538s 10 1.25x
🌐 Redis Next.js (Turbopack) 2.510s 3.008s 0.498s 10 1.27x
💻 Local Express 2.634s (-1.9%) 3.008s (~) 0.374s 10 1.34x
💻 Local Next.js (Turbopack) 2.679s 3.007s 0.328s 10 1.36x
🌐 MongoDB Next.js (Turbopack) 4.694s 5.178s 0.484s 6 2.38x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.692s (+0.7%) 4.143s (-16.0% 🟢) 1.451s 8 1.00x
▲ Vercel Next.js (Turbopack) 2.999s (+5.5% 🔺) 4.367s (-10.8% 🟢) 1.369s 7 1.11x
▲ Vercel Nitro 3.025s (+15.9% 🔺) 4.692s (+0.7%) 1.667s 7 1.12x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.492s (~) 4.146s (-3.0%) 0.654s 8 1.00x
🐘 Postgres Express 3.530s (-8.3% 🟢) 4.272s (-10.0% 🟢) 0.742s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.909s 4.594s 0.685s 7 1.12x
🌐 Redis Next.js (Turbopack) 4.262s 5.010s 0.748s 6 1.22x
💻 Local Nitro 7.222s (-10.8% 🟢) 8.017s (-8.6% 🟢) 0.795s 4 2.07x
💻 Local Express 7.865s (-2.8%) 8.270s (-5.7% 🟢) 0.405s 4 2.25x
💻 Local Next.js (Turbopack) 7.984s 8.515s 0.531s 4 2.29x
🌐 MongoDB Next.js (Turbopack) 10.031s 10.683s 0.652s 3 2.87x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.044s (-11.4% 🟢) 4.307s (-23.9% 🟢) 1.263s 8 1.00x
▲ Vercel Nitro 3.132s (-6.4% 🟢) 4.538s (-16.9% 🟢) 1.406s 7 1.03x
▲ Vercel Next.js (Turbopack) 3.662s (+5.3% 🔺) 5.194s (-8.5% 🟢) 1.533s 6 1.20x

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

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.120s (-27.8% 🟢) 1.002s (~) 0.010s (-11.2% 🟢) 1.016s (~) 0.895s 10 1.00x
💻 Local Next.js (Turbopack) 0.137s 1.002s 0.012s 1.018s 0.881s 10 1.14x
🌐 Redis Next.js (Turbopack) 0.141s 1.000s 0.002s 1.008s 0.867s 10 1.17x
💻 Local Express 0.175s (+2.0%) 1.003s (~) 0.011s (-11.8% 🟢) 1.016s (~) 0.841s 10 1.45x
🐘 Postgres Next.js (Turbopack) 0.180s 1.001s 0.002s 1.013s 0.833s 10 1.50x
🐘 Postgres Express 0.195s (+0.5%) 0.995s (~) 0.002s (-6.3% 🟢) 1.013s (~) 0.818s 10 1.61x
🐘 Postgres Nitro 0.197s (-7.7% 🟢) 0.998s (+0.7%) 0.001s (-23.5% 🟢) 1.013s (~) 0.816s 10 1.64x
🌐 MongoDB Next.js (Turbopack) 0.502s 0.943s 0.002s 1.010s 0.507s 10 4.17x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.603s (-6.7% 🟢) 2.574s (+12.2% 🔺) 0.090s (+40.7% 🔺) 3.346s (+9.7% 🔺) 1.743s 10 1.00x
▲ Vercel Express 1.652s (-5.1% 🟢) 2.096s (-22.9% 🟢) 0.096s (+6.7% 🔺) 2.844s (-18.0% 🟢) 1.192s 10 1.03x
▲ Vercel Next.js (Turbopack) 1.656s (-7.4% 🟢) 2.413s (-12.4% 🟢) 0.061s (-61.0% 🟢) 3.043s (-20.9% 🟢) 1.388s 10 1.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 12/12
🐘 Postgres Next.js (Turbopack) 8/12
▲ Vercel Express 8/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 7/12
Next.js (Turbopack) 🌐 Redis 5/12
Nitro 💻 Local 6/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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 extends the public metadata APIs so workflow and step functions can reliably include human-meaningful identifiers (workflowName, stepName) in structured logs and diagnostics, addressing #1103.

Changes:

  • Add workflowName to WorkflowMetadata and plumb it into workflow VM context and step execution context.
  • Add stepName to StepMetadata and plumb it into step execution context.
  • Update e2e/examples and serialization tests to assert/propagate the new metadata fields.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
workbench/example/workflows/99_e2e.ts Returns workflowName as part of the workflow metadata payload for the e2e workflow.
packages/core/src/workflow/get-workflow-metadata.ts Extends WorkflowMetadata with workflowName.
packages/core/src/workflow.ts Populates workflowName into the workflow VM global metadata context.
packages/core/src/step/get-step-metadata.ts Extends StepMetadata with stepName.
packages/core/src/runtime/step-handler.ts Populates stepName and workflowName into AsyncLocalStorage context for step execution.
packages/core/src/serialization.test.ts Updates test context to include stepName/workflowName.
packages/core/e2e/e2e.test.ts Adds e2e assertions for workflowName and stepName availability/absence in the right contexts.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment thread packages/core/src/step/get-step-metadata.ts
Comment thread packages/core/src/workflow/get-workflow-metadata.ts
Signed-off-by: Nathan Rajlich <n@n8.io>
Sign up for free to 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.

Workflow / Step Name Availability in Metadata Functions

4 participants