Skip to content

Flush loop: swallowed errors fire forever without backoff #10

@AndresL230

Description

@AndresL230

Summary

recost/_init.py:194-195 catches every exception in the flush loop and continues firing every flush_interval_ms. A deterministic bug (malformed metric, transport never reachable) silently re-fires forever, logging every cycle.

Fix

Track consecutive failures; after N (e.g. 5), back off exponentially up to a ceiling, and surface via on_error.

Files

  • recost/_init.py
  • tests/test_init.py

Priority

P2 — log spam under sustained failure; not data-loss but a poor operator experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Polish / nice-to-havebugSomething isn't working

    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