In this page, we will see how to setup monitoring in your application.
This feature is implemented in the @kit/monitoring
package.
We are using Sentry as monitoring provider.
Note: No need to use this package if you want to use the vercel monitoring provider, just follow the instructions in the Vercel docs.
Installation
Project Setup
Make sure that the @kit/monitoring
package is installed.
Paste the following code in your instrumentation.ts
file of your application.
import { MonitoringProvider } from '@kit/monitoring';
export const register = MonitoringProvider.register;
export const onRequestError = MonitoringProvider.captureRequestError;
The next step is to set the sentry environment variables.
Sentry Setup
Here is where you will find the sentry environment variables.
Environment Variable | Description |
---|---|
SENTRY_ORG | The organization slug. Go to Sentry > Settings > Organization. You can also find it in the url subdomain. |
SENTRY_PROJECT | The project name. Present in the url after /projects/ |
NEXT_PUBLIC_SENTRY_DSN | The Sentry DSN. Go to the project settings page. Then click on Client Keys (DSN) . |
SENTRY_AUTH_TOKEN | The Sentry auth token. Go to Sentry > Sentry > Organization Tokens Then create and copy a token for your project. |
Environment variables
# ============================================
# 📈 MONITORING & ERROR TRACKING
# ============================================
SENTRY_ORG="your-sentry-org"
SENTRY_PROJECT="your-sentry-project"
NEXT_PUBLIC_SENTRY_DSN='https://xxxxxxxxxxx@xxxxx.ingest.de.sentry.io/xxxxxxxx'
SENTRY_AUTH_TOKEN="your-sentry-auth-token"
Umami
Umami is an open-source analytics solution.
Translations
Boost accessibility and reach a wider audience by translating your app into multiple languages.
How is this guide?
Last updated on 10/17/2025