Skip to content

Commit

Permalink
added source maps and breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
horatiorosa committed Apr 3, 2024
1 parent 6f850b8 commit 6f9e931
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ db-volume

# Sentry Config File
.sentryclirc

# Sentry Config File
.sentryclirc
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { AppModule } from "./app.module";
import * as Sentry from "@sentry/node";

Sentry.init({
dsn: "https://[email protected]/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
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6f9e931

Please sign in to comment.