diff --git a/build.gradle b/build.gradle index c3e223c..fd6e236 100644 --- a/build.gradle +++ b/build.gradle @@ -81,6 +81,7 @@ dependencies { // Actuator implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation('io.micrometer:micrometer-registry-prometheus') } tasks.named('test') { diff --git a/src/main/java/com/kuit/findyou/global/config/SecurityConfig.java b/src/main/java/com/kuit/findyou/global/config/SecurityConfig.java index b9e3597..56946e9 100644 --- a/src/main/java/com/kuit/findyou/global/config/SecurityConfig.java +++ b/src/main/java/com/kuit/findyou/global/config/SecurityConfig.java @@ -35,7 +35,7 @@ public class SecurityConfig { private static final String[] PERMIT_URL = { LOGIN_ENDPOINT.getValue(), "api/v1/auth/signup", "/swagger-ui/**", "/api-docs", "/swagger-ui-custom.html", - "/v3/api-docs/**", "/api-docs/**", "/swagger-ui.html", "/swagger-ui/index.html", "/actuator/health" + "/v3/api-docs/**", "/api-docs/**", "/swagger-ui.html", "/swagger-ui/index.html", "/actuator/health", "/actuator/prometheus" }; @Bean diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 97fc1ab..fbe250f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -16,7 +16,7 @@ management: endpoints: web: exposure: - include: "health, info" + include: health, info, prometheus --- # 로컬에서 사용하는 DB spring: diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 3612e85..600d7df 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -34,7 +34,7 @@ DENY - ${LOG_PATH}/info.%d{yyyy-MM-dd}.%i.log + ${LOG_PATH}/info/info.%d{yyyy-MM-dd}.%i.log 10MB 3 @@ -52,7 +52,7 @@ DENY - ${LOG_PATH}/warn.%d{yyyy-MM-dd}.%i.log + ${LOG_PATH}/warn/warn.%d{yyyy-MM-dd}.%i.log 10MB 3 @@ -70,7 +70,7 @@ DENY - ${LOG_PATH}/error.%d{yyyy-MM-dd}.%i.log + ${LOG_PATH}/error/error.%d{yyyy-MM-dd}.%i.log 10MB 3