A canonical, provider-shaped mock event derived from an observability export.
Mock events are inert local values. mock is always true, delivery is
always not_attempted, and the handoff metadata assigns any asynchronous
handling to the host application. This module has no transport operation and
mapping a value is not evidence that a provider accepted it.
Summary
Functions
Maps an exact capsule-bound export to a provider-shaped mock value.
Recomputes the entire mapping from the referenced capsule and compares it.
Types
Functions
@spec canonical_binary(term()) :: {:ok, binary()} | {:error, Insider.Protocol.Error.t()}
@spec decode(binary()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec new(Insider.Observability.Export.t(), Insider.Incident.Capsule.t(), String.t()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
Maps an exact capsule-bound export to a provider-shaped mock value.
expected_provider prevents a provider-specific adapter from accepting an
export addressed to the other provider.
@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
@spec validate_against_capsule(term(), term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
Recomputes the entire mapping from the referenced capsule and compares it.