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

t()

@type t() :: [O11y.Link.t()]

Functions

from_record(arg1)

@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: []
}]