Metrics #149
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
| name: Metrics | |
| # T1-2 — 운영 관측성 메트릭 시계열 수집. | |
| # 매 CI Fast 완료 시 (workflow_run) + 매일 02:00 KST (cron) 트리거. | |
| # 산출물: landing/static/metrics/ 안 JSON (시계열 30일 rolling). | |
| # 짝 트랙: T1-4 SLO 정의 + T1-5 health dashboard. | |
| on: | |
| workflow_run: | |
| workflows: ["CI Fast"] | |
| types: [completed] | |
| schedule: | |
| - cron: "0 17 * * *" # 매일 17:00 UTC = 02:00 KST 다음날 | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: metrics-${{ github.ref }} | |
| cancel-in-progress: false # 시계열 누적이라 중복 실행 허용 | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| collect: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # git log 분석 필요 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install minimal deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests pyyaml | |
| - name: Collect 7 metrics signals | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| python -X utf8 .github/scripts/meta/collectMetrics.py \ | |
| --repo "${{ github.repository }}" \ | |
| --output landing/static/metrics/$(date -u +%Y-%m-%d).json | |
| - name: Aggregate 30-day rolling | |
| run: | | |
| python -X utf8 .github/scripts/meta/aggregateMetrics.py \ | |
| --input-dir landing/static/metrics/ \ | |
| --window 30 \ | |
| --output landing/static/metrics/rolling.json | |
| - name: Upload metrics artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: metrics-${{ github.run_id }} | |
| path: landing/static/metrics/ | |
| retention-days: 90 |