Skip to content

Commit 05d9429

Browse files
fix(sentry): align client config and package version
1 parent be5f4f2 commit 05d9429

3 files changed

Lines changed: 5556 additions & 6095 deletions

File tree

frontend/instrumentation-client.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
// This file configures the initialization of Sentry on the client.
2-
// The added config here will be used whenever a users loads a page in their browser.
3-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
1+
import * as Sentry from '@sentry/nextjs';
42

5-
import * as Sentry from "@sentry/nextjs";
3+
const isProduction =
4+
process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' ||
5+
process.env.NODE_ENV === 'production';
66

77
Sentry.init({
8-
dsn: "https://16e778fdd33f20dbbafb972d65657c9c@o4510867573374976.ingest.de.sentry.io/4510867589169232",
8+
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
99

10-
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
11-
tracesSampleRate: 1,
10+
enabled: isProduction,
1211

13-
// Enable sending user PII (Personally Identifiable Information)
14-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
15-
sendDefaultPii: true,
16-
});
12+
tracesSampleRate: 0.1,
13+
14+
environment: process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV,
1715

18-
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
16+
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
17+
18+
sendDefaultPii: false,
19+
});

0 commit comments

Comments
 (0)