bonny v0.4.1 Bonny.Sys.Event

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

Link to this function

events()
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

Link to this function

measure(mod, func, args)
measure(module(), atom(), list()) :: {map(), any()}

Measure function execution in ms and return in map w/ results.

Examples

iex> Bonny.Sys.Event.measure(IO, :puts, ["hello"])
{%{duration: 33}, :ok}
Link to this function

metadata()
metadata() :: map()

Default metadata added to all events.

Defaults: %{}

Link to this function

metadata(alt)
metadata(map()) :: map()

Merges metadata with defaults

Link to this function

name()
name() :: atom()

The instrumenter name

Link to this function

reconciler_fetch_failed(measurements, metadata \\ %{})
reconciler_fetch_failed(map(), map()) :: :ok

Link to this function

reconciler_fetch_succeeded(measurements, metadata \\ %{})
reconciler_fetch_succeeded(map(), map()) :: :ok

Link to this function

reconciler_genserver_down(measurements, metadata \\ %{})
reconciler_genserver_down(map(), map()) :: :ok

Link to this function

reconciler_initialized(measurements, metadata \\ %{})
reconciler_initialized(map(), map()) :: :ok

Link to this function

reconciler_reconcile_failed(measurements, metadata \\ %{})
reconciler_reconcile_failed(map(), map()) :: :ok

Link to this function

reconciler_reconcile_succeeded(measurements, metadata \\ %{})
reconciler_reconcile_succeeded(map(), map()) :: :ok

Link to this function

reconciler_run_started(measurements, metadata \\ %{})
reconciler_run_started(map(), map()) :: :ok

Link to this function

scheduler_binding_failed(measurements, metadata \\ %{})
scheduler_binding_failed(map(), map()) :: :ok

Link to this function

scheduler_binding_succeeded(measurements, metadata \\ %{})
scheduler_binding_succeeded(map(), map()) :: :ok

Link to this function

scheduler_nodes_fetch_failed(measurements, metadata \\ %{})
scheduler_nodes_fetch_failed(map(), map()) :: :ok

Link to this function

scheduler_nodes_fetch_succeeded(measurements, metadata \\ %{})
scheduler_nodes_fetch_succeeded(map(), map()) :: :ok

Link to this function

scheduler_pods_fetch_failed(measurements, metadata \\ %{})
scheduler_pods_fetch_failed(map(), map()) :: :ok

Link to this function

scheduler_pods_fetch_succeeded(measurements, metadata \\ %{})
scheduler_pods_fetch_succeeded(map(), map()) :: :ok

Link to this function

task_failed(measurements, metadata \\ %{})
task_failed(map(), map()) :: :ok

Link to this function

task_initialized(measurements, metadata \\ %{})
task_initialized(map(), map()) :: :ok

Link to this function

task_registered(measurements, metadata \\ %{})
task_registered(map(), map()) :: :ok

Link to this function

task_stopped(measurements, metadata \\ %{})
task_stopped(map(), map()) :: :ok

Link to this function

task_succeeded(measurements, metadata \\ %{})
task_succeeded(map(), map()) :: :ok

Link to this function

task_unregistered(measurements, metadata \\ %{})
task_unregistered(map(), map()) :: :ok

Link to this function

watcher_chunk_received(measurements, metadata \\ %{})
watcher_chunk_received(map(), map()) :: :ok

Link to this function

watcher_genserver_down(measurements, metadata \\ %{})
watcher_genserver_down(map(), map()) :: :ok

Link to this function

watcher_initialized(measurements, metadata \\ %{})
watcher_initialized(map(), map()) :: :ok

Link to this function

watcher_watch_failed(measurements, metadata \\ %{})
watcher_watch_failed(map(), map()) :: :ok

Link to this function

watcher_watch_finished(measurements, metadata \\ %{})
watcher_watch_finished(map(), map()) :: :ok

Link to this function

watcher_watch_started(measurements, metadata \\ %{})
watcher_watch_started(map(), map()) :: :ok

Link to this function

watcher_watch_succeeded(measurements, metadata \\ %{})
watcher_watch_succeeded(map(), map()) :: :ok

Link to this function

watcher_watch_timedout(measurements, metadata \\ %{})
watcher_watch_timedout(map(), map()) :: :ok