ExESDB.SubscriptionHealthTracker (ex_esdb v0.11.0)
Centralized tracker for subscription health events received via :ex_esdb_system PubSub.
This module:
- Subscribes to subscription health events from subscription proxies
- Maintains current health status for all subscriptions in a store
- Provides APIs to query subscription health
- Publishes aggregated health summaries
- Integrates with the broader ExESDB monitoring system
Summary
Functions
Returns a specification to start this module under a supervisor.
Gets the current health status for all subscriptions in a store.
Gets detailed health information for a specific subscription.
Lists all subscriptions currently being tracked.
Types
@type health_data() :: %{ subscription_name: String.t(), current_status: health_status(), last_seen: integer(), event_count: non_neg_integer(), last_event: health_event(), error_count: non_neg_integer(), last_error: term() | nil }
@type health_status() :: :healthy | :degraded | :failed | :registering | :unknown
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Gets the current health status for all subscriptions in a store.
@spec get_subscription_health(atom(), String.t()) :: {:ok, health_data()} | {:error, :not_found}
Gets detailed health information for a specific subscription.
Lists all subscriptions currently being tracked.