O11y.Status (O11y v0.2.5)
Struct version of the erlang record definition for the status record on a span.
The record is defined here: https://github.com/open-telemetry/opentelemetry-erlang/blob/main/apps/opentelemetry_api/include/opentelemetry.hrl#L76
Summary
Functions
Builds a status struct from the given record.
Types
Link to this type
status_record()
@type status_record() :: {:status, code :: :unset | :ok | :error, message :: String.t()}
@type t() :: %O11y.Status{code: :unset | :ok | :error, message: String.t()}
Functions
Link to this function
from_record(arg1)
@spec from_record(status_record()) :: t()
Builds a status struct from the given record.
Examples
iex> O11y.Status.from_record({:status, :error, "whoops!"})
%O11y.Status{
code: :error,
message: "whoops!"
}