Self hostingAdd other services
Sentry
Copy page
Add Sentry monitoring to your agent services
Overview
Learn how to add Sentry monitoring to your Inkeep Agent Framework services.
Step 1: Install Sentry
Step 2: Update your .env file
Add your Sentry DSN to the .env file in the root of your workspace.
Step 3: Configure Sentry
In apps/run-api and apps/manage-api create a new file called sentry.ts and add the following code:
In apps/run-api/src/index.ts and apps/manage-api/src/index.ts add the following code to the top of the file before all other imports:
Forward Error Logs to Sentry
You can use pino-sentry-transport to forward error logs to Sentry.
Step 1: Install pino-sentry-transport
Step 2: Configure pino-sentry-transport
Add the following code to the top of your apps/run-api/src/index.ts file:
Add the following code to the top of your apps/manage-api/src/index.ts file:
Additional Resources
For more information on how to configure Sentry, you can consult the official Sentry Node.js documentation.