1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-16 19:45:33 -04:00

consolidate environment variable parsing

This commit is contained in:
2022-09-12 15:42:56 -04:00
parent 0373f806f6
commit c64d6cfb52
7 changed files with 434 additions and 412 deletions

View File

@@ -1,11 +1,12 @@
import * as Sentry from "@sentry/node";
import "@sentry/tracing";
import { BUILD_ENV } from "../config/constants";
const IsomorphicSentry = () => {
// https://docs.sentry.io/platforms/node/configuration/options/
Sentry.init({
dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN || "",
environment: process.env.NODE_ENV || process.env.VERCEL_ENV || process.env.NEXT_PUBLIC_VERCEL_ENV || "",
environment: BUILD_ENV,
tracesSampleRate: 1.0,
});