Removed the MONITORING_PROVIDER constant from the monitoring package, replaced it with direct process.env access. This ensures that environment variables are accessed directly at the time of use without intermediate variables. In the apps/web/instrumentation.ts file, refactored condition checks for runtime environment and instrumentation enablement, using direct access environmental variables. This change simplifies the code and improves readability.
Sentry Monitoring / @kit/sentry
Please set the following environment variable:
MONITORING_INSTRUMENTATION_PROVIDER=sentry
NEXT_PUBLIC_SENTRY_DSN=your_dsn
Create the following file at the root of your project:
export * from '@kit/sentry/config/client';
Create the following file at the root of your project:
export * from '@kit/sentry/config/server';
Create the following file at the root of your project:
export * from '@kit/sentry/config/edge';
Finally, update the Next.js configuration in your next.config.js file:
import { withSentryConfig } from "@sentry/nextjs";
// wrap your Next.js configuration with the Sentry configuration
withSentryConfig(nextConfig);