feat: usage-recording/#266 - #267
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hjbin-25
force-pushed
the
feat/usage-recording/#266
branch
from
September 23, 2026 01:43
2d0df05 to
548c225
Compare
hjbin-25
marked this pull request as ready for review
September 23, 2026 01:45
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.
변경 내용
스트리머 실사용(세션·방송)을 DB에 기록한다.
usage_sessions/usage_broadcasts(신규 테이블만, 마이그레이션000006+ AutoMigrate 등록)user_id는 NULL(익명화), 비정상 종료로 열린 행은 기동 시unclean_shutdowncmd/usage-backfill(로그→SQL),scripts/usage/export-usage-logs.sh(필요 이벤트만 추출),report.sql(집계),grafana-dashboard.json확인 방법
go build·go vet·go test ./...,-race(session·usage), DB 테스트는TEST_DATABASE_URL000006down→up 왕복데이터 보는 방법
innolive. 서버에서sudo -u postgres psql -d innolive, 또는 SSH 터널ssh -p <SSH 포트> -N -L 15432:127.0.0.1:5432 <계정>@<서버>psql ... -f scripts/usage/report.sql— 3번(회차별)에 계정, 세션·방송 시작/종료, 방송 시간(일시정지 제외), 플랫폼, 직전 방송 이후 간격, 종료 분류(정상/연결 끊김/시스템 오류)grafana-dashboard.jsonImport. Postgres 연결(읽기 전용 계정·listen_addresses·pg_hba)은 root 설정 필요 — 상세 명령은 이 본문의 편집 기록 참고배포 시
머지 = 프로덕션 배포이며, 기동 시 테이블이 생성된다. 배포 직후 과거분을 1회 백필한다.
Closes #266
🤖 Generated with Claude Code