A behaviour for implementing tracing for an Ash application.
Summary
Callbacks
Set metadata for the current span.
Types
@type span_type() :: :action | :bulk_create | :bulk_update | :bulk_destroy | :bulk_batch | :changeset | :query | :calculate | :request_step | :change | :validation | :preparation | :custom | :notifier | :before_transaction | :before_action | :after_transaction | :after_action | {:custom, atom()}
@type t() :: module()
Callbacks
@callback get_span_context() :: term()
@callback set_error(Exception.t()) :: :ok
@callback set_error(Exception.t(), Keyword.t()) :: :ok
@callback set_handled_error(Exception.t(), Keyword.t()) :: :ok
Set metadata for the current span.
This may be called multiple times per span, and should ideally merge with previous metadata.
@callback set_span_context(term()) :: :ok
@callback stop_span() :: :ok