- Add @sentry/nextjs@10.53.1
- sentry.{client,server,edge}.config.ts — GlitchTip-compatible init
(no Replay, tracesSampleRate=0.05, guarded on DSN presence)
- src/instrumentation.ts — register() + captureRequestError export
- next.config.ts — wrapped in withSentryConfig (v10 API:
treeshake.removeDebugLogging, sourcemaps.deleteSourcemapsAfterUpload)
- .env.example — NEXT_PUBLIC_GLITCHTIP_DSN + SENTRY_* vars
- .gitignore — .sentryclirc exclusion
14 lines
397 B
TypeScript
14 lines
397 B
TypeScript
import * as Sentry from "@sentry/nextjs";
|
|
|
|
const dsn = process.env.NEXT_PUBLIC_GLITCHTIP_DSN;
|
|
if (dsn) {
|
|
Sentry.init({
|
|
dsn,
|
|
environment: process.env.NEXT_PUBLIC_ENVIRONMENT ?? "development",
|
|
tracesSampleRate: 0.05,
|
|
// GlitchTip does not support Session Replay — disable explicitly
|
|
replaysSessionSampleRate: 0,
|
|
replaysOnErrorSampleRate: 0,
|
|
integrations: [],
|
|
});
|
|
}
|