Bonny.Sys.Event (bonny v0.4.3) View Source
Bonny.Sys.Event is a thin wrapper around :telemetry.
All events will be prefixed with bonny.
The following events are emitted:
[:bonny, :task, :stopped][:bonny, :task, :failed][:bonny, :task, :succeeded][:bonny, :task, :unregistered][:bonny, :task, :registered][:bonny, :task, :initialized][:bonny, :scheduler, :binding, :failed][:bonny, :scheduler, :binding, :succeeded][:bonny, :scheduler, :nodes, :fetch, :failed][:bonny, :scheduler, :nodes, :fetch, :succeeded][:bonny, :scheduler, :pods, :fetch, :failed][:bonny, :scheduler, :pods, :fetch, :succeeded][:bonny, :reconciler, :genserver, :down][:bonny, :reconciler, :reconcile, :failed][:bonny, :reconciler, :reconcile, :succeeded][:bonny, :reconciler, :run, :started][:bonny, :reconciler, :fetch, :failed][:bonny, :reconciler, :fetch, :succeeded][:bonny, :reconciler, :initialized][:bonny, :watcher, :genserver, :down][:bonny, :watcher, :chunk, :received][:bonny, :watcher, :watch, :timedout][:bonny, :watcher, :watch, :failed][:bonny, :watcher, :watch, :finished][:bonny, :watcher, :watch, :succeeded][:bonny, :watcher, :watch, :started][:bonny, :watcher, :initialized]
To access this list programmatically use events/0.
If set, default metadata will be applied to all events. See: metadata/0
Link to this section Summary
Functions
Returns a list of all events emitted by this module
Measure function execution in ms and return in map w/ results.
Default metadata added to all events.
Merges metadata with defaults
The instrumenter name
Link to this section Functions
Specs
events() :: [[atom()]]
Returns a list of all events emitted by this module:
[:bonny, :task, :stopped][:bonny, :task, :failed][:bonny, :task, :succeeded][:bonny, :task, :unregistered][:bonny, :task, :registered][:bonny, :task, :initialized][:bonny, :scheduler, :binding, :failed][:bonny, :scheduler, :binding, :succeeded][:bonny, :scheduler, :nodes, :fetch, :failed][:bonny, :scheduler, :nodes, :fetch, :succeeded][:bonny, :scheduler, :pods, :fetch, :failed][:bonny, :scheduler, :pods, :fetch, :succeeded][:bonny, :reconciler, :genserver, :down][:bonny, :reconciler, :reconcile, :failed][:bonny, :reconciler, :reconcile, :succeeded][:bonny, :reconciler, :run, :started][:bonny, :reconciler, :fetch, :failed][:bonny, :reconciler, :fetch, :succeeded][:bonny, :reconciler, :initialized][:bonny, :watcher, :genserver, :down][:bonny, :watcher, :chunk, :received][:bonny, :watcher, :watch, :timedout][:bonny, :watcher, :watch, :failed][:bonny, :watcher, :watch, :finished][:bonny, :watcher, :watch, :succeeded][:bonny, :watcher, :watch, :started][:bonny, :watcher, :initialized]
Great for use with :telemetry.attach_many/4
Specs
Measure function execution in ms and return in map w/ results.
Examples
iex> Bonny.Sys.Event.measure(IO, :puts, ["hello"])
{%{duration: 33}, :ok}
Specs
metadata() :: map()
Default metadata added to all events.
Defaults:
%{}
Specs
Merges metadata with defaults
Specs
name() :: atom()
The instrumenter name