# `Mobus.Stepwise.Telemetry`
[🔗](https://github.com/fosferon/mobus_stepwise/blob/main/lib/mobus/stepwise/telemetry.ex#L1)

Telemetry integration for the stepwise engine.

All engine lifecycle phases emit `:telemetry` span events
(`:start`, `:stop`, `:exception` suffixes).

## Engine spans

  * `[:mobus_stepwise, :engine, :init]`
  * `[:mobus_stepwise, :engine, :handle_event]`
  * `[:mobus_stepwise, :engine, :restore]`

## Pipeline events

  * `[:mobus_stepwise, :pipeline, :action, :start | :stop | :exception]`

## Metadata

All events include:

  * `:execution_id`
  * `:tenant_id`
  * `:current_state`
  * `:meta` — the full orchestration metadata map

Engine `handle_event` spans also include:

  * `:event` — the event name
  * `:status` — outcome (`:ok`, `:wait`, `:error`)

## Example

    :telemetry.attach(
      "my-handler",
      [:mobus_stepwise, :engine, :handle_event, :stop],
      fn _event, measurements, metadata, _config ->
        Logger.info("Event processed in #{measurements.duration}ns")
      end,
      nil
    )

# `events`

```elixir
@spec events() :: [[atom()]]
```

Returns all telemetry event prefixes emitted by the engine.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
