Optional OpenTelemetry bridge for Accrue telemetry spans.
The module is always available, but calls into OpenTelemetry only when
OpenTelemetry.Tracer is loaded. Without the optional dependency, span/3
executes the passed function unchanged and emits no compiler warnings.
Summary
Functions
Returns the allowlisted, PII-free OpenTelemetry attributes for metadata.
Wraps fun in an OpenTelemetry span when the optional dependency is loaded.
Converts an Accrue telemetry event name to the dotted OTel span name.
Types
@type event_name() :: [atom()]
Functions
Returns the allowlisted, PII-free OpenTelemetry attributes for metadata.
@spec span(event_name(), map(), (-> result)) :: result when result: var
Wraps fun in an OpenTelemetry span when the optional dependency is loaded.
@spec span_name(event_name()) :: String.t()
Converts an Accrue telemetry event name to the dotted OTel span name.