-
Notifications
You must be signed in to change notification settings - Fork 3
feat : 프로메테우스 && 그라파나 추가 #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Walkthrough이번 변경에서는 Spring Boot 애플리케이션의 모니터링 기능 강화를 위해 build.gradle에 Prometheus Micrometer registry 의존성을 추가하고, application.properties에서 Actuator 엔드포인트 및 Prometheus 메트릭스 노출 설정을 확장했습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Application
participant Actuator
participant Prometheus
User->>Application: 요청 (예: /actuator/metrics, /actuator/prometheus)
Application->>Actuator: 엔드포인트 처리
Actuator-->>User: 메트릭 데이터 반환
Prometheus->>Application: /actuator/prometheus 엔드포인트 스크랩
Application-->>Prometheus: Prometheus 포맷 메트릭 데이터 제공
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
build.gradle (1)
76-79: Prometheus Registry 의존성은implementation으로 선언하는 편이 안정적입니다
micrometer-registry-prometheus모듈의 클래스를 컴파일 시점에 직접 참조(예: 커스텀 MeterRegistry 주입)할 가능성이 있으므로,runtimeOnly보다는implementation으로 두는 것이 일반적입니다.- runtimeOnly 'io.micrometer:micrometer-registry-prometheus' + implementation 'io.micrometer:micrometer-registry-prometheus'변경 시 컴파일 에러를 예방할 수 있고, BOM 버전 관리도 동일하게 적용됩니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
build.gradle(1 hunks)src/main/resources/application.properties(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
| # 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Verification inconclusive
프로퍼티 키 오타 및 미지원 access 속성 사용
-
Prometheus 내보내기 활성화 키가 잘못되었습니다.
올바른 키는management.metrics.export.prometheus.enabled입니다. -
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 속성 사용
-
Prometheus 내보내기 활성화 키가 잘못되었습니다.
올바른 키는management.metrics.export.prometheus.enabled입니다. -
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.
| # 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.
작업 내용
코드 리뷰 전 확인 체크리스트
type :)Summary by CodeRabbit
새로운 기능
문서