One error, in the shape NervesHub stores.
%{
"timestamp" => "2026-08-31T10:22:31.123456Z",
"kind" => "error",
"reason" => "** (RuntimeError) connection refused",
"frames" => [%{"module" => "MyApp.Worker", "function" => "handle_info/2", ..}]
}timestamp, kind and reason are required
A report missing any of them is dropped by the server, and dropped quietly: no error back to the device and nothing in the UI. The timestamp is when the device saw the error rather than when it managed to send it, which is the whole point of a report that spent an hour in a buffer waiting for a connection.
Frames are not MFAs
module is a namespace string and function is a name string, because the
same shape has to carry a Rust agent's nerves_hub_link::agent /
run_loop and an ESP-IDF client's C frames. Nothing on the server reads
these as Elixir.
Summary
Functions
A report saying how many were dropped, and when the gap opened.
Build a report from an error the application caught and wants recorded.
Build a report from an OTP log event carrying a :crash_reason.
The current time, in the format the server parses.
Attach device context to a report that does not have any yet.
Types
Functions
@spec dropped_notice(pos_integer(), String.t() | nil) :: t()
A report saying how many were dropped, and when the gap opened.
at is the timestamp of the first report that was dropped, so the notice
sorts ahead of every report that survived it. It carries its
own grouping key, so a fleet's dropped-report notices land on one issue
instead of one per device.
@spec from_caught(:error | :exit | :throw, term(), Exception.stacktrace(), keyword()) :: t()
Build a report from an error the application caught and wants recorded.
kind is :error, :exit or :throw, matching Kernel.SpecialForms.try/1.
@spec from_log_event(:logger.log_event()) :: t() | nil
Build a report from an OTP log event carrying a :crash_reason.
Returns nil for an event without one, which is every ordinary log line.
@spec now() :: String.t()
The current time, in the format the server parses.
Attach device context to a report that does not have any yet.