Skip to content

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

Description

@2ghrms

📝 Description

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

📝 Todo

  • micrometer-registry-prometheus 의존성 추가, /actuator/prometheus 엔드포인트 노출
  • actuator를 앱 포트(8080)와 분리된 관리 포트(8081, management.server.port)로 이동해 메트릭이 Ingress를 통해 외부에 노출되지 않도록 함
  • prod에도 걸려있던 전역 DEBUG 로깅을 local 전용으로 이동 (민감정보 노출·로그 폭증 방지)
  • GlobalExceptionAdvicee.printStackTrace()log.error()로 수정
  • ASSU_BE_manifest에 앱 전용 Grafana Alloy(Deployment, RBAC, ConfigMap) 추가 — 앱 메트릭 스크레이핑 + 네임스페이스 로그 수집 → Grafana Cloud Prometheus/Loki
  • Grafana 공식 k8s-monitoring Helm 차트로 K3s 클러스터 자체(node-exporter, kube-state-metrics) 모니터링 추가 (assu-monitoring 네임스페이스)
  • ArgoCD Application(assu-cluster-monitoring) 추가로 GitOps 반영
  • Grafana Cloud 자격증명 Secret을 assu-prod/assu-dev/assu-monitoring 네임스페이스에 수동 생성

📝 참고 사항

관련 저장소: ASSU_BE_config(actuator 포트 분리 설정), ASSU_BE_manifest(Alloy/모니터링 매니페스트). Grafana Cloud 무료 티어(Prometheus/Loki) 사용. CRD(alloys.collectors.grafana.com, podlogs.monitoring.grafana.com)는 클러스터에 사전 수동 설치 필요.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions