This example demonstrates how to track errors with Sentry using Trigger.dev.
trigger.config.ts file. This will then run every time you deploy your project.
SENTRY_AUTH_TOKEN and SENTRY_DSN environment variables. You can find
the SENTRY_AUTH_TOKEN in your Sentry dashboard, in settings -> developer settings -> auth tokens
and the SENTRY_DSN in your Sentry dashboard, in settings -> projects -> your project -> client
keys (DSN). Add these to your .env file, and in your Trigger.dev
dashboard, under environment variables in your project’s sidebar.test page in the sidebar of your Trigger.dev dashboard, click on your prod environment, and select the sentryErrorTest task.
Run a test task with an empty payload by clicking the Run test button.
Your run should then fail, and if everything is set up correctly, you will see an error in the Sentry project dashboard shortly after.