-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsentry.server.config.ts
More file actions
33 lines (26 loc) · 928 Bytes
/
sentry.server.config.ts
File metadata and controls
33 lines (26 loc) · 928 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
/**
* Sentry Server Configuration
*
* Error tracking and performance monitoring for server-side
* Following DEVELOPMENT_RULES.md: Centralized configuration
*/
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: process.env.NODE_ENV === "development",
// Set environment
environment: process.env.NODE_ENV || "development",
// Release tracking (can be set via environment variable)
release: process.env.NEXT_PUBLIC_SENTRY_RELEASE,
// Filter out common errors that aren't actionable
ignoreErrors: [
// Common API errors
"ECONNREFUSED",
"ETIMEDOUT",
// Database connection errors
"ConnectionError",
],
});