stormlog.collector_health
Shared collector-health state and retry helpers.
Functions
Return bounded exponential backoff delay for collector retries. |
Classes
|
Current collector health as exposed through events and runtime stats. |
- class stormlog.collector_health.CollectorHealthState(status='healthy', telemetry_partial=False, partial_fields=(), last_error=None, consecutive_failures=0, next_retry_epoch_s=None)[source]
Bases:
objectCurrent collector health as exposed through events and runtime stats.
- Parameters:
status (str)
telemetry_partial (bool)
partial_fields (tuple[str, ...])
last_error (str | None)
consecutive_failures (int)
next_retry_epoch_s (float | None)
- status: str = 'healthy'
- telemetry_partial: bool = False
- partial_fields: tuple[str, ...] = ()
- last_error: str | None = None
- consecutive_failures: int = 0
- next_retry_epoch_s: float | None = None
- stormlog.collector_health.collector_retry_delay_seconds(consecutive_failures, *, initial_delay_s, factor, max_delay_s)[source]
Return bounded exponential backoff delay for collector retries.
- Parameters:
consecutive_failures (int)
initial_delay_s (float)
factor (float)
max_delay_s (float)
- Return type:
float