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
44 changes: 0 additions & 44 deletions .github/workflows/monitoring-cd.yml

This file was deleted.

39 changes: 0 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
<img src="https://img.shields.io/badge/GCP%20Compute%20Engine-4285F4?style=for-the-badge&logo=googlecloud&logoColor=white" alt="GCP Compute Engine">
<img src="https://img.shields.io/badge/Supabase-3FCF8E?style=for-the-badge&logo=supabase&logoColor=white" alt="Supabase">
<img src="https://img.shields.io/badge/Sentry-362D59?style=for-the-badge&logo=sentry&logoColor=white" alt="Sentry">
<img src="https://img.shields.io/badge/Prometheus-E6522C?style=for-the-badge&logo=prometheus&logoColor=white" alt="Prometheus">
<img src="https://img.shields.io/badge/Grafana-F46800?style=for-the-badge&logo=grafana&logoColor=white" alt="Grafana">

### Testing

Expand Down Expand Up @@ -240,43 +238,6 @@
- 특히 네트워크 탭을 통해 실제 API 요청 흐름을 분석하면서 문제를 해결할 수 있었던 경험이 인상 깊었습니다.
- 이 경험을 통해 기능 구현 전에 동작 원리를 먼저 이해하려는 습관이 중요하다는 것을 배웠습니다.

<br><br>

### 4. 수집 지연 감지를 위한 모니터링

**문제**

- 학식, 셔틀버스, 공지사항과 같은 데이터 수집이 지연되더라도 즉시 인지하기 어려웠습니다.
- 사용자가 오래된 데이터를 확인하기 전까지는 문제가 드러나지 않아 대응이 늦어지는 상황이 발생했습니다.

**원인**

- 기존에는 서버가 살아 있는지만 확인하고 있었습니다.
- 하지만 실제로 중요한 "데이터가 언제 마지막으로 갱신되었는지"는 확인하지 않고 있었습니다.
- 이로 인해 수집이 실패하거나 지연되더라도 바로 알 수 없는 구조였습니다.

**해결**

- Prometheus, Grafana, Sentry를 활용해 모니터링 환경을 구성했습니다.
- 데이터 수집 지연 감지는 PostgreSQL에 저장된 마지막 수집 시간과 현재 시간의 차이를 확인하는 쿼리로 체크했습니다.
- 해당 값을 Grafana 대시보드로 시각화하여, 데이터가 얼마나 지연되고 있는지 한눈에 확인할 수 있도록 했습니다.

<img width="70%" alt="image" src="https://github.com/user-attachments/assets/9819c68d-6664-4a7f-969f-e70ee26edceb" />

**결과**

- 실제로 셔틀버스 데이터가 약 156분 지연된 문제를 대시보드를 통해 빠르게 확인할 수 있었습니다.
- 원인을 확인한 결과 Github Actions의 cron 설정 문제였고, 실행 시간을 조정하여 해결했습니다.
- 이후에는 데이터 수집 지연을 빠르게 인지하고 대응할 수 있게 되었습니다.
- 다만 데이터 구조가 바뀔 때마다 모니터링 쿼리와 대시보드를 함께 수정해야 하는 번거로움이 있었습니다.

<img width="1301" height="224" alt="image" src="https://github.com/user-attachments/assets/2f066c7c-960c-483d-ba5a-313f9dd31a3f" />

**느낀 점**

- [모니터링을 공부](https://dongho-blog.kro.kr/posts/3145ca9b-265e-8028-9953-f659ea1a9c67)하면서 사용자가 알기 전에 문제를 발견할 수 있도록 하는 것이 서비스 운영에서 매우 중요하다고 느꼈습니다.
- 특히 p95 응답 속도, 에러율 같은 지표를 통해 사용자 경험에 직접적인 영향을 주는 요소를 기준으로 서비스를 바라봐야 한다는 것을 배웠습니다.

---

## 🔷 팀원 소개
Expand Down
18 changes: 0 additions & 18 deletions monitoring/.env.example

This file was deleted.

67 changes: 0 additions & 67 deletions monitoring/docker-compose.dev.yml

This file was deleted.

101 changes: 0 additions & 101 deletions monitoring/docker-compose.yml

This file was deleted.

Loading
Loading