diff --git a/app/entry.server.tsx b/app/entry.server.tsx index 6b15eff..e7a9cc6 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -5,15 +5,12 @@ */ import { PassThrough } from 'node:stream' -import './instrument.server.mjs' import type { AppLoadContext, EntryContext } from '@remix-run/node' import { createReadableStreamFromReadable } from '@remix-run/node' import { RemixServer } from '@remix-run/react' import { isbot } from 'isbot' import { renderToPipeableStream } from 'react-dom/server' -import * as Sentry from '@sentry/remix' const ABORT_DELAY = 5_000 -export const handleError = Sentry.sentryHandleError export default function handleRequest( request: Request, responseStatusCode: number, diff --git a/app/instrument.server.mjs b/app/instrument.server.mjs deleted file mode 100644 index 03317d9..0000000 --- a/app/instrument.server.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import * as Sentry from "@sentry/remix"; - -Sentry.init({ - dsn: process.env.VITE_ENV_SENTRY_DSN, - // Set tracesSampleRate to 1.0 to capture 100% - // of transactions for tracing. - // We recommend adjusting this value in production - tracesSampleRate: 1.0, - - // To use Sentry OpenTelemetry auto-instrumentation - // default: false - autoInstrumentRemix: true, - - // Optionally capture action formData attributes with errors. - // This requires `sendDefaultPii` set to true as well. - captureActionFormDataKeys: { - key_x: true, - key_y: true, - }, - // To capture action formData attributes. - sendDefaultPii: true -}); diff --git a/app/root.tsx b/app/root.tsx index f4ff409..e352e48 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -11,13 +11,10 @@ import { } from '@remix-run/react' import stylesheet from '~/tailwind.css?url' import { PropsWithChildren, useEffect } from 'react' -import posthog from 'posthog-js' -import { captureRemixErrorBoundaryError, withSentry } from '@sentry/remix' export const ErrorBoundary = () => { const error = useRouteError() - captureRemixErrorBoundaryError(error) return