Planner (client + custom server) and Journal (client + entry.server): - Client: @sentry/react with browser tracing + replay on error - Server: @sentry/node for unhandled exceptions - ErrorBoundary captures React errors via Sentry.captureException - Disabled in dev, 10% trace sample rate in production Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
646 B
TypeScript
22 lines
646 B
TypeScript
import * as Sentry from "@sentry/react";
|
|
import { startTransition, StrictMode } from "react";
|
|
import { hydrateRoot } from "react-dom/client";
|
|
import { HydratedRouter } from "react-router/dom";
|
|
|
|
Sentry.init({
|
|
dsn: "https://a32ffcc575d34be072e91b20f247eeee@o4509530546634752.ingest.de.sentry.io/4509530555547728",
|
|
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
|
|
tracesSampleRate: 0.1,
|
|
replaysSessionSampleRate: 0,
|
|
replaysOnErrorSampleRate: 1.0,
|
|
enabled: import.meta.env.PROD,
|
|
});
|
|
|
|
startTransition(() => {
|
|
hydrateRoot(
|
|
document,
|
|
<StrictMode>
|
|
<HydratedRouter />
|
|
</StrictMode>,
|
|
);
|
|
});
|