BeamConsole.Lifecycle.Recorder (beam_console v0.2.0)

Copy Markdown View Source

Monitors a bounded set of local supervised processes and records safe exits.

Recording is lazy by default: the first console subscriber activates watches and the last subscriber removes them. In :always mode the recorder remains active for the application lifetime. Snapshot observations are consumed from the collector's existing supervision traversal; this process never calls a supervisor or retains a runtime snapshot.

Summary

Functions

Activates lazy recording when the first console subscriber connects.

Returns a specification to start this module under a supervisor.

Deactivates lazy recording and removes its process monitors.

Returns a newest-first bounded lifecycle-event window with omission metadata.

Reconciles one bounded private observation batch from a completed collector frame.

Pauses recording until an operator explicitly resumes it.

Resumes recording when subscriber or always-on demand is present.

Returns newest aggregate recorder frames under the configured history cap.

Starts a lifecycle recorder with optional name, limits, clocks, and collector overrides.

Returns PID-free recorder activity, coverage, and bounded-history statistics.

Types

query_error()

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

status()

@type status() :: BeamConsole.Recorder.Status.t()

Functions

activate(server \\ __MODULE__)

@spec activate(GenServer.server()) :: :ok

Activates lazy recording when the first console subscriber connects.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

deactivate(server \\ __MODULE__)

@spec deactivate(GenServer.server()) :: :ok

Deactivates lazy recording and removes its process monitors.

events(options \\ [], server \\ __MODULE__)

Returns a newest-first bounded lifecycle-event window with omission metadata.

observe(frame, observations, options \\ [], server \\ __MODULE__)

Reconciles one bounded private observation batch from a completed collector frame.

pause(server \\ __MODULE__)

Pauses recording until an operator explicitly resumes it.

resume(server \\ __MODULE__)

Resumes recording when subscriber or always-on demand is present.

samples(options \\ [], server \\ __MODULE__)

Returns newest aggregate recorder frames under the configured history cap.

start_link(options \\ [])

@spec start_link(keyword()) :: GenServer.on_start()

Starts a lifecycle recorder with optional name, limits, clocks, and collector overrides.

status(server \\ __MODULE__)

@spec status(GenServer.server()) :: status()

Returns PID-free recorder activity, coverage, and bounded-history statistics.