O11y.Link (O11y v0.2.10)
Struct version of the erlang record definition for a link.
The record is defined here: https://github.com/open-telemetry/opentelemetry-erlang/blob/main/apps/opentelemetry/include/otel_span.hrl#L74
Summary
Functions
Builds a link struct from the given record.
Types
@type link_record() :: {:link, trace_id :: integer(), span_id :: integer(), attributes :: O11y.Attributes.attributes_record(), tracestate :: [tuple()] | :undefined}
@type t() :: %O11y.Link{ attributes: O11y.Attributes.t(), span_id: integer(), trace_id: integer(), tracestate: [tuple()] | :undefined }
Functions
@spec from_record(link_record()) :: t()
Builds a link struct from the given record.
Examples
iex> O11y.Link.from_record({:link, 128, 128, {:attributes, 128, :infinity, 0, %{key: "value"}}, []})
%O11y.Link{
trace_id: 128,
span_id: 128,
attributes: %{key: "value"},
tracestate: []
}