ExWapp.Telemetry.Adapter behaviour (ExWapp v0.1.5)

Copy Markdown View Source

Contract for host-owned instrumentation backends.

execute/3 is required. Handler management is optional; implement attach_many/4 and detach/1 to support the corresponding helpers in ExWapp.Telemetry. The Erlang :telemetry module already has this interface.

Summary

Callbacks

attach_many(term, list, handler, term)

(optional)
@callback attach_many(term(), [[atom()]], ExWapp.Telemetry.handler(), term()) ::
  :ok | {:error, term()}

detach(term)

(optional)
@callback detach(term()) :: :ok | {:error, term()}

execute(list, map, map)

@callback execute([atom()], map(), map()) :: :ok