Skip to content

Commit b922d05

Browse files
committed
chore[infra]: sentry 테스트
1 parent e340287 commit b922d05

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

backend/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'java'
3-
id 'org.springframework.boot' version '3.3.3'
4-
id 'io.spring.dependency-management' version '1.1.5'
3+
id 'org.springframework.boot' version '3.3.5'
4+
id 'io.spring.dependency-management' version '1.1.7'
55

66
id("org.jetbrains.kotlin.jvm") version "1.9.25"
77
id("com.google.devtools.ksp") version "1.9.25-1.0.20"

backend/src/main/java/com/ai/lawyer/global/security/SecurityConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public class SecurityConfig {
6060
"/api/home/**", // 홈 (공개)
6161
"/h2-console/**", // H2 콘솔 (개발용)
6262
"/actuator/health", "/actuator/health/**", "/actuator/info", // Spring Actuator
63-
"/api/actuator/health", "/api/actuator/health/**", "/api/actuator/info"
63+
"/api/actuator/health", "/api/actuator/health/**", "/api/actuator/info",
64+
"/sentry-test" // Sentry 테스트용
6465
};
6566

6667
// CORS 허용 메서드
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import io.sentry.Sentry;
2+
import org.springframework.web.bind.annotation.GetMapping;
3+
import org.springframework.web.bind.annotation.RestController;
4+
5+
@RestController
6+
public class SentryTestController {
7+
8+
@GetMapping("/sentry-test")
9+
public String triggerError() {
10+
try {
11+
throw new RuntimeException("Sentry test error - Balaw 프로젝트");
12+
} catch (Exception e) {
13+
Sentry.captureException(e);
14+
}
15+
return "Error sent to Sentry!";
16+
}
17+
}

0 commit comments

Comments
 (0)