69e91fd5d0
- Extended health endpoint: DB+Redis+Storage+Worker checks with degraded status - Prometheus metrics endpoint: admin-only, text/plain format - Metrics: http_requests_total, db_pool_connections, arq_jobs_total - Structured JSON logging (structlog): timestamp, level, method, path, status, duration_ms, tenant_id - Performance: page_size max 100 enforced (422), streaming CSV export (StreamingResponse) - Scripts: seed_perf_data.py, check_indexes.py - Docs: admin-guide.md (Deploy, Backup, Restore, Env-Vars, Troubleshooting), api-overview.md - README updated: prod setup, API section, env profiles, admin-guide link - .env.example: added SECRET_KEY, STORAGE_PATH, SMTP_* vars - 38 new tests, full regression 564/564 pass (0 failures) - Ruff: all checks passed
28 lines
1.4 KiB
Markdown
28 lines
1.4 KiB
Markdown
# Current Status — LeoCRM
|
|
|
|
**Last Updated**: 2026-07-01 23:00
|
|
**Task Completed**: T10 — Monitoring, Performance, Documentation & Environment Config
|
|
|
|
## Summary
|
|
T10 is fully implemented. All 38 tests pass, ruff is clean, docs are in place.
|
|
|
|
## What Was Done
|
|
- **Monitoring**: Prometheus metrics (http_requests_total, db_pool_connections, arq_jobs_total), structured JSON logging via structlog, extended health checks (DB, Redis, storage, worker)
|
|
- **Metrics endpoint**: GET /api/v1/metrics (admin-only, text/plain Prometheus format)
|
|
- **Health endpoint**: Extended with database, redis, storage, worker checks
|
|
- **Performance**: Streaming CSV export for contacts and companies (StreamingResponse with own DB session), page_size max 100 enforced (422 for >100)
|
|
- **Scripts**: seed_perf_data.py (--count N), check_indexes.py
|
|
- **Documentation**: README.md updated, docs/admin-guide.md created, docs/api-overview.md created
|
|
- **Config**: .env.example updated with SMTP, storage, secret_key vars
|
|
- **Dependencies**: prometheus-client, structlog added to requirements.txt
|
|
|
|
## Test Evidence
|
|
- 38/38 tests passed in 24.24s
|
|
- Ruff: All checks passed
|
|
- Docs: All files present (README.md, docs/admin-guide.md, docs/api-overview.md)
|
|
|
|
## Next Steps
|
|
- T11: Next task in task graph (if any)
|
|
- Verify AC11 (ARQ background job for >1000 records CSV export) — requires ARQ worker running
|
|
- Run full test suite to check for regressions
|