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
* Adds “Explore by build extension” to the intro page
* Adds instructions for clearing the build cache
* Add a tip for running trigger dev + next dev concurrently
* left align table headers
* Adds trouble shooting for pino
* Adds corepack bug and workaround
* Removes reference to undici as it messes with spans
* Left align table headers
* Adds example for exporting logs to Axiom
|`@opentelemetry/instrumentation-undici`| Logs all fetch calls (inc. Undici fetch) |
133
132
|`@opentelemetry/instrumentation-http`| Logs all HTTP calls |
134
133
|`@prisma/instrumentation`| Logs all Prisma calls, you need to [enable tracing](https://github.com/prisma/prisma/tree/main/packages/instrumentation)|
135
134
|`@traceloop/instrumentation-openai`| Logs all OpenAI calls |
@@ -138,6 +137,37 @@ Some ones we recommend:
138
137
`@opentelemetry/instrumentation-fs` which logs all file system calls is currently not supported.
139
138
</Note>
140
139
140
+
### Exporters
141
+
142
+
You can also configure custom exporters to send your telemetry data to other services. For example, you can send your logs to [Axiom](https://axiom.co/docs/guides/opentelemetry-nodejs#exporter-instrumentation-ts):
Make sure to set the `AXIOM_API_TOKEN` and `AXIOM_DATASET` environment variables in your project.
170
+
141
171
## Runtime
142
172
143
173
We currently only officially support the `node` runtime, but you can try our experimental `bun` runtime by setting the `runtime` option in your config file:
Before you can run production workloads on Trigger.dev, you need to deploy your tasks. The only way to do this at the moment is through the [deploy CLI command](/cli-deploy):
<Note>This guide can be followed for both App and Pages router as well as Server Actions.</Note>
23
25
24
26
<Prerequisitesframework="Next.js" />
@@ -32,6 +34,8 @@ import VercelDocsCards from "/snippets/vercel-docs-cards.mdx";
32
34
<CliViewRunStep />
33
35
</Steps>
34
36
37
+
<RunDevAndNextConcurrently />
38
+
35
39
## Set your secret key locally
36
40
37
41
Set your `TRIGGER_SECRET_KEY` environment variable in your `.env.local` file if using the Next.js App router or `.env` file if using Pages router. This key is used to authenticate with Trigger.dev, so you can trigger runs from your Next.js app. Visit the API Keys page in the dashboard and select the DEV secret key.
Copy file name to clipboardExpand all lines: docs/logging.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,9 +38,9 @@ Tracing is a way to follow the flow of your code. It's very useful for debugging
38
38
Trigger.dev uses OpenTelemetry tracing under the hood. With automatic tracing for many things like task triggering, task attempts, HTTP requests, and more.
Instead of running your Next.js app and Trigger.dev dev server in separate terminals, you can run them concurrently. First, add these scripts to your `package.json`:
@@ -29,6 +30,10 @@ Then change the permissions of the npm folder (if 1 doesn't work):
29
30
sudo chown -R $(whoami)~/.npm
30
31
```
31
32
33
+
### Clear the build cache
34
+
35
+
Ensure you have stopped your local dev server then locate the hidden `.trigger` folder in your project and delete it. You can then restart your local dev server.
36
+
32
37
## Deployment
33
38
34
39
Running the [trigger.dev deploy] command builds and deploys your code. Sometimes there can be issues building your code.
@@ -63,6 +68,13 @@ export default defineConfig({
63
68
});
64
69
```
65
70
71
+
### `Cannot find module '/app/lib/worker.js"` when using pino
72
+
73
+
If you see this error, add pino (and any other associated packages) to your `external` build settings in your `trigger.config.ts` file. Learn more about the `external` setting in the [config docs](/config/config-file#external).
74
+
75
+
<CorepackError />
76
+
77
+
66
78
## Project setup issues
67
79
68
80
### `The requested module 'node:events' does not provide an export named 'addAbortListener'`
0 commit comments