Skip to content

Telemetry Log Has No Size Bound or Rotation — Grows Indefinitely #9

Description

@Nanle-code

Overview

src/utils/telemetry.rs appends events to ~/.starforge/data/telemetry.log. There is no rotation, size cap, or pruning. A heavy user running starforge hundreds of times daily will accumulate unbounded log files. There is also no way to audit what is stored without manually opening the file.

Resolution

Implement rolling telemetry with a configurable retention policy. Cap the log at 10,000 entries or 5MB, whichever comes first — on each write, check file size and prune oldest entries by rewriting. Use tracing-appender's RollingFileAppender (already a dependency) configured with Rotation::Daily and a max_log_files limit. Add starforge telemetry show that pretty-prints the last N events in a table using the existing print utilities. Add starforge telemetry clear to wipe the log. Serialize each event as a structured JSON line with schema version, timestamp, command, duration_ms, success — making it queryable via jq. Document the exact schema in the README so users know precisely what is stored. On first run after a starforge upgrade, re-display the telemetry notice if the schema version changed.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions