feat(stats): Ask Chat 통계 집계와 대시보드 추가 - #239
Merged
Merged
Conversation
중복된 통계 탭 마크업을 공통 Thymeleaf fragment로 통합함. 8개 통계 템플릿 연결과 기존 activeTab 렌더링을 테스트함
Ask Chat 세션·메시지·메시지 참조·RAG 문서에 전역 기간 집계용 created_at, id 인덱스를 추가함. Flyway 적용과 PostgreSQL 통합 테스트로 인덱스 생성을 검증함
서울 시간 기준 Ask Chat 사용량을 일별 집계하고 성공률·평균 및 p95 응답 지연시간·오류 코드 분포를 제공하는 stats read model과 테스트를 추가함
ask_chat_wallet_logs의 status·reason·delta를 기준으로 유·무료 대화권 소비·충전·환불과 순 증감량을 기간별 집계하고, ask_chat_rag_documents와 ask_chat_message_references의 임베딩 상태·retry·error·source·참조 현황을 AskChatStatsViewModel에 연결해 운영 통계 read model을 확장함
기존 AskChatStatsService read model을 /stats/ask-chat Thymeleaf 화면에 연결하고, 사용량·품질·대화권·RAG KPI와 일별 추이·오류·source 현황을 제공하는 Ask Chat 탭을 추가함
Collaborator
|
LGTM! |
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.
📝 요약(Summary)
Ask Chat의 사용량·응답 품질·대화권·RAG 처리 현황을 기간별로 집계하고, 운영자가 확인할 수 있는 통계 대시보드 탭을 추가했습니다.
주요 변경사항
/stats/ask-chatThymeleaf 대시보드 추가@Transactional(readOnly = true)서비스에서 일관된 기간 기준으로 조합created_at, id인덱스 Flyway migration 추가검증
git diff --check.\gradlew.bat --no-daemon compileJava.\gradlew.bat --no-daemon test --tests "com.devkor.ifive.nadab.domain.stats.controller.StatsControllerTemplateTest".\gradlew.bat --no-daemon test --tests "com.devkor.ifive.nadab.domain.stats.application.AskChatStatsServiceTest".\gradlew.bat --no-daemon test --tests "com.devkor.ifive.nadab.domain.stats.core.repository.AskChatStatsRepositoryTest".\gradlew.bat --no-daemon test --tests "com.devkor.ifive.nadab.domain.askchat.core.repository.AskChatStatsIndexesMigrationTest"참고 / 리스크
🔗 Related Issue
💬 공유사항
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.