diff --git a/web/.gitignore b/web/.gitignore index 0af5bf6..d38247a 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -35,3 +35,7 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts .idea +.env.sentry-build.plugin + +# Sentry Config File +.env.sentry-build-plugin diff --git a/web/app/global-error.tsx b/web/app/global-error.tsx new file mode 100644 index 0000000..9bda5fe --- /dev/null +++ b/web/app/global-error.tsx @@ -0,0 +1,23 @@ +"use client"; + +import * as Sentry from "@sentry/nextjs"; +import NextError from "next/error"; +import { useEffect } from "react"; + +export default function GlobalError({ error }: { error: Error & { digest?: string } }) { + useEffect(() => { + Sentry.captureException(error); + }, [error]); + + return ( + + + {/* `NextError` is the default Next.js error page component. Its type + definition requires a `statusCode` prop. However, since the App Router + does not expose status codes for errors, we simply pass 0 to render a + generic error message. */} + + + + ); +} \ No newline at end of file diff --git a/web/app/privacy/page.tsx b/web/app/privacy/page.tsx index caa5624..0c84e42 100644 --- a/web/app/privacy/page.tsx +++ b/web/app/privacy/page.tsx @@ -373,8 +373,73 @@ const PrivacyPage = () => { Welche Cookies und Dienste auf dieser Website eingesetzt werden, können Sie dieser Datenschutzerklärung entnehmen.

-

- Quelle: https://www.e-recht24.de +

Verwendung des Webanalyse-Dienstes Plausible Analytics

+

+ Diese Website nutzt zur Besucherstatistik den datenschutzfreundlichen + Webanalyse-Dienst Plausible Analytics. Anbieter ist Plausible Insights + OÜ, Tartu, Estland (EU). Die Webanalyse basiert rein auf anonymisierten + Daten und nutzt keine Cookies. Ein Rückschluss auf Personen ist nicht + möglich. Beim Besuch unserer Website werden folgende Daten bei Plausible + Analytics gespeichert: URL der aufgerufenen Seite oder Datei, URL der + Seite über die Sie auf unsere Seite gekommen sind (Referrer), URL eines + ausgehenden Links, den Sie auf unserer Seite geklickt haben (Outbound + Link), Browsertyp und -version, Betriebssystem Ihres Gerätes und der + Gerätetyp. Informationen zu Ihrem Standort (Land, Region und Stadt) + werden näherungsweise aus Ihrer IP-Adresse ermittelt; die IP-Adresse + selbst wird nicht gespeichert. Die Einbindung von Plausible Analytics + erfolgt aufgrund unseres Interesses an einer statistischen Betrachtung + der Nutzung unserer Website. Dies stellt ein berechtigtes Interesse im + Sinne von Art. 6 Abs. 1 lit. f DSGVO dar. Weitere Informationen zum + Umgang mit Nutzerdaten finden Sie in der Datenschutzerklärung von + Plausible Analytics:{" "} + plausible.io/privacy und + plausible.io/data-policy. +

+

Fehlerreporting und Monitoring: Sentry

+

