Setting Monitoring in Makerkit | Next.js SaaS Boilerplate
Introducing how Makerkit handles monitoring of performance metrics and exceptions in the Next.js Supabase SaaS kit
Steps to configure monitoring
Learn how to configure monitoring in the Next.js Supabase Starter Kit.
Monitoring Providers
Makerkit provides first-class support for two monitoring providers:
Our plugin system can allow you to add support for other providers in the future. For example, here we added support for Telegram.
Configuring Monitoring in Makerkit
To set up monitoring in your application, you need to define the two variables below:
# sentry or baselimeNEXT_PUBLIC_MONITORING_PROVIDER=# performance monitoring (only required for Baselime)ENABLE_MONITORING_INSTRUMENTATION=trueINSTRUMENTATION_SERVICE_NAME=your_service_name
- Monitoring Provider - the monitoring provider to use. Based on this variable, Makerkit will provide the relative implementation.
- Enable Instrumentation - if enabled, we report performance metrics to the provider using Next.js
For the provider's specific settings, please check the relative documentation.
Performance Monitoring
Makerkit will set up a few things for you out of the box:
- Performance Metrics - Instrumentation using Next.js's instrumentation hook
- Client exceptions - Automatically capturing uncaught exceptions on the client
- Server exceptions - Automatically capturing server-side exceptions captured by the Next.js instrumentation hook
Additionally, it provides you with the tools to manually capturing exceptions, should you want to.