OpentelemetryStatifier.Oban.Handler (OpentelemetryStatifier v0.5.0)

Copy Markdown View Source

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 run id is all the event carries - and a delivery event becomes its own span linked to the arming trace. 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.

Summary

Functions

handle_event(event, measurements, metadata, config)

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