From cb35455722430c30969fbd94997a2a85377183f7 Mon Sep 17 00:00:00 2001 From: m5r Date: Sat, 29 Apr 2023 07:49:56 +0200 Subject: [PATCH] remove sentry --- app/config/config.server.ts | 3 - app/entry.client.tsx | 10 -- app/root.tsx | 45 +-------- app/routes/__app.tsx | 14 +-- package-lock.json | 178 ------------------------------------ package.json | 3 - server/index.ts | 16 +--- server/sentry-remix.ts | 109 ---------------------- 8 files changed, 4 insertions(+), 374 deletions(-) delete mode 100644 server/sentry-remix.ts diff --git a/app/config/config.server.ts b/app/config/config.server.ts index 5c6fb62..025fb72 100644 --- a/app/config/config.server.ts +++ b/app/config/config.server.ts @@ -88,9 +88,6 @@ export default { url: process.env.REDIS_URL, password: process.env.REDIS_PASSWORD, }, - sentry: { - dsn: process.env.SENTRY_DSN, - }, webPush: { privateKey: process.env.WEB_PUSH_VAPID_PRIVATE_KEY, publicKey: process.env.WEB_PUSH_VAPID_PUBLIC_KEY, diff --git a/app/entry.client.tsx b/app/entry.client.tsx index 1c3c82a..13fa3dc 100644 --- a/app/entry.client.tsx +++ b/app/entry.client.tsx @@ -1,15 +1,5 @@ import { hydrate } from "react-dom"; import { RemixBrowser } from "@remix-run/react"; -import * as Sentry from "@sentry/browser"; -import { Integrations } from "@sentry/tracing"; - -if (window.shellphoneConfig.sentry.dsn) { - Sentry.init({ - dsn: window.shellphoneConfig.sentry.dsn, - tracesSampleRate: 1.0, - integrations: [new Integrations.BrowserTracing()], - }); -} hydrate(, document); diff --git a/app/root.tsx b/app/root.tsx index 96b3112..c10cc97 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,58 +1,17 @@ import type { FunctionComponent, PropsWithChildren } from "react"; -import { type LinksFunction, type LoaderFunction, json } from "@remix-run/node"; -import { - Link, - Links, - LiveReload, - Meta, - Outlet, - Scripts, - ScrollRestoration, - useCatch, - useLoaderData, -} from "@remix-run/react"; +import type { LinksFunction } from "@remix-run/node"; +import { Link, Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration, useCatch } from "@remix-run/react"; -import config from "~/config/config.server"; import Logo from "~/features/core/components/logo"; import styles from "./styles/tailwind.css"; export const links: LinksFunction = () => [{ rel: "stylesheet", href: styles }]; -declare global { - interface Window { - shellphoneConfig: LoaderData["shellphoneConfig"]; - } -} - -type LoaderData = { - shellphoneConfig: { - sentry: { - dsn?: string; - }; - }; -}; -export const loader: LoaderFunction = () => { - return json({ - shellphoneConfig: { - sentry: { - dsn: config.sentry.dsn, - }, - }, - }); -}; - export default function App() { - const { shellphoneConfig } = useLoaderData(); return ( -