Skip to content

Commit

Permalink
feat: added sentry env
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 committed Apr 11, 2024
1 parent a7c4a5c commit 43fba88
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const createApp = (): { app: Express, router: express.Router } => {
if (process.env.SENTRY_DSN) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.SENTRY_ENV ?? 'dev',
integrations: [
nodeProfilingIntegration(),
new Sentry.Integrations.Express({
Expand All @@ -33,21 +34,6 @@ export const createApp = (): { app: Express, router: express.Router } => {
app.use(Sentry.Handlers.tracingHandler());
}

if (process.env.SENTRY_DSN) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [
nodeProfilingIntegration(),
new Sentry.Integrations.Express({
app,
}),
],
tracesSampleRate: 1.0,
});

app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
}
app.get('/healthz', async (_req, res) => {
try {
await basePrisma.user.findFirst();
Expand Down

0 comments on commit 43fba88

Please sign in to comment.