blurts-server/sentry.server.config.ts

23 строки
849 B
TypeScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from "@sentry/nextjs";
Sentry.init({
environment: process.env.APP_ENV,
dsn: process.env.SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: ["development", "heroku"].includes(process.env.NODE_ENV)
? 1.0
: 0.1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});