feat(observability): integrate Sentry error tracking for API and Web apps
- API: add @sentry/nestjs with instrument.ts, SentryModule, and SentryGlobalFilter - Web: add @sentry/nextjs with client/server/edge configs, instrumentation hook - Update next.config.js with withSentryConfig wrapper - Replace TODO in error.tsx with Sentry.captureException - Add SENTRY_DSN, SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT to .env.example Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const { withSentryConfig } = require('@sentry/nextjs');
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
@@ -42,4 +44,11 @@ const nextConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
module.exports = withSentryConfig(nextConfig, {
|
||||
org: process.env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT,
|
||||
silent: !process.env.CI,
|
||||
widenClientFileUpload: true,
|
||||
disableLogger: true,
|
||||
automaticVercelMonitors: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user