# `OpentelemetryStatifier.Oban.Handler`
[🔗](https://github.com/riddler/opentelemetry_statifier/blob/v0.10.0/lib/opentelemetry_statifier/oban/handler.ex#L1)

The `:telemetry` handler attached to every name
`OpentelemetryStatifier.Oban.events/0` returns.

Two clauses do the whole family, because the contract has no pairs and
only two *shapes*: a scheduling event lands on the span open in the
emitting process - the macrostep span when the session is stepping
there, the durable driver's step span when a durable execution id is all the
event carries - and a delivery event becomes its own span, a root that
links to the arming trace through `caller_context` when the event
carries one. The timer seam's `:fired` and `:discarded` carry it. The
invoke seam's delivery kinds - `:delivered`, `:discarded`, `:failed`
and `:deferred` - carry no `caller_context`, so each of those stays an
unlinked root, correlated by `statifier.session_id`. The fan-out seam
adds names, not a third shape:
`:fan_out` and `:child_started` fire inside Oban jobs carrying
`caller_context` and so are delivery-shaped, while
`:unstarted_cancelled` carries none, fires synchronously from the
sweep, and is scheduling-shaped. The defensive posture is
`OpentelemetryStatifier.Handler`'s - no `try`/`rescue`, exhaustive
clauses, a catch-all that drops rather than raises inside a host's Oban
worker.

# `handle_event`

```elixir
@spec handle_event(
  :telemetry.event_name(),
  map(),
  map(),
  OpentelemetryStatifier.Config.t()
) :: :ok
```

---

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