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: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ dependencies {
// Mac에서 빌드시 필요한 의존성
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.121.Final:osx-aarch_64'

// actuator
// actuator + 프로메테우스
implementation 'org.springframework.boot:spring-boot-starter-actuator'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'

// elasticsearch + elasticsearch 쿼리빌더 dsl
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
Expand Down
9 changes: 6 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ spring.message.activemq.password=${ACTIVEMQ_PASSWORD}
spring.message.activemq.port=${ACTIVEMQ_PORT}

# ========================
# Actuator
# Actuator && Prometheus
# ========================
management.endpoints.web.exposure.include=health,info
management.endpoints.web.exposure.include=health,metrics,prometheus,info
management.endpoint.health.show-details=always
management.endpoint.health.access=unrestricted
management.endpoint.metrics.access=unrestricted
management.endpoint.prometheus.access=unrestricted
management.prometheus.metrics.export.enabled=true
Comment on lines +49 to +56
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

❓ Verification inconclusive

프로퍼티 키 오타 및 미지원 access 속성 사용

  1. Prometheus 내보내기 활성화 키가 잘못되었습니다.
    올바른 키는 management.metrics.export.prometheus.enabled 입니다.

  2. management.endpoint.*.access 속성은 Spring Boot 3.x 기본 프로퍼티가 아니므로 무시되거나 경고만 출력됩니다. 엔드포인트 공개 범위는 이미 management.endpoints.web.exposure.include로 제어되고, 보안은 Spring Security 설정으로 처리해야 합니다.

-management.endpoint.health.access=unrestricted
-management.endpoint.metrics.access=unrestricted
-management.endpoint.prometheus.access=unrestricted
-management.prometheus.metrics.export.enabled=true
+management.metrics.export.prometheus.enabled=true

추가로, 모든 메트릭 엔드포인트를 무제한 공개하면 PII‧시스템 정보 노출 위험이 있으니 방화벽·IP 화이트리스트 또는 Spring Security Role 기반 접근 제어를 검토해 주세요.


프로퍼티 키 오타 및 미지원 access 속성 사용

  1. Prometheus 내보내기 활성화 키가 잘못되었습니다.
    올바른 키는 management.metrics.export.prometheus.enabled 입니다.

  2. management.endpoint.*.access 속성은 Spring Boot 3.x 기본 프로퍼티가 아니므로 무시되거나 경고만 출력됩니다. 엔드포인트 공개 범위는 이미 management.endpoints.web.exposure.include로 제어되고, 보안은 Spring Security 설정으로 처리해야 합니다.

-management.endpoint.health.access=unrestricted
-management.endpoint.metrics.access=unrestricted
-management.endpoint.prometheus.access=unrestricted
-management.prometheus.metrics.export.enabled=true
+management.metrics.export.prometheus.enabled=true

추가로, 모든 메트릭 엔드포인트를 무제한 공개하면 PII‧시스템 정보 노출 위험이 있으니 방화벽·IP 화이트리스트 또는 Spring Security Role 기반 접근 제어를 검토해 주세요.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Actuator && Prometheus
# ========================
management.endpoints.web.exposure.include=health,info
management.endpoints.web.exposure.include=health,metrics,prometheus,info
management.endpoint.health.show-details=always
management.endpoint.health.access=unrestricted
management.endpoint.metrics.access=unrestricted
management.endpoint.prometheus.access=unrestricted
management.prometheus.metrics.export.enabled=true
# Actuator && Prometheus
# ========================
management.endpoints.web.exposure.include=health,metrics,prometheus,info
management.endpoint.health.show-details=always
management.metrics.export.prometheus.enabled=true
🤖 Prompt for AI Agents
In src/main/resources/application.properties around lines 49 to 56, correct the
typo in the Prometheus export enable key by changing it from
management.prometheus.metrics.export.enabled to
management.metrics.export.prometheus.enabled. Remove all
management.endpoint.*.access properties since they are not supported in Spring
Boot 3.x and do not affect endpoint access. Instead, rely on
management.endpoints.web.exposure.include to control endpoint exposure and
configure security access via Spring Security or network-level controls.


# ========================
# Judge0Client
Expand Down Expand Up @@ -122,7 +126,6 @@ cloud.aws.s3.bucket=ezcode-s3
cloud.aws.region.static=ap-northeast-2
cloud.aws.stack.auto=false


#logging.level.org.springframework.security=DEBUG
#logging.level.org.springframework.security.oauth2=DEBUG
#logging.level.org.springframework.security.oauth2.client=TRACE
Expand Down