View Source Sibyl.Handlers (Sibyl v0.1.7)

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

Link to this section 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.

Link to this section Types

@type handler() :: module()

Link to this section Functions

Link to this function

attach_all_events(handler, opts \\ [])

View Source
@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.

Link to this function

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

View Source
@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.

Link to this function

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

View Source
@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.