Local Build and Deploy / deploy (push) Successful in 1m9s
Sentry is opt-in via DSN env vars; logger uses structured pino JSON in prod; badge uploads are normalized to GIF with sharp. Co-authored-by: Cursor <[email protected]>
23 lines
539 B
TypeScript
23 lines
539 B
TypeScript
import * as Sentry from "@sentry/nextjs";
|
|
|
|
const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN;
|
|
|
|
if (dsn) {
|
|
Sentry.init({
|
|
dsn,
|
|
environment: process.env.NODE_ENV,
|
|
tracesSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0,
|
|
replaysSessionSampleRate: 0,
|
|
replaysOnErrorSampleRate: 1.0,
|
|
enabled: process.env.NODE_ENV === "production",
|
|
integrations: [
|
|
Sentry.replayIntegration({
|
|
maskAllText: true,
|
|
blockAllMedia: true,
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
|
|
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
|