feat: sentry (#802)

This commit is contained in:
Philip Okugbe
2025-02-26 15:42:19 +00:00
committed by GitHub
parent 7d034e8a8b
commit 0065f29634
6 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import * as Sentry from '@sentry/nestjs';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import { envPath } from '../helpers';
import * as dotenv from 'dotenv';
dotenv.config({ path: envPath });
if (process.env.SENTRY_DSN) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [
nodeProfilingIntegration(),
],
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
});
}