[Observability] Prometheus Backend 수집과 가용성 경보 추가 - #331
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제와 결과
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-backendscrape job과 교체 가능한 target 파일 추가DocGridBackendDown,DocGridDatabasePoolSaturated,DocGridBackendHighServerErrorRatio규칙 추가/mcp제외 적용for조건, 저트래픽 오탐 방지, MCP 제외를 promtool 단위 테스트로 고정검증
promtool check config: 성공, rule file 2개promtool check rules: 성공, Backend 3개·Embedding 7개 규칙promtool test rules: 성공, 4개 시나리오docker compose config: 성공docgrid-backend=UP,embedding-provider=UPDOWN → pending → firingUP, 경보inactiveCloses #330