O11y.Attributes (O11y v0.2.10)

This is more of a convenience module since the attributes that the record wraps are a plain map.

The record is defined here: https://github.com/open-telemetry/opentelemetry-erlang/blob/c1ccdffb11253f5da63146a6c014db41bb4b27cc/apps/opentelemetry_api/src/otel_attributes.erl#L37

Summary

Functions

Builds a map from the given attribute record.

Types

attributes_record()

@type attributes_record() ::
  {:attributes, count_limit :: integer(),
   value_length_limit :: integer() | :infinity, dropped :: integer(),
   map :: map()}

t()

@type t() :: map()

Functions

from_record(arg1)

@spec from_record(attributes_record()) :: t()

Builds a map from the given attribute record.

Examples

iex> O11y.Attributes.from_record({:attributes, 128, :infinity, 0, %{key: "value"}})
%{key: "value"}

is_otlp_value(value)

(macro)

to_record(attributes)

@spec to_record(t()) :: attributes_record()