Recipe.Telemetry behaviour (recipe v0.5.0)
View SourceThe Recipe.Telemetry behaviour can be used to define
a module capable of handling events emitted by a recipe
run.
Each callback is invoked at different step of a recipe run, receiving data about the current step and its execution time.
Please refer to the docs for Recipe.run/3 to see how to
enable debug and telemetry information.
Summary
Callbacks
Invoked after failing to execute a step.
Invoked at the end of a recipe execution, irrespectively of the success or failure of the last executed step.
Invoked at the start of a recipe execution.
Invoked after successfully executing a step.
Types
@type elapsed_microseconds() :: integer()
Callbacks
@callback on_error(Recipe.step(), term(), Recipe.t(), elapsed_microseconds()) :: :ok
Invoked after failing to execute a step.
@callback on_finish(Recipe.t()) :: :ok
Invoked at the end of a recipe execution, irrespectively of the success or failure of the last executed step.
@callback on_start(Recipe.t()) :: :ok
Invoked at the start of a recipe execution.
@callback on_success(Recipe.step(), Recipe.t(), elapsed_microseconds()) :: :ok
Invoked after successfully executing a step.