[Observability] 비동기 Queue 운영 상태 Gauge와 정체 경보 추가 - #336
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.
문제와 결과
상태 전이 Counter만으로는 지금 Queue가 쌓였는지, Worker가 사라졌는지, 오래 PROCESSING에 머문 작업이 있는지 알 수 없었습니다. 전체
PENDING수는 미래 Retry까지 포함하고, scrape 때마다 DB를 조회하면 감시 트래픽이 DB 부하를 늘립니다.이 변경은 기본 15초마다 전용 단일 Thread에서 Queue별 aggregate SQL 3개를 실행해 마지막 정상 Snapshot을 원자적으로 교체합니다.
/actuator/prometheus의 9개 Queue·Worker Gauge와 Snapshot freshness Gauge는 메모리만 읽으므로 scrape당 DB 조회는 0회입니다.변경 내용
next_retry_at·available_at이 미래인 backoff 항목을 backlog에서 제외refresh_total{outcome="success|failed"}로 수집 실패 노출max by (cluster, environment)로 평가하는 정체 경보 5개 추가검증
snapshot_age=+Inf검증/actuator/prometheus에서 Queue·Worker Gauge 9개, freshness Gauge와 refresh Counter 노출 확인promtool check config: 성공, rule file 3개·총 19개 규칙docker compose config --quiet: 성공git diff --check: 성공Closes #334