mirror of
https://github.com/azaion/loader.git
synced 2026-04-22 21:56:33 +00:00
8f7deb3fca
Made-with: Cursor
43 lines
1.4 KiB
Markdown
43 lines
1.4 KiB
Markdown
# Observability
|
|
|
|
## Logging
|
|
|
|
**Library**: Loguru 0.7.3
|
|
|
|
**Sinks**:
|
|
|
|
| Sink | Level | Filter | Destination |
|
|
|--------|---------|-------------------------------------|--------------------------------------|
|
|
| File | INFO+ | All | `Logs/log_loader_{YYYYMMDD}.txt` |
|
|
| Stdout | DEBUG | INFO, DEBUG, SUCCESS only | Container stdout |
|
|
| Stderr | WARNING+| All | Container stderr |
|
|
|
|
**Format**: `[HH:mm:ss LEVEL] message`
|
|
|
|
**Rotation**: Daily (1 day), 30-day retention (file sink only)
|
|
|
|
**Async**: File sink uses `enqueue=True` for non-blocking writes
|
|
|
|
## Health Checks
|
|
|
|
| Endpoint | Method | Response | Purpose |
|
|
|-------------|--------|--------------------|------------------|
|
|
| `/health` | GET | `{"status": "healthy"}` | Liveness probe |
|
|
| `/status` | GET | `{status, authenticated, modelCacheDir}` | Readiness/info |
|
|
|
|
## Metrics
|
|
|
|
No metrics collection (Prometheus, StatsD, etc.) is implemented.
|
|
|
|
## Tracing
|
|
|
|
No distributed tracing is implemented.
|
|
|
|
## Gaps
|
|
|
|
- No structured logging (JSON format) — plain text only
|
|
- No request-level logging middleware (request ID, duration, status code)
|
|
- No metrics endpoint
|
|
- No distributed tracing
|
|
- Log directory `Logs/` is hardcoded — not configurable via environment
|