Description:
Enhance the existing FancyLogger to integrate with the rest of the observability stack. This enables log-trace correlation, structured context propagation, and flexible output destinations while preserving the existing API.
Current State:
FancyLogger in mellea/core/utils.py uses Python's built-in logging module
- Custom formatters:
CustomFormatter (colored console), JsonFormatter (JSON serialization)
- Optional
RESTHandler for HTTP webhook logging (only active if FLOG env var set)
- No correlation with distributed tracing (no trace_id/span_id injection)
- No contextvars integration for async flows
- Used in 13+ files across backends, requirements, components, and sampling strategies
Acceptance Criteria:
Description:
Enhance the existing
FancyLoggerto integrate with the rest of the observability stack. This enables log-trace correlation, structured context propagation, and flexible output destinations while preserving the existing API.Current State:
FancyLoggerinmellea/core/utils.pyuses Python's built-inloggingmoduleCustomFormatter(colored console),JsonFormatter(JSON serialization)RESTHandlerfor HTTP webhook logging (only active ifFLOGenv var set)Acceptance Criteria: