[HSC-423] admin log-feature dispatch rejection 정책 변경 및 reject 계측 추가#278
Merged
Conversation
There was a problem hiding this comment.
Code Review
🛡️ Code Review Report ## 1. 🔍 요약 (Summary) 이번 PR은 Admin 로그 기능을 별도의 스레드 풀(adminLogFeatureTaskExecutor)을 사용하는 비동기 방식으로 분리하고, 작업 거부(TaskRejectedException) 시의 예외 처리와 메트릭 기록 로직을 추가했습니다. 전반적으로 아키텍처 가이드라인을 잘 준수하고 있으나, 예외 발생 시 로그 기록이 누락된 점이 확인되었습니다. ## 2. 🛑 Blocking Issues (Must Fix) - [위반 규칙]: 로깅 정책 준수 - [위치]: UserLogService.java (Line 131-133) - [문제 이유]: PR 설명에 명시된 것과 달리 TaskRejectedException 발생 시 메트릭만 기록되고 실제 로그 출력 로직이 누락되어 있어 장애 발생 시 원인 파악이 어려울 수 있습니다. - [해결 제안]: catch 블록 내에 log.warn을 추가하여 시스템 포화 상태 및 거부된 요청 정보를 명시적으로 기록하십시오.
🧪 Test Coverage Report (JaCoCo)
Package line spark (sample): 📦 Package coverage (worst 10)
🧨 Lowest coverage classes (worst 10)
🧩 Changed files coverage breakdown (3 files)
🔎 HTML 리포트: Actions → Artifacts → |
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.
📝작업 내용
Burst 구간에서
adminLogFeatureTaskExecutor가 포화되면CallerRunsPolicy때문에userLogTaskExecutor가 느린 admin HTTP 호출을 대신 수행하고 있었다.fallback을 끊고, admin dispatch enqueue 결과를 별도 metric으로 관측할 수 있게 만드는 작업
CallerRunsPolicy->AbortPolicyholliverse.userlog.admin_log_feature.dispatch추가TaskRejectedExceptioncatch 후 metric/log 기록flowchart LR A["userLogTaskExecutor"] --> B["dispatch()"] B --> C["adminLogFeatureTaskExecutor full"] C --> D["AbortPolicy"] D --> E["TaskRejectedException"] E --> F["dispatch rejected metric"] style D fill:#eef8ef,stroke:#5a9c67 style F fill:#eef4ff,stroke:#5b80b7👀변경 사항
src/main/java/site/holliverse/shared/config/runtime/CustomerRuntimeInfraConfiguration.javaadminLogFeatureTaskExecutorrejection policy 변경src/main/java/site/holliverse/shared/monitoring/CustomerMetrics.javasrc/main/java/site/holliverse/customer/application/usecase/log/UserLogService.java추가 metric
holliverse.userlog.admin_log_feature.dispatchresult="enqueued"holliverse.userlog.admin_log_feature.dispatchresult="rejected"기대 효과
admin-log-feature포화 시user-logexecutor가 다시 긴 HTTP 호출을 수행하지 않음🎫 Jira Ticket
#️⃣관련 이슈