Orchid.Runner.Hooks.Telemetry (Orchid v0.6.1)

Copy Markdown View Source

Summary

Functions

Callback implementation for Orchid.Runner.Hook.call/2.

A helper error handler for Telemetry step exceptions.

Functions

call(ctx, next)

Callback implementation for Orchid.Runner.Hook.call/2.

error_handler(list, measurements, meta, config)

A helper error handler for Telemetry step exceptions.

When you want to log step exceptions, you can attach this handler to the [:orchid, :step, :exception] event.

Example

# In iex.exs or your application startup
:telemetry.attach(
  "orchid-step-exception-logger",
  [:orchid, :step, :exception],
  &Orchid.Runner.Hooks.Telemetry.error_handler/4,
  %{}
)