LetItCrash.Async.Report (let_it_crash v0.5.0)
View SourceResult of a LetItCrash.Async.observe_async/1,2 block.
A Report records the async work that happened inside an observer block:
which Tasks/processes were spawned, which completed, which crashed, which
exceptions were caught by telemetry, plus timing data. The struct is the
API — its fields are public and stable.
Three named assertions consume a Report:
LetItCrash.Async.assert_no_silent_swallow/1,2LetItCrash.Async.assert_all_completed/2
(Idempotency uses a function-form assertion that does not consume a
Report; see LetItCrash.Async.assert_idempotent/2.)
Fields
:spawned— list of{pid, kind, started_at}for processes observed during the block.kindis:task | :unknown.started_atis in monotonic milliseconds.:completed— list of{pid, result, finished_at}for spawned work that returned a value.:crashed— list of{pid, reason, finished_at}for spawned work that exited abnormally.:exceptions— list of telemetry exception events seen during the block. Each entry is{event_name, measurements, metadata}.:warnings— list of atom hints from the observer (e.g.:no_oban_events_seen). Reserved; usually empty in v0.5.0.:duration_ms— wall-clock duration of the block in milliseconds.:started_at— monotonic time (ms) when the block started.:ended_at— monotonic time (ms) when the block ended.
Reports are pure data: no behavior beyond @type t/0.
Summary
Types
@type pid_kind() :: :task | :unknown
@type t() :: %LetItCrash.Async.Report{ completed: [completed_entry()], crashed: [crashed_entry()], duration_ms: non_neg_integer(), ended_at: integer() | nil, exceptions: [exception_entry()], spawned: [spawned_entry()], started_at: integer() | nil, warnings: [atom()] }