Imp.Telemetry (Imp v0.5.0)

Copy Markdown View Source

Small telemetry boundary for Imp runtime events.

Imp telemetry metadata is redacted before it reaches :telemetry, so traces can stay useful without leaking provider credentials. span/3 emits event_prefix ++ [:start], then either [:stop] with a result status or [:exception] before re-raising the original failure. The exception event's metadata carries :kind, :reason and :stacktrace, as :telemetry.span/3 does: for a raise, kind is :error and reason the exception struct. Every span carries a stable :call_id; nested spans carry :parent_call_id, and ordinary events emitted inside a span inherit its :call_id.