-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/scrum 71 monitoring #88
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
base: develop
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @hiwon-lee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 Prometheus와 Grafana를 활용한 포괄적인 애플리케이션 모니터링 솔루션을 도입합니다. 필요한 의존성을 추가하고, Docker Compose 설정을 통해 모니터링 도구를 배포하며, Spring Boot Actuator 엔드포인트를 노출하여 애플리케이션과 인프라의 상세 메트릭 수집 및 시각화를 가능하게 하는 것이 주요 목적입니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
이 PR은 Prometheus와 Grafana를 사용하여 애플리케이션 모니터링을 설정하는 변경 사항을 포함하고 있습니다. 전반적으로 모니터링 기능 추가의 방향은 좋지만, 몇 가지 중요한 보안 및 유지보수 관련 문제를 발견했습니다. 특히, Actuator 엔드포인트를 과도하게 노출하는 보안 설정과 설정 파일에 IP 주소를 하드코딩한 부분은 반드시 수정이 필요합니다. 또한 Docker 컨테이너를 root 사용자로 실행하는 것은 보안상 위험하므로 지양해야 합니다. 자세한 내용은 각 파일에 남긴 코멘트를 참고해주세요.
| - job_name: 'spring-boot-server' | ||
| metrics_path: /actuator/prometheus | ||
| static_configs: | ||
| - targets: ['13.125.38.143:8080', '13.125.38.143:8081'] |
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.
| - job_name: 'ec2-server' | ||
| metrics_path: /metrics | ||
| static_configs: | ||
| - targets: ['13.125.38.143:9100'] No newline at end of 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.
|
|
||
| private final String[] ActuatorPatterns = { | ||
| "/actuator/health" | ||
| "/actuator/**" |
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.
/actuator/** 경로를 permitAll()로 설정하면 애플리케이션의 민감한 내부 정보(예: 설정 속성, 환경 변수, 스레드 덤프 등)가 외부에 노출될 수 있는 심각한 보안 취약점이 발생할 수 있습니다. application.yml에서 beans, httptrace, info 등 많은 엔드포인트를 노출하고 있어 위험이 더욱 큽니다.
Prometheus 연동에 필요한 /actuator/prometheus와 상태 확인을 위한 /actuator/health만 명시적으로 허용하도록 패턴을 수정해야 합니다.
"/actuator/health",
"/actuator/prometheus"| restart: always | ||
| networks: | ||
| - promnet | ||
| user: root |
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.
| - promnet | ||
| ports: | ||
| - 13030:3000 | ||
| user: root |
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.
|
|
||
|
|
||
| prometheus: | ||
| image: prom/prometheus:latest |
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.
#️⃣ 연관된 이슈
#️⃣ 작업 내용
#️⃣ 테스트 결과
#️⃣ 변경 사항 체크리스트
#️⃣ 스크린샷 (선택)
#️⃣ 리뷰 요구사항 (선택)
📎 참고 자료 (선택)