Skip to content

Commit

Permalink
feature: Sentry를 사용한 에러 모니터링 도입 (#275)
Browse files Browse the repository at this point in the history
* chore: sentry 의존성 추가 및 설정 정보 작성

* feat: logback.xml에 sentry appender 추가
  • Loading branch information
leeeeeyeon authored Oct 24, 2023
1 parent 18dcbd8 commit a9f0583
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ dependencies {

// flyway
implementation 'org.flywaydb:flyway-mysql'

// sentry
implementation 'io.sentry:sentry-logback:6.19.0'
}

tasks.named('test') {
Expand Down
2 changes: 1 addition & 1 deletion security
20 changes: 20 additions & 0 deletions src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,19 @@
</filter>
</appender>

<appender name="Sentry" class="io.sentry.logback.SentryAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<encoder>
<pattern>%d{HH:mm:ss} [%thread] [%-5level] %logger{36} - %msg%n```%ex{full}```</pattern>
</encoder>
</appender>

<root level="INFO">
<appender-ref ref="ASYNC_DISCORD"/>
<appender-ref ref="Console"/>
<appender-ref ref="Sentry"/>
</root>
</springProfile>
<springProfile name="prod">
Expand Down Expand Up @@ -66,9 +76,19 @@
</filter>
</appender>

<appender name="Sentry" class="io.sentry.logback.SentryAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<encoder>
<pattern>%d{HH:mm:ss} [%thread] [%-5level] %logger{36} - %msg%n```%ex{full}```</pattern>
</encoder>
</appender>

<root level="INFO">
<appender-ref ref="ASYNC_DISCORD"/>
<appender-ref ref="Console"/>
<appender-ref ref="Sentry"/>
</root>
</springProfile>
</configuration>

0 comments on commit a9f0583

Please sign in to comment.