diff --git a/build.gradle b/build.gradle index bcfe5ce5..37766c0f 100644 --- a/build.gradle +++ b/build.gradle @@ -29,8 +29,6 @@ subprojects { } dependencies { - // Spring Security - //Spring Security implementation 'org.springframework.boot:spring-boot-starter-security' @@ -43,6 +41,10 @@ subprojects { // test testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.mockito:mockito-core:5.9.0' + + // Sentry + implementation 'io.sentry:sentry-spring-boot-starter-jakarta:6.28.0' + implementation 'io.sentry:sentry-logback:6.28.0' } tasks.named('test') { diff --git a/moonshot-api/src/main/resources/application.yml b/moonshot-api/src/main/resources/application.yml index bfcdf025..be10bbcc 100644 --- a/moonshot-api/src/main/resources/application.yml +++ b/moonshot-api/src/main/resources/application.yml @@ -84,3 +84,7 @@ springdoc: mybatis: mapper-locations: mappers/*.xml + +sentry: + dsn: ${SENTRY_DSN} + traces-sample-rate: 1.0 diff --git a/moonshot-api/src/main/resources/logback-prod.xml b/moonshot-api/src/main/resources/logback-prod.xml index 9efd20da..8b6b0260 100644 --- a/moonshot-api/src/main/resources/logback-prod.xml +++ b/moonshot-api/src/main/resources/logback-prod.xml @@ -5,9 +5,11 @@ + - + + \ No newline at end of file diff --git a/moonshot-api/src/main/resources/sentry-appender.xml b/moonshot-api/src/main/resources/sentry-appender.xml new file mode 100644 index 00000000..d1233dac --- /dev/null +++ b/moonshot-api/src/main/resources/sentry-appender.xml @@ -0,0 +1,10 @@ + + + + ERROR + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + \ No newline at end of file