From 4838df315931bb883f704ec3e1abe2685f296cdf Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Sat, 22 Apr 2023 19:52:26 +0800 Subject: 😀 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/sentry.server.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/sentry.server.config.js (limited to 'docs/sentry.server.config.js') diff --git a/docs/sentry.server.config.js b/docs/sentry.server.config.js new file mode 100644 index 0000000..db0964c --- /dev/null +++ b/docs/sentry.server.config.js @@ -0,0 +1,11 @@ +// This file configures the initialization of Sentry on the server. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from "@sentry/nextjs"; + +Sentry.init({ + environment: process.env.NEXT_PUBLIC_VERCEL_ENV, + dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN, + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 1.0, +}); -- cgit v1.2.3-70-g09d2