Files
EpicNext-Cms/src/instrumentation-client.ts
T
SimoandCursor 6b884ad25a
Local Build and Deploy / deploy (push) Successful in 1m42s
Harden deploy gates, prod AUTH_SECRET, and Sentry error reporting.
Align onlyBuiltDependencies with the workspace, fail fast without AUTH_SECRET in production, and delete catalog_items via VARCHAR-safe SQL so page deletes do not leave orphans.

Co-authored-by: Cursor <[email protected]>
2026-07-18 19:32:15 +02:00

26 lines
704 B
TypeScript

import * as Sentry from "@sentry/nextjs";
import { redactSentryEvent } from "@/lib/sentry-redact";
const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN;
if (dsn) {
Sentry.init({
dsn,
environment: process.env.NODE_ENV,
release: process.env.NEXT_PUBLIC_APP_VERSION || process.env.APP_VERSION,
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,
}),
],
beforeSend: redactSentryEvent,
});
}
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;