feat: re-export parseName + hydrators for observability DX#1453
feat: re-export parseName + hydrators for observability DX#1453
Conversation
…dule Re-export parseStepName, parseWorkflowName, parseClassName from @workflow/utils main index so consumers don't need the internal sub-path @workflow/utils/parse-name. Add workflow/observability sub-export that bundles hydration utilities (hydrateResourceIO, observabilityRevivers, hydrateData) alongside the parseName functions for one-stop observability imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Express | Nitro workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (56 failed)mongodb (3 failed):
redis (2 failed):
turso (51 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
Summary
parseStepName,parseWorkflowName,parseClassNamefrom@workflow/utilsmain index (previously only available via hidden sub-path@workflow/utils/parse-name)workflow/observabilitysub-export that bundles hydration utilities (hydrateResourceIO,observabilityRevivers,hydrateData) alongside parseName functions for one-stop observability importsContext
From this Slack thread — heavy WDK dogfooding in #project-dse-hypercare surfaced DX gaps. We wrote a custom ~50-line devalue decoder + custom
parseStepName/parseWorkflowNamein our CLI (dsebr-vc#195) because these weren't discoverable from public import paths.Pranay + Peter aligned that re-exports are the quick win (world-level auto-hydration is harder due to node vs browser env concerns + async hydration conflicting with runtime stream wrapping).
What this enables
Before (hidden internal paths)
After — option 1: from @workflow/utils main index
After — option 2: one-stop import from workflow/observability
Real-world usage example (from our CLI)
Changes
packages/utils/src/index.tsparseClassName,parseStepName,parseWorkflowNamefrom main indexpackages/utils/src/re-exports.test.tspackages/workflow/src/observability.tsworkflow/observabilitysub-export with JSDoc + usage examplepackages/workflow/src/observability.test.tspackages/workflow/package.json./observabilityexport map +@workflow/utilsdependencypnpm-lock.yamlTesting
Automated (all pass)
What the tests verify
parseStepName,parseWorkflowName,parseClassNameimportable from@workflow/utilsmain indexhydrateResourceIOcorrectly hydrates step resources with plain value inputshydrateDatapasses through plain JS values (string, number, null)observabilityReviverscontains expected reviver keys (ReadableStream,WritableStream,StepFunction)observability.tscompilationManual verification
tsc --noEmitconfirms zero type errors for our new files@workflow/utils,@workflow/core, andworkflowpackages —observability.js+observability.d.tsgenerated correctlyRelated
🤖 Generated with Claude Code