chore: improve instrumentSentry.ts import before another import

Signed-off-by: Roberto Arruda <roberto0arruda@hotmail.com>
This commit is contained in:
Roberto Arruda
2024-12-10 12:13:42 -04:00
parent 682eaa995f
commit cdab5e2ae8
2 changed files with 24 additions and 13 deletions

View File

@@ -0,0 +1,12 @@
import * as Sentry from "@sentry/node";
const dsn = process.env.SENTRY_DSN;
if (dsn) {
Sentry.init({
dsn: dsn,
environment: process.env.NODE_ENV || 'development',
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
});
}