From ebb194c35e140b3dbec5418ef6f482494fd929fc Mon Sep 17 00:00:00 2001 From: its-sky Date: Fri, 19 Apr 2024 17:55:07 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20#269=20-=20Sentry=20=EB=A1=9C=EA=B9=85?= =?UTF-8?q?=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 6 ++++-- moonshot-api/src/main/resources/application.yml | 4 ++++ moonshot-api/src/main/resources/logback-prod.xml | 4 +++- moonshot-api/src/main/resources/sentry-appender.xml | 10 ++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 moonshot-api/src/main/resources/sentry-appender.xml 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