@@ -33,7 +33,7 @@ This guide will show you how to set up Prisma with Trigger.dev, test and view an
3333 <CliViewRunStep />
3434</Steps >
3535
36- ## Creating a task using Prisma and deploying it to production using Trigger.dev
36+ ## Creating a task using Prisma and deploying it to production
3737
3838<Steps >
3939<Step title = " Writing the Prisma task" >
@@ -106,6 +106,27 @@ export default defineConfig({
106106 deploying). You can use pre-built extensions or create your own.
107107</Note >
108108
109+ </Step >
110+
111+ <Step title = " Optional: adding Prisma instrumentation" >
112+
113+ We use OpenTelemetry to [ instrument] ( https://trigger.dev/docs/config/config-file#instrumentations ) our tasks and collect telemetry data.
114+
115+ If you want to automatically log all Prisma queries and mutations, you can use the Prisma instrumentation extension.
116+
117+ ``` js /trigger.config.js
118+ import { defineConfig } from " @trigger.dev/sdk/v3" ;
119+ import { PrismaInstrumentation } from " @prisma/instrumentation" ;
120+ import { OpenAIInstrumentation } from " @traceloop/instrumentation-openai" ;
121+
122+ export default defineConfig ({
123+ // ..other stuff
124+ instrumentations: [new PrismaInstrumentation (), new OpenAIInstrumentation ()],
125+ });
126+ ```
127+
128+ This provides much more detailed information about your tasks with minimal effort.
129+
109130</Step >
110131<Step title = " Deploying your task" >
111132With the build extension and task configured, you can now deploy your task using the Trigger.dev CLI.
@@ -128,9 +149,7 @@ With the build extension and task configured, you can now deploy your task using
128149
129150 </Step >
130151
131- <Step title = " Adding your environment variable to Trigger.dev" >
132-
133- Add your ` DATABASE_URL ` environment variable to Trigger.dev by following these steps:
152+ <Step title = " Adding your DATABASE_URL environment variable to Trigger.dev" >
134153
135154In the sidebar select the "Environment Variables" page, then press the "New environment variable"
136155button. ![ Environment variables page] ( /images/environment-variables-page.jpg )
@@ -160,4 +179,6 @@ Congratulations! You should now see a new completed run, and a new user with the
160179
161180</Steps >
162181
182+ ## Troubleshooting
183+
163184<UsefulNextSteps />
0 commit comments