Skip to content

feat: add log and trace retention #120

Description

@QueryPlanner

Summary

Bound local telemetry disk usage. Application logs use an unbounded FileHandler,
and the JSON span exporter appends indefinitely. This can eventually fill the disk
on the small VPS configuration that Blacki targets.

Priority

P2

Level of Effort

Small (2-4 hours)

Scope

  • Add size- or time-based rotation for application logs.
  • Add equivalent rotation or retention for local span files.
  • Make limits configurable with conservative defaults.
  • Define safe behavior when the log directory is full or unavailable.
  • Keep message-content capture disabled by default.

Passing Criteria

  • Automated tests write beyond the configured limit and prove retained telemetry
    remains within the documented bound.
  • Rotation preserves valid JSON lines and does not lose the active log file.
  • Export failures do not crash the agent and are reported through stderr without
    recursive logging.
  • Default production configuration has a finite retention limit.
  • Documentation includes disk-budget examples for a small VPS.

Sources

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions