Skip to content

[FEAT/#447] Grafana Cloud 기반 메트릭/로그 관측성 구축 - #450

Merged
2ghrms merged 1 commit into
developfrom
feat/#447-grafana-cloud-based-metric-logs-observabillity
Sep 5, 2026
Merged

[FEAT/#447] Grafana Cloud 기반 메트릭/로그 관측성 구축#450
2ghrms merged 1 commit into
developfrom
feat/#447-grafana-cloud-based-metric-logs-observabillity

Conversation

@2ghrms

@2ghrms 2ghrms commented Sep 5, 2026

Copy link
Copy Markdown
Member

#️⃣연관된 이슈

close #447

📝작업 내용

현재 관측성 스택이 전무한 상태(actuator는 헬스체크 용도로만 사용, 중앙 로그/메트릭 수집 없음)에서 SLO 기준으로 값싼 관측성 스택(Grafana Cloud 무료 티어 + Grafana Alloy)을 구축했다. Metrics/Log를 우선 구축했고 Trace(OTel)는 범위에서 제외해 추후 별도 진행한다.

🔎코드 설명(스크린샷(선택))

  • micrometer-registry-prometheus 의존성 추가, /actuator/prometheus 노출
  • actuator를 앱 포트(8080)와 분리된 관리 포트(8081, management.server.port)로 이동 — Ingress는 8080만 라우팅하므로 메트릭이 외부에 노출되지 않음
  • prod에도 전역으로 걸려있던 DEBUG 로깅(org.springframework.web 등)을 local 전용으로 이동 — 민감정보 노출 및 로그 폭증 방지
  • GlobalExceptionAdvicee.printStackTrace()log.error()로 수정 — 최상위 예외 핸들러 로그가 SLF4J 포맷/레벨 제어를 벗어나 있던 문제
  • ASSU_BE_manifest: 앱 전용 Grafana Alloy(Deployment/RBAC/ConfigMap) 추가 — 앱 메트릭 스크레이핑 + 네임스페이스 로그 수집 → Grafana Cloud Prometheus/Loki 전송
  • ASSU_BE_manifest: 공식 k8s-monitoring Helm 차트(v4.5.0)로 node-exporter/kube-state-metrics 추가 — K3s 클러스터 자체 모니터링 (assu-monitoring 네임스페이스), ArgoCD Application(assu-cluster-monitoring) 추가
  • ASSU_BE_config, ASSU_BE_manifest 서브모듈 포인터 갱신
  • [HOTFIX] config/{dev,prod}/application-*.ymlmanagement 블록을 잘못된 위치에 삽입해 spring.datasource/spring.data.redis/spring.rabbitmqmanagement 하위로 잘못 중첩되는 YAML 들여쓰기 버그가 있었음 — dev에 실제 배포해서 발견(H2 임베디드 DB 폴백 + Redis 연결 실패로 크래시루프). 위치를 바로잡아 수정 완료

💬고민사항 및 리뷰 요구사항 (Optional)

  • 배포 순서 주의: actuator 포트 분리(코드+config)와 manifest의 probe 포트 변경이 세트로 반영돼야 한다. 한쪽만 먼저 배포되면 헬스체크 실패로 파드가 Ready 상태가 안 될 수 있다.
  • manifest 리베이스 과정에서 dd9bcc4(dev startupProbe 추가)가 port: http를 참조하고 있어서 port: management로 함께 수정했다.
  • assu-monitoring의 DaemonSet들이 tolerations: NoSchedule 전체 허용이라 control 노드에도 스케줄링된다. control이 t3.small(2GiB)이라 배포 후 kubectl top nodes로 메모리 여유 확인이 필요하다.
  • Grafana Cloud 연동을 위한 Secret(grafana-cloud-creds)은 assu-prod/assu-dev/assu-monitoring 네임스페이스에 이미 수동 생성 완료했고, k8s-monitoring 차트가 쓰는 CRD(alloys.collectors.grafana.com, podlogs.monitoring.grafana.com)도 클러스터에 사전 설치 완료했다.
  • 위 YAML 버그는 dev에 실제 배포해서 크래시루프로 발견했다. develop 머지 후 dev 재배포 결과를 다시 확인해야 한다.

비고 (Optional)

  • Grafana Alloy: metrics/logs/traces 모두 지원하는 OTLP 호환 컬렉터라, 추후 trace(OTel) 도입 시 별도 컬렉터 없이 파이프라인만 추가하면 된다.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 242a5581-ec58-4dad-a52e-e1a60401d7e8

📥 Commits

Reviewing files that changed from the base of the PR and between f0b6f7d and 790a111.

📒 Files selected for processing (1)
  • config

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.

@2ghrms
2ghrms merged commit 24a3b46 into develop Sep 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT/#447] Grafana Cloud 기반 메트릭/로그 관측성 구축

1 participant