Skip to content

Add observability: pipeline run records, progress metrics, and actionable error surfacing #4

Description

@szverev

Problem

The pipeline is multi-step (Telegram fetch → extraction → embeddings → topics → scheduling → writing → publishing). When something fails or stalls, users rely on console logs, which makes it hard to:

  • see what ran last
  • understand what changed
  • debug failures quickly

Goal

Introduce lightweight observability so users and contributors can diagnose runs and failures quickly.

Proposed approach

  • Add a pipeline_runs table (or similar) that stores:
    • run id
    • start/end timestamps
    • step-level counts
    • failure summaries
  • Emit structured logs (JSON optional)
  • Add improved error surfacing:
    • include root exception messages (avoid swallowing)
    • include target URLs, status codes, and retry state

Acceptance criteria

  • Each analyze/schedule/write/publish run is recorded
  • CLI prints a concise summary + points to run id
  • Failures include actionable error messages

Tasks

  • Add DB schema + CRUD
  • Instrument claws
  • Add CLI command to show last N runs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions