diff --git a/.gitignore b/.gitignore index 8a581028..b4af6cd3 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,6 @@ db-volume # Sentry Config File .sentryclirc + +# Sentry Config File +.sentryclirc diff --git a/package.json b/package.json index c640d0ef..67fc2f93 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "private": true, "license": "UNLICENSED", "scripts": { - "build": "npm run redoc:build && nest build && npm run sentry:sourcemaps", + "build": "npm run redoc:build && nest build && npm run sentry:sourcemaps && npm run sentry:sourcemaps", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"db/**/*.ts\"", "start": "nest start", "dev": "nest start --watch", diff --git a/src/main.ts b/src/main.ts index 9d81a6d4..62287801 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,10 @@ import { AppModule } from "./app.module"; import * as Sentry from "@sentry/node"; Sentry.init({ - dsn: "https://855318e7fdc6d1c605e33853bd790a0a@o1081909.ingest.us.sentry.io/4506876683485184", + dsn: process.env.SENTRY_DSN, + debug: true, + maxBreadcrumbs: 50, + environment: process.env.SENTRY_ENVIRONMENT, // We recommend adjusting this value in production, or using tracesSampler // for finer control diff --git a/tsconfig.json b/tsconfig.json index d70b8acb..15519d56 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,6 +19,9 @@ "noFallthroughCasesInSwitch": true, "inlineSources": true, + // Set `sourceRoot` to "/" to strip the build path prefix + // from generated source code references. + // This improves issue grouping in Sentry. // Set `sourceRoot` to "/" to strip the build path prefix // from generated source code references. // This improves issue grouping in Sentry.