Merged
Conversation
- Grafana 서비스에 대한 Nginx 설정 파일을 추가하여 Grafana에 접근 가능하게 함. - `/grafana/` 경로에 대한 프록시 설정을 구성하여 Grafana 서비스에 연결. - 세션 유지, HTTP 버전 설정, 리다이렉트 비활성화 등 Grafana 성능 향상을 위한 설정 추가.
- checkmate-backend, postgres, redis 스크랩 설정 추가 - 메트릭 경로 및 타겟 설정 - 글로벌 설정 간트 인터벌 5초로 설정
- prometheus, grafana 서비스를 추가하여 모니터링 환경 구성 - checkmate-net 네트워크를 생성하여 서비스 간 통신 지원 - prometheus와 grafana에 대한 설정 파일 경로 및 포트 매핑 정보 추가
# Conflicts: # backend/src/main/resources/application-prod.yml
There was a problem hiding this comment.
Code Review
모니터링 시스템 구축을 위한 Prometheus, Grafana 연동 및 Spring Boot Actuator 설정 추가가 확인되었습니다. 코드 리뷰 결과, 운영 환경의 보안 및 안정성 강화를 위해 몇 가지 개선점을 제안합니다. 주요 내용으로는 Actuator health 엔드포인트의 상세 정보 노출 수준 조정, Grafana 대시보드 접근 제어 설정, 그리고 Prometheus의 메트릭 수집 주기 최적화에 대한 권고가 포함되어 있습니다.
There was a problem hiding this comment.
Pull request overview
운영 환경에 모니터링 스택(Prometheus/Grafana)을 추가하고, 백엔드(Spring Actuator) 및 외부 지표(Postgres/Redis exporter 등) 수집 구성을 연동하기 위한 PR입니다.
Changes:
- Prometheus 스크레이프 설정 및 Docker Compose에 Prometheus/Grafana 서비스 추가
- Nginx에
/grafana/리버스 프록시 라우팅 추가 - 백엔드
application-prod.yml에 Actuator(Prometheus/metrics/health) 노출 및 관리 포트 분리 설정 추가
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| prometheus/prometheus.yml | 백엔드/외부(Postgres/Redis) 메트릭 스크레이프 타깃 구성 추가 |
| nginx/default.conf | Grafana를 서브패스(/grafana/)로 프록시하는 Nginx location 추가 |
| docker-compose.yml | Prometheus/Grafana 서비스 및 공용 네트워크/볼륨 구성 추가 |
| backend/src/main/resources/application-prod.yml | Actuator 관리 포트(8081) 및 Prometheus 엔드포인트 노출 설정 추가 |
| .github/workflows/be-cd.yml | 배포 시 .env에 DB_HOST 주입 추가 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣ 변경 사항
배포 환경의 안정성 및 모니터링 강화를 위해 Docker Compose 설정을 업데이트하고, Prometheus 및 Grafana를 활용한 모니터링 시스템을 구축하였습니다. 또한, 환경 변수 관리 방식을 개선하여 유연한 인프라 구성을 지원합니다.
#️⃣ 작업 상세 내용
#️⃣ 관련 이슈
📸 스크린샷 (선택)
변경 전
변경 후
📎 참고할만한 자료 (선택)