* chore: Upgrade Sentry in v1, v2 & web * fix: Keep ./instrument to be the first line * Remove eslint-plugin-import (fixed in prettier) * Optimistic removal pending some feedback * Simplified and fixed sentry wrapper * Create instrumentation.ts also in APIv1 * sentry key in main nextConfig is deprecated
13 lines
381 B
TypeScript
13 lines
381 B
TypeScript
import { getEnv } from "@/env";
|
|
import * as Sentry from "@sentry/node";
|
|
|
|
if (process.env.SENTRY_DSN) {
|
|
// Ensure to call this before requiring any other modules!
|
|
Sentry.init({
|
|
dsn: getEnv("SENTRY_DSN"),
|
|
// Add Performance Monitoring by setting tracesSampleRate
|
|
// We recommend adjusting this value in production
|
|
// todo: Evaluate? tracesSampleRate: 1.0
|
|
});
|
|
}
|