Thin helpers around :telemetry for Rheo operations.
Events
Backend spans (:start / :stop / :exception suffix, metadata stream
and, where relevant, group):
[:rheo, :append],[:rheo, :append_batch],[:rheo, :query],[:rheo, :fetch],[:rheo, :lease, :renew],[:rheo, :ack],[:rheo, :retry],[:rheo, :reject]
Backend counters (count measurement):
[:rheo, :stream, :create],[:rheo, :group, :create]—stream,group[:rheo, :lease]— leases handed out by one fetch;stream,group,consumer_id[:rheo, :redelivery],[:rheo, :dead_letter]—stream,group,event_id[:rheo, :group, :frontier],[:rheo, :group, :replay],[:rheo, :group, :reset]
Runtime (Rheo.Group, Rheo.Producer, Rheo.Broadway.Acknowledger):
[:rheo, :consumer, :start | :stop],[:rheo, :producer, :start | :stop]—stream,group,consumer_id[:rheo, :fetch, :error]—stream,group,reason(Rheo.Settle)[:rheo, :lease, :renew]—stream,group,event_id,result(:okor aRheo.Settlereason)[:rheo, :ack | :retry | :reject, :error]—stream,group,event_id,reason(Rheo.Settle)[:rheo, :handler, :error]— a handler raised or threw;event_id,reason[:rheo, :worker, :crash]— a handler task exited;event_id,reason[:rheo, :broadway, :ack | :retry | :reject]— settled through the acknowledger
Metadata never includes event payloads. Attach handlers with
:telemetry.attach/4 in your application.
Summary
Functions
Emits a telemetry event with measurements and metadata.
Executes fun while emitting start/stop (or exception) telemetry events.
Functions
Emits a telemetry event with measurements and metadata.
Arguments
event— full event name, e.g.[:rheo, :lease]measurements— map of numeric measurementsmetadata— map of contextual metadata
Examples
iex> Rheo.Telemetry.execute([:rheo, :doctest_execute], %{count: 1}, %{stream: "demo"})
:okReturns
:ok
Executes fun while emitting start/stop (or exception) telemetry events.
Arguments
event— event name prefix as a list of atoms, e.g.[:rheo, :append]metadata— map attached to all emissionsfun— zero-arity function to run
Examples
iex> Rheo.Telemetry.span([:rheo, :doctest_span], %{demo: true}, fn -> :ok end)
:okReturns
The return value of fun.
Errors / raises
Re-raises any exception, throw, or exit from fun after emitting an
:exception event.