diff --git a/build.gradle b/build.gradle index a96886c68..222cca60e 100644 --- a/build.gradle +++ b/build.gradle @@ -99,6 +99,7 @@ dependencies { // Sentry implementation 'io.sentry:sentry-logback:7.14.0' + implementation 'io.sentry:sentry-openfeign:7.14.0' } tasks.named('test') { diff --git a/src/main/java/com/gdschongik/gdsc/infra/feign/global/config/FeignConfig.java b/src/main/java/com/gdschongik/gdsc/infra/feign/global/config/FeignConfig.java index be4d6dde6..97393198b 100644 --- a/src/main/java/com/gdschongik/gdsc/infra/feign/global/config/FeignConfig.java +++ b/src/main/java/com/gdschongik/gdsc/infra/feign/global/config/FeignConfig.java @@ -3,9 +3,11 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import feign.Capability; import feign.Logger; import feign.codec.Decoder; import feign.jackson.JacksonDecoder; +import io.sentry.openfeign.SentryCapability; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.FeignFormatterRegistrar; import org.springframework.context.annotation.Bean; @@ -41,4 +43,9 @@ public FeignFormatterRegistrar dateTimeFormatterRegistrar() { registrar.registerFormatters(registry); }; } + + @Bean + public Capability sentryCapability() { + return new SentryCapability(); + } } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index ccd90cc64..29e676cfa 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -8,5 +8,5 @@ spring: logging: level: - org.springframework.orm.jpa: DEBUG - org.springframework.transaction: DEBUG + com.gdschongik.gdsc.domain.*.api.*: info + com.gdschongik.gdsc.infra.feign: debug diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 32b629bc1..400f4fffa 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -10,11 +10,14 @@ spring: properties: hibernate: format_sql: ${FORMAT_SQL:true} + highlight_sql: ${HIGHLIGHT_SQL:true} defer-datasource-initialization: true open-in-view: false logging: level: - org.springframework.orm.jpa: DEBUG - org.springframework.transaction: DEBUG + com.gdschongik.gdsc.domain.*.api.*: debug + com.gdschongik.gdsc.infra.feign: debug + org.hibernate.orm.jdbc.bind: trace + org.hibernate.SQL: debug org.kohsuke.github: debug diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 9e54f89c9..119c99b78 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -8,5 +8,4 @@ spring: logging: level: - org.springframework.orm.jpa: DEBUG - org.springframework.transaction: DEBUG + com.gdschongik.gdsc.domain.*.api.*: info diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 445b022e4..bdbc8e8de 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -17,5 +17,4 @@ spring: logging: level: - com.gdschongik.gdsc.domain.*.api.*: debug - com.gdschongik.gdsc.infra.feign: debug + com.gdschongik.gdsc.domain.*.api.*: info