antikythera v0.4.0 AntikytheraCore.ErrorCountsAccumulator View Source

A GenServer to hold number of errors reported to each OTP application's alert manager process (implemented by AntikytheraCore.Alert.Manager).

Error counts are reported by AntikytheraCore.Alert.ErrorCountReporter installed in AntikytheraCore.Alert.Manager. The received error counts are stored with otp_app_name and the timestamp (in minute). Error counts accumulated in this GenServer can be fetched via HTTP: see AntikytheraCore.Handler.SystemInfoExporter.ErrorCount.

At the beginning of each minute,

  • newly-received error counts become visible from get/1 and get_total/0, and
  • error counts having too old timestamps are cleaned up from the process state.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Types

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

get(:antikythera | Antikythera.GearName.t()) :: results()

Specs

get_total() :: results()
Link to this function

submit(otp_app_name, count)

View Source

Specs

submit(:antikythera | Antikythera.GearName.t(), pos_integer()) :: :ok