Skip to content

Commit

Permalink
refactor: update sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
Shramkoweb committed Feb 6, 2024
1 parent a1b9c03 commit 95ddc35
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,3 @@ yarn-error.log*

# Sentry
.sentryclirc

# Sentry
.sentryclirc
4 changes: 3 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ const nextConfig = {
disableClientWebpackPlugin: true,
hideSourceMaps: true,
autoInstrumentServerFunctions: false,
autoInstrumentMiddleware: false
autoInstrumentMiddleware: false,
disableLogger: true,
automaticVercelMonitors: true,
}
};

Expand Down
13 changes: 11 additions & 2 deletions sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import * as Sentry from '@sentry/nextjs';
import * as Sentry from "@sentry/nextjs";

const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
const SENTRY_ENV = process.env.SENTRY_ENVIRONMENT || process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT;

Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: 1.0,
environment: SENTRY_ENV,
tracesSampleRate: 1,
debug: false,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
integrations: [
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],
});
9 changes: 9 additions & 0 deletions sentry.edge.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as Sentry from "@sentry/nextjs";

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

Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: 1,
debug: false,
});
4 changes: 0 additions & 4 deletions sentry.properties

This file was deleted.

9 changes: 9 additions & 0 deletions sentry.server.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as Sentry from "@sentry/nextjs";

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

Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: 1,
debug: false,
});

0 comments on commit 95ddc35

Please sign in to comment.