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.
Summary
recost/_init.py:194-195catches every exception in the flush loop and continues firing everyflush_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.pytests/test_init.pyPriority
P2 — log spam under sustained failure; not data-loss but a poor operator experience.