View Source Beeline.HealthChecker (Beeline v1.0.0)

A GenServer which periodically polls a producer's stream positions and process

This GenServer emits :telemetry measurements which serve as an interface for exporting this health-check information to an external monitoring service.

Beeline.HealthChecker.Logger is included as a reasonable default consumer for this telemetry. You may wish to export this telemetry to another system such as appsignal or grafana in order to create alerts when processors fall behind.



  • [:beeline, :health_check, :stop] - dispatched by each HealthChecker process after polling the producer's position and process information
    • Measurement: %{duration: native_time} - the time taken to perform the position and process checks
    • Metadata, a map with the following keys:
      • :producer (module) - the producer module being measured
      • :alive? (boolean) - whether the producer process is alive
      • :stream_name (string) - the EventStoreDB stream name from which the producer reads
      • :hostname (string) - the hostname of the machine on which the health checker process is being run
      • :interval (integer) - the milliseconds the health checker process has waited (minus drift) since the last poll
      • :drift (integer) - the milliseconds used for drifting the interval for the last poll
      • :measurement_time (UTC datetime) - the time when the poll started
      • :prior_position (integer) - the :current_position from the last poll
      • :current_position (integer) - the current stream position of the producer
      • :head_position (integer) - the stream position of the head (the latest event) of the EventStoreDB stream
      • :auto_subscribe (boolean) - the value of the producer's :auto_subscribe? flag at the time of polling