Skip to content

[Observability] Prometheus Backend 수집과 가용성 경보 추가 - #331

Merged
Gimini-3 merged 1 commit into
developfrom
feature/330-prometheus-backend-alerts
Sep 13, 2026
Merged

Gimini-3 merged 1 commit into
developfrom
feature/330-prometheus-backend-alerts

Conversation

@Gimini-3

Copy link
Copy Markdown
Contributor

문제와 결과

Backend가 Management 포트에서 Prometheus 메트릭을 제공해도 번들 Prometheus에는 Backend scrape job이 없어 JVM·HTTP·HikariCP 시계열을 저장하거나 가용성 경보를 평가할 수 없었습니다. Spring Backend는 Host에서 실행하고 Prometheus는 Docker에서 실행하므로 두 실행 경계를 잇는 주소도 필요했습니다.

이 변경은 file-based service discovery로 host.docker.internal:8081을 수집하고, Linux와 Docker Desktop에서 같은 주소를 사용하도록 Compose에 Host gateway를 연결합니다. Backend 중단·DB pool 포화·충분한 표본에서의 HTTP 5xx 증가를 Prometheus가 직접 판정합니다.

변경 내용

  • docgrid-backend scrape job과 교체 가능한 target 파일 추가
  • Compose Prometheus에 Host gateway와 target directory mount 추가
  • DocGridBackendDown, DocGridDatabasePoolSaturated, DocGridBackendHighServerErrorRatio 규칙 추가
  • 5xx 규칙에 5분간 최소 20건 조건과 /mcp 제외 적용
  • 경보의 for 조건, 저트래픽 오탐 방지, MCP 제외를 promtool 단위 테스트로 고정
  • 번들·기존 Prometheus 연결 가이드와 Backend down runbook 추가
  • 설계와 실제 장애 주입 결과 문서화

검증

  • promtool check config: 성공, rule file 2개
  • promtool check rules: 성공, Backend 3개·Embedding 7개 규칙
  • promtool test rules: 성공, 4개 시나리오
  • 기본·monitoring profile docker compose config: 성공
  • 실제 target: docgrid-backend=UP, embedding-provider=UP
  • Backend 중단: DOWN → pending → firing
  • Backend 재기동: target UP, 경보 inactive

Closes #330

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5fc25064-2b08-42d8-b49f-0226d1d3e88b


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.

@Gimini-3
Gimini-3 merged commit 2fe3954 into develop Sep 13, 2026
1 check passed
@Gimini-3
Gimini-3 deleted the feature/330-prometheus-backend-alerts branch September 13, 2026 08:49
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.

[Observability] Prometheus Backend 수집과 가용성 경보 추가

1 participant