Support an instrumentation preload for the Nest queue consumer

Open
#5,385 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript

Research direction

Read the Nest queue consumer generation path in @workflow/nest and the workflow-nest build --vercel CLI options, then trace how the consumer, workflow, and step bundles are built. Check the lifecycle-hook documentation and local development behavior. Done means a supported preload runs once per function instance before consumer and step modules, is included in the generated function, and has documented bundle and local development behavior.

Written by the indexing model from the issue text.

Description

Problem

A Nest application deployed with workflow-nest build --vercel runs Workflow's queue consumer in a standalone function that does not load the Nest application's bootstrap or instrumentation module. As a result, an application cannot use its existing OpenTelemetry and error-reporting setup in that function through a documented configuration hook.

The Workflow lifecycle-hook documentation says application startup registration is not supported for the standalone Nest function and cautions against registering at a workflow file's top level. The workflow-nest build CLI does not expose a preload, instrumentation entry, or bundle injection option.

Request

Provide a supported instrumentation or preload entry for the generated Nest queue consumer. It should execute once per function instance before the consumer and step modules, allow an application to register its OpenTelemetry provider and error-reporting integration idempotently, and be bundled with the generated function. Please document how it interacts with the separate workflow and step bundles and local development.

Environment

  • @workflow/nest 5.1.4
  • workflow 5.2.3
  • @workflow/builders 5.0.6
  • Vercel Node.js functions

A supported entry would remove the need for each application to arrange a shared step-side import or patch generated build output.

Dominant language
TypeScript
Stars
2.5k
Forks
401
Avg merge
1d 21h
Merged PRs (30d)
201

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vercel/workflow

All issues in vercel/workflow

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.