AITrace.Identifier (AITrace v0.2.0)

Copy Markdown View Source

AITrace-owned identifier policy for generated ids and imported aliases.

Generated ids keep the existing 32-character lowercase hex shape for API compatibility. Caller-supplied ids are accepted only as bounded external aliases so proof consumers can distinguish generated ids from imports.

Summary

Types

id_type()

@type id_type() :: :trace | :span

source_kind()

@type source_kind() :: :aitrace_generated | :external_alias

Functions

generate(id_type)

@spec generate(id_type()) :: String.t()

parent_span_source!(parent_span_id)

@spec parent_span_source!(String.t()) :: map()

source!(id_type, id, atom)

@spec source!(id_type(), String.t(), source_kind()) :: map()