Sibyl.Handlers (Sibyl v0.1.11)

View Source

Groups functions to make it easy to attach telemetry events to handlers

Summary

Functions

Reflects upon the state of the current application's modules and all other dynamically loaded module and attaches any events defined in those modules to the given handler.

Attaches the given events the given handler.

Reflects upon the given module and attaches any events defined in those modules to the given handler.

Types

handler()

@type handler() :: module()

Functions

attach_all_events(handler, opts \\ [])

@spec attach_all_events(handler(), Keyword.t()) :: :ok

Reflects upon the state of the current application's modules and all other dynamically loaded module and attaches any events defined in those modules to the given handler.

Any options are forwarded to the given handler also. Takes an optional, but recommended :name => String.t() option too.

attach_events(events, handler, opts \\ [])

@spec attach_events([Sibyl.Events.event()], handler(), Keyword.t()) :: :ok

Attaches the given events the given handler.

Any options are forwarded to the given handler also. Takes an optional, but recommended :name => String.t() option too.

attach_module_events(module, handler, opts \\ [])

@spec attach_module_events(module(), handler(), Keyword.t()) :: :ok

Reflects upon the given module and attaches any events defined in those modules to the given handler.

Any options are forwarded to the given handler also. Takes an optional, but recommended :name => String.t() option too.