Skip to content

Commit

Permalink
fix sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
vladanpaunovic committed Sep 2, 2024
1 parent b0b43cb commit 93f3507
Show file tree
Hide file tree
Showing 3 changed files with 508 additions and 464 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@heroicons/react": "^1.0.3",
"@next-auth/upstash-redis-adapter": "^3.0.1",
"@prisma/client": "^4.5.0",
"@sentry/nextjs": "8.3.0",
"@sentry/nextjs": "8.27.0",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"@tremor/react": "^1.8.0",
Expand Down
11 changes: 5 additions & 6 deletions scripts/initSentry.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
const Sentry = require("@sentry/node");
const { PrismaClient } = require("@prisma/client");
const Tracing = require("@sentry/tracing");

const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;

const client = new PrismaClient();

const initSentry = () => {
Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: 0.5,
integrations: [new Tracing.Integrations.Prisma({ client })],
integrations: [
Sentry.httpIntegration,
Sentry.mongoIntegration,
Sentry.prismaIntegration,
],
});

return Sentry;
Expand Down
Loading

0 comments on commit 93f3507

Please sign in to comment.