Add Sentry error tracking to both apps
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>
This commit is contained in:
parent
1819a17036
commit
ef07915f38
9 changed files with 982 additions and 278 deletions
22
apps/planner/app/entry.client.tsx
Normal file
22
apps/planner/app/entry.client.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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://5215134cd78d5e6c199e29300b8425af@o4509530546634752.ingest.de.sentry.io/4511102546608208",
|
||||
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
|
||||
tracesSampleRate: 0.1,
|
||||
replaysSessionSampleRate: 0,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
enabled: import.meta.env.PROD,
|
||||
});
|
||||
|
||||
startTransition(() => {
|
||||
hydrateRoot(
|
||||
document,
|
||||
<StrictMode>
|
||||
<HydratedRouter />
|
||||
</StrictMode>,
|
||||
);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue