Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ dependencies {
// RabbitMQ
implementation 'com.rabbitmq:amqp-client'
testImplementation 'org.springframework.amqp:spring-rabbit-test'

// Prometheus
implementation 'io.micrometer:micrometer-registry-prometheus'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class SecurityConfig {
"/api/test",
"/api/v1/tags/**",
"/actuator/health",
"/actuator/prometheus",
"/api/v1/auth/signup",
"/api/v1/auth/refresh"
};
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ management:
endpoints:
web:
exposure:
include: health,info,metrics,env,beans
include: health,info,metrics,env,beans,prometheus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

prometheus 엔드포인트를 활성화했지만, SecurityConfig.javaPERMIT_ALL_URL_ARRAY/actuator/prometheus 경로가 추가되지 않았습니다. 이로 인해 보안 필터에 의해 접근이 차단되어 Prometheus 서버가 메트릭을 수집할 수 없게 됩니다. 개발 환경에서도 정상적인 테스트를 위해 보안 설정 업데이트가 필요합니다.

endpoint:
health:
show-details: always
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ management:
endpoints:
web:
exposure:
include: health,info,metrics
include: health,info,metrics,prometheus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Actuator에서 prometheus 엔드포인트를 노출하도록 설정하셨으나, SecurityConfig.java에서 해당 경로에 대한 접근 권한을 허용하지 않아 실제 운영 환경에서 메트릭 수집이 되지 않을 것으로 보입니다. PERMIT_ALL_URL_ARRAY/actuator/prometheus를 추가해 주시기 바랍니다. 또한, Prometheus를 통한 모니터링을 수행한다면 기존의 JSON 기반 metrics 엔드포인트는 보안 및 리소스 관리 측면에서 제외하는 것을 권장합니다.

        include: health,info,prometheus

endpoint:
health:
show-details: never
Expand Down