healthCheck
Performs an end-to-end health check of a deployment's workflow infrastructure by sending a message through the queue pipeline and verifying it is processed by the workflow endpoint. Because it goes through the queue rather than direct HTTP, it works even when the deployment is behind Deployment Protection on Vercel.
API signature
Parameters
| Parameter | Type | Description |
|---|---|---|
world | World | The World instance to send the health check through |
options | HealthCheckOptions | Optional configuration |
Where HealthCheckOptions is:
| Option | Type | Description |
|---|---|---|
timeout | number | Milliseconds to wait for the health check response. Default: 30000. |
deploymentId | string | Deployment to target. Falls back to process.env.VERCEL_DEPLOYMENT_ID. |
namespace | string | Queue namespace of the target deployment. Falls back to WORKFLOW_QUEUE_NAMESPACE. |
Returns
Returns a Promise<HealthCheckResult>:
| Property | Type | Description |
|---|---|---|
healthy | boolean | Whether the combined workflow endpoint processed the health check message |
error | string | undefined | Error message when the check failed |
latencyMs | number | undefined | Round-trip latency when the check succeeded |
specVersion | number | undefined | Workflow spec version of the responding deployment |
workflowCoreVersion | string | undefined | @workflow/core version of the responding deployment |
dynamicWorkflowVersion | number | undefined | Dynamic-workflow runtime version of the responding deployment. Present only when it has opted in with WORKFLOW_EXPERIMENTAL_DYNAMIC_WORKFLOWS; see Dynamic Workflows |