You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're retiring Trigger.dev v3. **New v3 deploys will stop working from 1 April 2026.** Trigger.dev v4 is stable, fully supported, and recommended for all users.
13
+
14
+
**Key dates:**
15
+
16
+
-**1 April 2026** — New v3 deploys will no longer work. Existing v3 runs will continue to execute.
17
+
-**1 July 2026** — v3 will be fully shut down. All v3 runs will stop executing.
18
+
19
+
**What you need to do:** Migrate to v4 before April to avoid disruption to your task executions. The migration takes about 2 minutes — follow the steps on this page below. If you have questions or need help, [contact us](https://trigger.dev/contact) or reach out in our [Discord](https://trigger.dev/discord).
**Lifecycle hooks**: Function signatures have changed to use a single object parameter instead of separate parameters. This is the old version:
154
+
**Lifecycle hooks**: Function signatures have changed to use a single object parameter instead of separate parameters. Prefer `onStartAttempt` over the deprecated `onStart` when you need code to run before each attempt. This is the old version:
**triggerAndWait / batchTriggerAndWait**: In v4 these return a Result object, not the raw output. Use `if (result.ok) { ... result.output }` or call `.unwrap()` to get the output (throws if the run failed). Do not wrap `triggerAndWait` or `batchTriggerAndWait` in `Promise.all` — this is not supported.
208
+
209
+
210
+
**Context (ctx) changes**: `ctx.attempt.id` and `ctx.attempt.status` have been removed; use `ctx.attempt.number` where needed. `ctx.task.exportName` has been removed.
211
+
212
+
207
213
Can you help me convert the following code from v3 to v4? Please include the full converted code in the answer, do not truncate it anywhere.
Copy file name to clipboardExpand all lines: docs/vercel-integration.mdx
+45-18Lines changed: 45 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,8 @@ The Vercel integration connects your Vercel project to your Trigger.dev project
10
10
This eliminates the need to manually run the `trigger.dev deploy` command or maintain custom CI/CD workflows for Vercel-based projects.
11
11
12
12
<Note>
13
-
The Vercel integration requires the [GitHub integration](/github-integration) to be connected as well, since Trigger.dev builds your tasks from your GitHub repository.
13
+
The Vercel integration requires the [GitHub integration](/github-integration) to be connected as
14
+
well, since Trigger.dev builds your tasks from your GitHub repository.
14
15
</Note>
15
16
16
17
## Installation
@@ -22,23 +23,27 @@ You can connect Vercel from two entry points:
22
23
<Steps>
23
24
24
25
<Steptitle="Connect Vercel">
25
-
Go to your project's **Settings** page and click **Connect Vercel**. This will redirect you to Vercel to authorize the Trigger.dev app.
26
+
Go to your project's **Settings** page and click **Connect Vercel**. This will redirect you to
27
+
Vercel to authorize the Trigger.dev app.
26
28
</Step>
27
29
28
30
<Steptitle="Select a Vercel project">
29
31
Choose which Vercel project to connect to your Trigger.dev project.
30
32
</Step>
31
33
32
34
<Steptitle="Map environments">
33
-
If your Vercel project has custom environments, choose which one maps to your Trigger.dev staging environment.
35
+
If your Vercel project has custom environments, choose which one maps to your Trigger.dev staging
36
+
environment.
34
37
</Step>
35
38
36
39
<Steptitle="Sync environment variables">
37
-
Review the environment variables that will be pulled from Vercel into Trigger.dev. You can deselect any variables you don't want to sync.
40
+
Review the environment variables that will be pulled from Vercel into Trigger.dev. You can
41
+
deselect any variables you don't want to sync.
38
42
</Step>
39
43
40
-
<Steptitle="Configure build settings">
41
-
Optionally adjust [build settings](#build-settings) for atomic deployments, env var pulling, and new env var discovery.
44
+
<Steptitle="Configure build options">
45
+
Optionally adjust [build options](#build-options) for atomic deployments, env var pulling, and new
46
+
env var discovery.
42
47
</Step>
43
48
44
49
<Steptitle="Connect GitHub">
@@ -52,11 +57,14 @@ You can connect Vercel from two entry points:
52
57
<Steps>
53
58
54
59
<Steptitle="Install the integration">
55
-
Find Trigger.dev on the Vercel Marketplace and install it. This will redirect you to Trigger.dev to complete setup.
60
+
Install the [Trigger.dev integration from the Vercel
61
+
Marketplace](https://vercel.com/marketplace/trigger). This will redirect you to Trigger.dev to
62
+
complete setup.
56
63
</Step>
57
64
58
65
<Steptitle="Select your Trigger.dev organization and project">
59
-
Choose which Trigger.dev organization and project to connect. If you're new to Trigger.dev, you'll be guided through creating an organization and project.
66
+
Choose which Trigger.dev organization and project to connect. If you're new to Trigger.dev, you'll
67
+
be guided through creating an organization and project.
60
68
</Step>
61
69
62
70
<Steptitle="Connect GitHub">
@@ -66,9 +74,21 @@ You can connect Vercel from two entry points:
66
74
</Steps>
67
75
68
76
<Note>
69
-
When installing from the Vercel Marketplace, default build settings are applied automatically. You can adjust them later in your project settings.
77
+
When installing from the Vercel Marketplace, default Build options are applied automatically. You
78
+
can adjust them later in your project settings.
70
79
</Note>
71
80
81
+
<Warning>
82
+
**Vercel Root Directory:** If your Vercel project uses a **Root Directory** (e.g. you deploy a
83
+
single subfolder such as `app` or `web`), you may see "The specified Root Directory does not
84
+
exist" after connecting the integration. If you see this error, try using the **repository root**
85
+
(leave Root Directory empty) in your Vercel project settings. If your Vercel frontend build
86
+
requires a Root Directory (e.g. in a monorepo), keep that setting in Vercel and instead point
87
+
Trigger.dev to the subfolder by setting the **Trigger config file** path (and other [Build
88
+
options](#build-options)) in your Trigger.dev project configuration. Trigger.dev always builds
89
+
from the repo root.
90
+
</Warning>
91
+
72
92
## Environment variable sync
73
93
74
94
The integration syncs environment variables in both directions:
@@ -78,13 +98,15 @@ The integration syncs environment variables in both directions:
78
98
**Trigger.dev → Vercel**: Trigger.dev syncs API keys (like `TRIGGER_SECRET_KEY`) to your Vercel project so your app can communicate with Trigger.dev.
79
99
80
100
The following variables are excluded from the Vercel → Trigger.dev sync:
101
+
81
102
-`TRIGGER_SECRET_KEY`, `TRIGGER_VERSION`, `TRIGGER_PREVIEW_BRANCH` (managed by Trigger.dev)
82
103
- Sensitive/secret-type variables (Vercel API limitation)
83
104
84
105
You can control sync behavior per-variable from your project's Vercel settings. Deselecting a variable prevents its value from being updated during future syncs.
85
106
86
107
<Tip>
87
-
For dynamic environment variables (e.g., from NeonDB branching), use the `syncEnvVars` build extension instead. Learn more about [environment variables](/deploy-environment-variables).
108
+
For dynamic environment variables (e.g., from NeonDB branching), use the `syncEnvVars` build
109
+
extension instead. Learn more about [environment variables](/deploy-environment-variables).
88
110
</Tip>
89
111
90
112
## Atomic deployments
@@ -94,7 +116,9 @@ Atomic deployments ensure your Vercel app and Trigger.dev tasks are deployed in
94
116
Atomic deployments are enabled for the production environment by default.
95
117
96
118
<Note>
97
-
When atomic deployments are enabled, the integration automatically disables `Auto-assign Custom Production Domains` on your Vercel project. This is required so that Vercel doesn't promote a deployment before the Trigger.dev build is ready.
119
+
When atomic deployments are enabled, the integration automatically disables `Auto-assign Custom
120
+
Production Domains` on your Vercel project. This is required so that Vercel doesn't promote a
121
+
deployment before the Trigger.dev build is ready.
98
122
</Note>
99
123
100
124
Previously, setting up atomic deployments with Vercel required custom GitHub Actions workflows. The Vercel integration automates this entirely. For more details on how atomic deployments work, see [Atomic deploys](/deployment/atomic-deployment).
@@ -103,27 +127,30 @@ Previously, setting up atomic deployments with Vercel required custom GitHub Act
103
127
104
128
The integration maps Vercel environments to Trigger.dev environments:
| Custom environment | Staging (you choose which one) |
110
-
| Preview | Preview |
111
-
| Development | Development |
134
+
| Preview | Preview|
135
+
| Development | Development|
112
136
113
137
If your Vercel project has a custom environment, you can select which one maps to your Trigger.dev staging environment during setup or in your project settings.
114
138
115
139
<Note>
116
-
Preview deployments require the preview environment to be enabled on your project. Learn more about [preview branches](/deployment/preview-branches).
140
+
Preview deployments require the preview environment to be enabled on your project. Learn more
141
+
about [preview branches](/deployment/preview-branches).
117
142
</Note>
118
143
119
-
## Build settings
144
+
## Build options
120
145
121
146
You can configure the following settings per-environment from your project's Vercel settings:
122
147
123
148
-**Atomic deployments**: Controls whether Trigger.dev and Vercel deployments are synchronized. Enabled for production by default.
124
149
-**Pull env vars before build**: When enabled, Trigger.dev pulls the latest environment variables from Vercel before each build. Enabled for production, staging, and preview by default.
125
150
-**Discover new env vars**: When enabled, new environment variables found in Vercel that don't yet exist in Trigger.dev are created automatically during builds. Only available for environments that also have env var pulling enabled. Enabled for production, staging, and preview by default.
126
151
152
+
To change build options that would normally go in `trigger.config.ts` (such as [extensions](/config/config-file#extensions) or other build configuration), use **Build options** on your project's configuration page in the Trigger.dev dashboard.
153
+
127
154
## Disconnecting
128
155
129
156
You can disconnect the Vercel integration from either side:
Copy file name to clipboardExpand all lines: packages/cli-v3/CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# trigger.dev
2
2
3
+
## 4.4.1
4
+
5
+
### Patch Changes
6
+
7
+
- Add OTEL metrics pipeline for task workers. Workers collect process CPU/memory, Node.js runtime metrics (event loop utilization, event loop delay, heap usage), and user-defined custom metrics via `otel.metrics.getMeter()`. Metrics are exported to ClickHouse with 10-second aggregation buckets and 1m/5m rollups, and are queryable through the dashboard query engine with typed attribute columns, `prettyFormat()` for human-readable values, and AI query support. ([#3061](https://github.com/triggerdotdev/trigger.dev/pull/3061))
0 commit comments