-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsentry.server.config.ts
More file actions
44 lines (35 loc) · 899 Bytes
/
sentry.server.config.ts
File metadata and controls
44 lines (35 loc) · 899 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
37
38
39
40
41
42
43
44
// This file configures the initialization of Sentry on the server
import * as Sentry from '@sentry/nextjs';
Sentry.init({
dsn: process.env.SENTRY_DSN,
// Performance monitoring
tracesSampleRate: 1.0,
// Capture all errors
debug: false,
// Environment-specific configuration
environment: process.env.NODE_ENV,
// CodeGen integration - set via initialScope
initialScope: {
tags: {
component: 'claude-code-ui',
platform: 'nextjs-server',
codegen: 'enabled',
},
},
integrations: [
// Add server-specific integrations here if needed
],
// Custom error filtering
beforeSend(event) {
// Add additional context for CodeGen
if (event.tags) {
event.tags.runtime = 'nodejs';
event.tags.framework = 'nextjs';
}
return event;
},
// Add request context
beforeSendTransaction(event) {
return event;
},
});