+ Um den fehlerfreien Betrieb unserer Dienste sicherzustellen und beim + Auftreten von Fehlern schnellstmöglich reagieren zu können, nutzen wir + den Dienst Sentry. Über Sentry werden server- oder clientseitig + auftretende Fehler automatisch erfasst und an uns gemeldet. Dabei achten + wir darauf, dass personenbezogene Daten weitmöglich entfernt werden. In + speziellen Fällen ist nicht auszuschließen, dass eine Fehlermeldung auch + personenbezogene Daten enthält, z.B. wenn der Fehler in Zusammenhang mit + einer Nutzereingabe auftritt. Sentry ist ein Dienst der
+ Functional Software Inc. +
132 Hawthorne Street
San Francisco
California 94107{" "} +
USA +
(im Folgenden „Sentry”). Die Vereinbarung zur + Auftragsdatenverarbeitung (Data Processing Agreement) von Sentry können + Sie unter folgendem Link nachlesen:{" "} + + https://sentry.io/legal/dpa/ + {" "} + Die Datenschutzerklärung von Sentry können Sie unter folgendem Link + nachlesen:{" "} + https://sentry.io/privacy/ Ein + Auftragsdatenverarbeitungsvertrag mit Sentry wurde abgeschlossen. Darin + wird Sentry auch bei einer möglichen Datenverarbeitung in Drittländern + (z.B. durch Wartungsarbeiten) mit Hilfe der EU-Standardvertragsklauseln + zur Einhaltung des EU-Datenschutzniveaus verpflichtet. Die + Datenverarbeitung erfolgt auf Grundlage unseren berechtigten Interessen + (§ 6 Nr. 8 DSG-EKD) an der technisch fehlerfreien und optimierten + Bereitstellung unserer Dienste. Die von Sentry erfassten Fehler werden + in der Google Cloud Platform der Firma
+ Google LLC
1600 Amphitheatre Parkway
Mountain View, CA + 94043
USA
(im Folgenden „Google Cloud Platform”) + gespeichert. Die Rechenzentren der Google Cloud Platform sind unter + anderem nach SOC 2 Type II, ISO/IEC 27001 und PCI-DSS zertifiziert. Die + Hinweise zur Datenverarbeitung und Sicherheit (Data Processing and + Security Terms) der Google Cloud Platform können Sie unter folgendem + Link nachlesen:{" "} + + https://cloud.google.com/terms/data-processing-terms + {" "} + Die Datenschutzerklärung der Google Cloud Platform können Sie unter + folgendem Link nachlesen: + + https://cloud.google.com/terms/cloud-privacy-notice +

); diff --git a/web/bun.lockb b/web/bun.lockb index 51910d9..abf6d8f 100755 Binary files a/web/bun.lockb and b/web/bun.lockb differ diff --git a/web/next.config.mjs b/web/next.config.mjs index 8c8bab6..4b8acd3 100644 --- a/web/next.config.mjs +++ b/web/next.config.mjs @@ -1,6 +1,37 @@ +import {withSentryConfig} from "@sentry/nextjs"; /** @type {import('next').NextConfig} */ const nextConfig = { output: "standalone", }; -export default nextConfig; +export default withSentryConfig(nextConfig, { +// For all available options, see: +// https://www.npmjs.com/package/@sentry/webpack-plugin#options + +org: "private-dec", +project: "codecanvas", + +// Only print logs for uploading source maps in CI +silent: !process.env.CI, + +// For all available options, see: +// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ + +// Upload a larger set of source maps for prettier stack traces (increases build time) +widenClientFileUpload: true, + +// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. +// This can increase your server load as well as your hosting bill. +// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- +// side errors will fail. +// tunnelRoute: "/monitoring", + +// Automatically tree-shake Sentry logger statements to reduce bundle size +disableLogger: true, + +// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) +// See the following for more information: +// https://docs.sentry.io/product/crons/ +// https://vercel.com/docs/cron-jobs +automaticVercelMonitors: true, +}); \ No newline at end of file diff --git a/web/package.json b/web/package.json index ae9b6d7..a5943c7 100644 --- a/web/package.json +++ b/web/package.json @@ -23,6 +23,7 @@ "@mantine/spotlight": "^7", "@mantine/tiptap": "^7", "@mantinex/dev-icons": "^1.0.2", + "@sentry/nextjs": "^9", "@tabler/icons-react": "^3.16.0", "@tiptap/extension-code-block-lowlight": "^2.8.0", "@tiptap/extension-color": "^2.8.0", diff --git a/web/sentry.client.config.ts b/web/sentry.client.config.ts new file mode 100644 index 0000000..2d7bc95 --- /dev/null +++ b/web/sentry.client.config.ts @@ -0,0 +1,28 @@ +// This file configures the initialization of Sentry on the client. +// The config you add here will be used whenever a users loads a page in their browser. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from "@sentry/nextjs"; + +Sentry.init({ + dsn: "https://68b3b0610345b912b555e01f90dc4834@o4509031950778368.ingest.de.sentry.io/4509031955431504", + + // Add optional integrations for additional features + integrations: [ + Sentry.replayIntegration(), + ], + + // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. + tracesSampleRate: 1, + + // Define how likely Replay events are sampled. + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + + // Define how likely Replay events are sampled when an error occurs. + replaysOnErrorSampleRate: 1.0, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. + debug: false, +});