Data and action helpers for the optional Continuum Observer.
The Observer is mounted from a host Phoenix router with
Continuum.Observer.Router.continuum_observer/2. Continuum does not start an
Observer supervisor and does not provide authentication; mount it only inside
an authenticated admin scope.
Query helpers in this module are Phoenix-independent and operate on the
configured Continuum instance repo. Event payloads are decoded through
Continuum.DurableTerm.decode!/1, which never creates atoms; the Observer is
not a boundary for untrusted database writes, but a corrupt payload surfaces
as a {:decode_error, _} cell rather than as an atom-table leak.
Summary
Functions
Cancels a run through the public Continuum API using the Observer instance.
Decodes a JSON payload from the Observer signal form.
Loads one run for the Observer detail view.
Builds the operational health report shown by the Observer health panel.
Lists bounded activity task state and last-heartbeat progress for a run.
Lists a bounded keyset page of decoded journal events ordered by sequence.
Lists runs for the Observer index.
Pretty prints an event payload for display with a hard byte cap.
Plans or executes a fenced operational repair from the Observer.
Produces a read-only replay report with bounded work for the Observer.
Returns the per-run topic used by run detail pages.
Returns the low-fidelity per-instance runs topic used by the Observer index.
Sends a signal through the public Continuum API using the Observer instance.
Returns the signal contracts declared by the run's workflow version.
Subscribes the caller to full-fidelity updates for a single run.
Subscribes the caller to coarse run-index updates for an instance.
Returns the run id that this run continued into via continue_as_new, or nil.
Types
Functions
Cancels a run through the public Continuum API using the Observer instance.
Decodes a JSON payload from the Observer signal form.
@spec get_run( binary(), keyword() ) :: {:ok, Continuum.Run.t()} | {:error, :not_found | term()}
Loads one run for the Observer detail view.
Builds the operational health report shown by the Observer health panel.
Lists bounded activity task state and last-heartbeat progress for a run.
Heartbeat details pass through the same configurable Observer redactor as event payloads.
@spec list_events( binary(), keyword() ) :: {:ok, Continuum.Page.t(map())} | {:error, term()}
Lists a bounded keyset page of decoded journal events ordered by sequence.
Pass :after_seq to continue from a previous page, :limit (capped at
100), :max_payload_bytes to reject oversized encoded
payloads before decoding, and :redactor as a unary function or module that
exports redact/1. The configured :observer_redactor application setting
is used when :redactor is omitted.
@spec list_runs(keyword()) :: {:ok, Continuum.Page.t(Continuum.Run.t())} | {:error, term()}
Lists runs for the Observer index.
Options:
:instance- Continuum instance name or struct. Defaults toContinuum.:state- atom/string run state filter.:workflow- workflow module substring filter.:search- run id or workflow substring filter.:page- 1-based page number.:per_page- page size, capped at 100.
Pretty prints an event payload for display with a hard byte cap.
Plans or executes a fenced operational repair from the Observer.
Repairs remain dry-run by default; pass execute: true after presenting an
explicit confirmation to the operator.
Produces a read-only replay report with bounded work for the Observer.
Runs in an isolated worker and applies the configured Observer redactor to
reported results and diagnostics. Defaults: 2 seconds, 2,000 events, 8 MiB
combined encoded snapshot/history, and 64 KiB per input/result/event payload.
Options :timeout_ms, :max_events, :max_history_bytes, and
:max_payload_bytes may raise these up to 5 seconds, 10,000 events, 16 MiB,
and 1 MiB respectively. Oversized data is refused before transferring it
from PostgreSQL. A heap limit also bounds decoded data in the worker.
Accepts the instance, snapshot, against-module, and redactor options from
Continuum.Replay.of_run/2. This helper provides no independent authorization;
call it behind the same host authorization as the run detail view.
Returns the per-run topic used by run detail pages.
@spec runs_topic() :: binary()
Returns the low-fidelity per-instance runs topic used by the Observer index.
Sends a signal through the public Continuum API using the Observer instance.
@spec signal_contracts( binary(), keyword() ) :: {:ok, Continuum.SignalContract.contracts()} | {:error, term()}
Returns the signal contracts declared by the run's workflow version.
Subscribes the caller to full-fidelity updates for a single run.
Subscribes the caller to coarse run-index updates for an instance.
Returns the run id that this run continued into via continue_as_new, or nil.