-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsentry.client.config.ts
More file actions
36 lines (28 loc) · 985 Bytes
/
Copy pathsentry.client.config.ts
File metadata and controls
36 lines (28 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// This file configures the initialization of Sentry on the client side.
// The DSN is injected at build time by the Sentry build plugin.
import * as Sentry from "@sentry/nextjs"
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN || process.env.SENTRY_DSN,
// Performance monitoring — sample rate for traces
tracesSampleRate: 0.1,
// Session replay (requires integration below)
integrations: [
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],
replaysSessionSampleRate: 0.05,
replaysOnErrorSampleRate: 1.0,
// Send only errors with stack traces in production
enabled: process.env.NODE_ENV === "production",
// Denylist URLs we don't care about
denyUrls: [
/chrome-extension:\/\//i,
/localhost:\d+\/_next\//i,
],
// Release tracking
release: `flow-sentinel@${process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA || "dev"}`,
// Environment
environment: process.env.NODE_ENV || "development",
})