Skip to content

chore: 모니터링 대시보드 연결 및 Loki 문법 수정 (#23, #49)#53

Merged
doup2001 merged 2 commits intomainfrom
fix/#49
Apr 11, 2026
Merged

chore: 모니터링 대시보드 연결 및 Loki 문법 수정 (#23, #49)#53
doup2001 merged 2 commits intomainfrom
fix/#49

Conversation

@doup2001
Copy link
Copy Markdown
Member

@doup2001 doup2001 commented Apr 11, 2026

📌 작업한 내용

  • 모니터링 대시보드 연결: Grafana 대시보드에 PinHouse 서비스 통합
  • Loki 공식 문법 수정: 최신 Loki 문법에 맞게 config 업데이트

🔍 참고 사항

  • Grafana 대시보드에 CPU/Memory/Request Latency 실시간 모니터링
  • Loki 로그 쿼리 최적화로 성능 개선 및 오류 감소
  • Alloy → Loki → Grafana 관찰성 파이프라인 완성
  • Tempo 트레이싱과 연동하여 전체 APM 체계 구축

🖼️ 스크린샷

-X

🔗 관련 이슈

#23 (모니터링 대시보드 연결)
#49 (Loki/Tempo 설정 개선)

✅ 체크리스트

  • 로컬에서 빌드 및 테스트 완료
  • Grafana 대시보드 접속 및 데이터 확인
  • 코드 리뷰 반영 완료
  • 문서화 필요 여부 확인

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • Spring Boot 모니터링 대시보드 추가 (HTTP 요청율, JVM 힙 메모리, CPU 사용량 등 10개 지표 포함)
    • Loki 로그 개요 대시보드 추가 (네임스페이스, 서비스, 로그 레벨별 로그 집계)
    • Grafana 대시보드 자동 로드 기능 활성화
  • 개선 사항

    • 로그 수집 및 메트릭 스크래핑 구조 개선

@doup2001 doup2001 self-assigned this Apr 11, 2026
@doup2001 doup2001 added the fix 기능 수정 및 버그 픽스 label Apr 11, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 11, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a1394752-51c1-40f2-9528-3a0114196459

📥 Commits

Reviewing files that changed from the base of the PR and between 789b528 and e0c8cfb.

📒 Files selected for processing (6)
  • k8s-helm/releases/monitoring-alloy/values.yaml
  • k8s-helm/releases/monitoring-core/dashboards/backend/spring-boot-overview.json
  • k8s-helm/releases/monitoring-core/dashboards/logs/loki-logs-overview.json
  • k8s-helm/releases/monitoring-core/templates/grafana-dashboards.yaml
  • k8s-helm/releases/monitoring-core/values-prod-gitops.yaml
  • k8s-helm/releases/monitoring-core/values.yaml

Walkthrough

이 풀 리퀘스트는 Alloy 모니터링 구성을 재구성하여 ServiceMonitor를 제거하고 Loki 로그 수집을 단순화하며, 새로운 Grafana 대시보드 두 개(Spring Boot 및 Loki Logs)를 추가하고 대시보드 자동 로딩을 위한 Helm 템플릿과 사이드카 설정을 구성합니다.

Changes

Cohort / File(s) Summary
Alloy 모니터링 구성
k8s-helm/releases/monitoring-alloy/values.yaml
ServiceMonitor 블록 제거; Loki 로그 수집을 loki.source.podlogs와 CRI 로그 파싱 스테이지로 재구현; 서비스 레이블 재지정 로직을 다단계 우선순위 스킴으로 업데이트(컨테이너명 → ReplicaSet 프리픽스 → 앱 레이블 → 앱 Kubernetes 이름).
Grafana 대시보드 추가
k8s-helm/releases/monitoring-core/dashboards/backend/spring-boot-overview.json, k8s-helm/releases/monitoring-core/dashboards/logs/loki-logs-overview.json
Spring Boot 메트릭(HTTP 요청율, 에러율, JVM 힙, GC, 스레드, 연결풀) 및 Loki 로그 집계/필터링을 위한 두 개의 새로운 Grafana 대시보드 JSON 파일 추가.
대시보드 배포 자동화
k8s-helm/releases/monitoring-core/templates/grafana-dashboards.yaml
dashboards/**/*.json 파일을 Kubernetes ConfigMap으로 변환하는 새로운 Helm 템플릿; 결정론적 ConfigMap 이름과 폴더 레이블을 생성.
Grafana 사이드카 설정
k8s-helm/releases/monitoring-core/values.yaml, k8s-helm/releases/monitoring-core/values-prod-gitops.yaml
grafana.sidecar.dashboards 구성 활성화(레이블 기반 검색, 크로스 네임스페이스 스캔, 폴더 구조 지원).

Sequence Diagram(s)

sequenceDiagram
    participant K8s as Kubernetes API
    participant Alloy as Alloy Agent
    participant CRI as Container Runtime
    participant Loki as Loki
    participant Prometheus as Prometheus

    K8s->>Alloy: Pod, Label 메타데이터 제공
    Alloy->>K8s: Pod 메타데이터 발견 (loki.source.podlogs)
    Alloy->>CRI: 로그 스트림 접근
    CRI->>Alloy: CRI 형식 로그 반환
    Alloy->>Alloy: CRI 로그 파싱 (stage.cri)
    Alloy->>Alloy: 서비스 레이블 재지정<br/>(계층화된 우선순위)
    Alloy->>Loki: 처리된 로그 전송 (loki.write.default)
    Alloy->>Prometheus: 메트릭 수집 (podmonitors, probes)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

chore

Poem

🐰 로그의 흐름, CRI를 거쳐 청결하게,
대시보드는 Spring Boot의 맥박을 읽고,
Loki 호출에 응답하며,
폴더마다 정렬된 ConfigMap이 춤을 춘다—
모니터링의 새로운 장, 우아하게 열렸네! 🌿

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#49

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@doup2001 doup2001 merged commit 374fe0a into main Apr 11, 2026
1 check was pending
@doup2001 doup2001 deleted the fix/#49 branch April 11, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 기능 수정 및 버그 픽스

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant