O11y.Links (O11y v0.2.10)
Struct version of the erlang record definition for the links record on a span.
The record is defined here: https://github.com/open-telemetry/opentelemetry-erlang/blob/main/apps/opentelemetry/src/otel_links.erl#L27
Summary
Functions
Builds a list of link structs from the given record.
Types
@type links_record() :: {:links, count_limit :: integer(), count_limit :: integer(), attribute_value_length_limit :: integer() | :infinity, dropped :: integer(), list :: [O11y.Link.link_record()]} | :undefined
@type t() :: [O11y.Link.t()]
Functions
@spec from_record(links_record()) :: t()
Builds a list of link structs from the given record.
Examples
iex> O11y.Links.from_record({:links, 128, 128, :infinity, 0, [{:link, 128, 128, {:attributes, 128, :infinity, 0, %{key: "value"}}, []}]})
[%O11y.Link{
trace_id: 128,
span_id: 128,
attributes: %{key: "value"},
tracestate: []
}]