Skip to content

Commit

Permalink
Merge pull request #15 from lrdiv/sentry
Browse files Browse the repository at this point in the history
Sentry config fixes
  • Loading branch information
lrdiv authored Jan 15, 2025
2 parents 232d40d + 1f99147 commit 86759d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions apps/spin-cycle/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import { RedisClientType, createClient } from 'redis';

import { AppModule } from './app.module';

if (process.env.NODE_ENV === 'production') {
import('./sentry');
}
import('./sentry');

const corsOrigin: string[] =
process.env.NODE_ENV === 'production'
Expand Down
3 changes: 2 additions & 1 deletion apps/spin-cycle/src/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import Sentry from '@sentry/node';
import * as Sentry from '@sentry/node';
import { nodeProfilingIntegration } from '@sentry/profiling-node';

Sentry.init({
dsn: 'https://c0355c18b86a8fcba144b81b086635a2@o4508644576002048.ingest.us.sentry.io/4508644576329728',
integrations: [nodeProfilingIntegration()],
tracesSampleRate: 1.0, // Capture 100% of the transactions
profilesSampleRate: 1.0,
enabled: process.env.NODE_ENV === 'production',
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"@nestjs/core": "^10.0.2",
"@nestjs/platform-express": "^10.0.2",
"@sentry/cli": "^2.40.0",
"@sentry/node": "^8.48.0",
"@sentry/profiling-node": "^8.48.0",
"axios": "^1.6.0",
"connect-redis": "^8.0.1",
"express-session": "^1.18.1",
Expand Down Expand Up @@ -65,8 +67,6 @@
"@nx/webpack": "20.3.1",
"@nx/workspace": "20.3.1",
"@schematics/angular": "~19.0.0",
"@sentry/node": "^8.48.0",
"@sentry/profiling-node": "^8.48.0",
"@swc-node/register": "~1.9.1",
"@swc/core": "~1.5.7",
"@swc/helpers": "~0.5.11",
Expand Down Expand Up @@ -100,4 +100,4 @@
"vitest": "^1.3.1",
"webpack-cli": "^5.1.4"
}
}
}

0 comments on commit 86759d4

Please sign in to comment.