Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 32 additions & 28 deletions sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: process.env.SENTRY_DSN || "",
environment: process.env.SENTRY_ENVIRONMENT || "development",
// 프로덕션 환경에서만 Sentry 초기화
if (process.env.NODE_ENV === "production") {
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN || process.env.SENTRY_DSN || "",
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || process.env.SENTRY_ENVIRONMENT || "production",

// Performance Monitoring: 모든 트랜잭션 샘플링 (프로덕션에서는 0.1~0.3 권장)
tracesSampleRate: 1.0,
// Adds request headers and IP for users
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
sendDefaultPii: true,

// Replay 샘플링 설정
replaysSessionSampleRate: 0.1, // 일반 세션의 10%
replaysOnErrorSampleRate: 1.0, // 에러 발생 시 100%
// Performance Monitoring: 프로덕션에서 30% 샘플링
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 0.3,

integrations: [
// Browser Tracing: 페이지 로드 및 네비게이션 성능 측정
Sentry.browserTracingIntegration({
tracePropagationTargets: [
"localhost",
"solid-connection.com",
"solid-connect-web",
"solid-connect",
/^https:\/\/(www\.)?solid[\-]?connection\.com/,
],
// Web Vitals 자동 수집 활성화
enableInp: true, // Interaction to Next Paint (INP) 측정
}),
// Session Replay 샘플링 설정
// Capture Replay for 10% of all sessions, plus 100% of sessions with an error
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1, // 일반 세션의 10%
replaysOnErrorSampleRate: 1.0, // 에러 발생 시 100%

// Session Replay: 사용자 세션 녹화
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],
});
integrations: [
// Browser Tracing: 페이지 로드 및 네비게이션 성능 측정
Sentry.browserTracingIntegration({
tracePropagationTargets: ["solid-connection.com", /^https:\/\/(www\.)?solid[\-]?connection\.com/],
// Web Vitals 자동 수집 활성화
enableInp: true, // Interaction to Next Paint (INP) 측정
}),

// Session Replay: 사용자 세션 녹화 (클라이언트 전용)
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],
});
}
20 changes: 12 additions & 8 deletions sentry.edge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: process.env.SENTRY_DSN || "",
environment: process.env.SENTRY_ENVIRONMENT || "development",
// 프로덕션 환경에서만 Sentry 초기화
if (process.env.NODE_ENV === "production") {
Sentry.init({
dsn: process.env.SENTRY_DSN || "",
environment: process.env.SENTRY_ENVIRONMENT || "production",

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Performance Monitoring: 프로덕션에서 30% 샘플링
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 0.3,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
}
25 changes: 15 additions & 10 deletions sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: process.env.SENTRY_DSN || "",
environment: process.env.SENTRY_ENVIRONMENT || "development",
// 프로덕션 환경에서만 Sentry 초기화
if (process.env.NODE_ENV === "production") {
Sentry.init({
dsn: process.env.SENTRY_DSN || "",
environment: process.env.SENTRY_ENVIRONMENT || "production",

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Adds request headers and IP for users
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
sendDefaultPii: true,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
// Performance Monitoring: 프로덕션에서 30% 샘플링
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 0.3,

// uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.NODE_ENV === 'development',
});
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
}