stormlog.collector_health

Shared collector-health state and retry helpers.

Functions

collector_retry_delay_seconds(...)

Return bounded exponential backoff delay for collector retries.

Classes

CollectorHealthState([status, ...])

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: object

Current 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
to_dict()[source]
Return type:

dict[str, Any]

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