mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 04:51:14 +10:00
feat: sentry (#802)
This commit is contained in:
16
apps/server/src/common/sentry/instrument.ts
Normal file
16
apps/server/src/common/sentry/instrument.ts
Normal 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,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user