sage v0.2.0 Sage.Tracer behaviour
This module provides behaviour for Sage tracers.
Tracing module is called before and after each transaction or compensation. For asynchronous operations this hook is triggered after awaiting for started transactions.
Hooks State
All hooks share their state, which by default contains options passed to execute/2
function.
This is useful if you want to persist timer of execution start and then persist it somewhere.
Altering this state won’t affect Sage execution in any way, changes would be visible only to other tracing calls.
Link to this section Summary
Callbacks
Handler for Sage execution event
Link to this section Types
Link to this type
action()
action() :: :start_transaction | :finish_transaction | :start_compensation | :finish_compensation
Link to this section Callbacks
Link to this callback
handle_event(name, action, state)
Handler for Sage execution event.
It receives name of Sage execution stage, type of event (see action/0
)
and state shared for all tracing calls (see “Hooks State” in module doc).
Returns updated state.