Summary
The operations design spec (docs/design/operations.md) has no dedicated section for the observability/logging architecture. The logging system is comprehensive (7+1 sinks, structured JSON, rotation, redaction, correlation tracking, per-logger routing) but undocumented in the design spec. Observability is only mentioned in passing (audit logging in security sections, error taxonomy in coordination).
Scope
Add a new section to docs/design/operations.md covering:
- Sink layout: The 8 default sinks (console + 7 files), their levels, formats, and logger name routing
- Log file locations:
/data/logs/ in Docker, logs/ locally, configurable via SYNTHORG_LOG_DIR
- Rotation policy: RotatingFileHandler (10MB x 5 backups) vs WatchedFileHandler (external logrotate)
- Sensitive field redaction: Automatic sanitization of passwords, tokens, API keys, credentials at all nesting depths
- Correlation tracking:
request_id, task_id, agent_id via async-safe contextvars, injected into every log event
- Per-logger levels: Default levels per domain module, configurable overrides
- Event taxonomy: 54 domain-specific event constant modules under
observability/events/
- Uvicorn integration: How Uvicorn access/error logging is routed through structlog
- Docker logging: Container-level json-file driver rotation vs app-level file rotation
- Runtime settings:
root_log_level and enable_correlation runtime-editable settings
Acceptance Criteria
Summary
The operations design spec (
docs/design/operations.md) has no dedicated section for the observability/logging architecture. The logging system is comprehensive (7+1 sinks, structured JSON, rotation, redaction, correlation tracking, per-logger routing) but undocumented in the design spec. Observability is only mentioned in passing (audit logging in security sections, error taxonomy in coordination).Scope
Add a new section to
docs/design/operations.mdcovering:/data/logs/in Docker,logs/locally, configurable viaSYNTHORG_LOG_DIRrequest_id,task_id,agent_idvia async-safe contextvars, injected into every log eventobservability/events/root_log_levelandenable_correlationruntime-editable settingsAcceptance Criteria
docs/design/operations.mdwith all 10 topics above