BeamConsoleWeb.Console.RecorderClient (beam_console v0.4.0)

Copy Markdown View Source

Provides an outage-safe boundary around the lifecycle recorder.

Expected process exits during supervisor restart windows become structured unavailable and timeout results so connected LiveViews can preserve their bounded view.

Summary

Functions

Returns bounded lifecycle events when the recorder process is available.

Pauses recording when the recorder process is available.

Resumes recording when the recorder process is available.

Returns bounded aggregate samples when the recorder process is available.

Returns recorder health when the recorder process is available.

Types

call_error()

@type call_error() :: {:error, :timeout | :unavailable}

query_error()

@type query_error() :: call_error() | {:error, {:invalid_query_options, term()}}

server()

@type server() :: GenServer.server() | nil

Functions

events(options, server \\ LifecycleRecorder, timeout \\ 250)

@spec events(keyword(), server(), timeout()) ::
  {:ok, BeamConsole.Recorder.Query.t()} | query_error()

Returns bounded lifecycle events when the recorder process is available.

pause(server \\ LifecycleRecorder, timeout \\ 250)

@spec pause(server(), timeout()) ::
  {:ok, BeamConsole.Recorder.Status.t()} | call_error()

Pauses recording when the recorder process is available.

resume(server \\ LifecycleRecorder, timeout \\ 250)

@spec resume(server(), timeout()) ::
  {:ok, BeamConsole.Recorder.Status.t()} | call_error()

Resumes recording when the recorder process is available.

samples(options, server \\ LifecycleRecorder, timeout \\ 250)

@spec samples(keyword(), server(), timeout()) ::
  {:ok, BeamConsole.Recorder.Query.t()} | query_error()

Returns bounded aggregate samples when the recorder process is available.

status(server \\ LifecycleRecorder, timeout \\ 250)

@spec status(server(), timeout()) ::
  {:ok, BeamConsole.Recorder.Status.t()} | call_error()

Returns recorder health when the recorder process is available.