Skip to content

feat(logging): Centralised Loki handler & file fallback #6

@pmcfadin

Description

@pmcfadin

Goal / Acceptance criteria:\n\nEnsure structured application logs are shipped to Loki when LOKI_ENABLED true, otherwise fall back to a rotating file handler.\n\n• Expand app/utils/observability.py to attach RotatingFileHandler when Loki disabled.\n• Clarify log format (json) so Tempo trace_id correlation works.\n• Expose .env.example variables: LOKI_ENABLED, LOKI_ENDPOINT, LOKI_EXTRA_LABELS.\n• Add README snippet on running loki+promtail via docker-compose.\n• Integration test: emits error log, asserts JSON reaches local Loki test container.\n\nContext: Prompt 2025-07-07 – Python Observability Guide discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-taskTasks generated by AI assistant

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions