View Source otel_resource (opentelemetry v1.4.0)

A Resource is attributes representing the entity producing telemetry. For example, by default the language (Erlang), name of this library (opentelemetry) and version of this library are included in the Resource.

This module provides the functional interface for working with the resource record.

Link to this section Summary


values allowed in attributes of a resource are limited

Link to this section Types

-type key() :: unicode:latin1_binary() | atom().
values allowed in attributes of a resource are limited
-type schema_url() :: uri_string:uri_string().
-type t() :: #resource{} | undefined.
-type value() :: unicode:latin1_binary() | integer() | float() | boolean().

Link to this section Functions

-spec attributes(t()) -> otel_attributes:t() | undefined.
-spec create(#{key() => value()} | [{key(), value()}]) -> t().
-spec create(#{key() => value()} | [{key(), value()}], schema_url() | undefined) -> t().
-spec is_key(key(), t()) -> boolean().
Link to this function

merge(Resource, Current)

View Source
-spec merge(t(), t()) -> t().
-spec schema_url(t()) -> schema_url() | undefined.