The types defined here, and referencing records in opentelemetry.hrl are used to store trace information while being collected on the Erlang node.
Thus, while the types are based on protos found in the opentelemetry-proto repo: src/opentelemetry/proto/trace/v1/trace.proto, they are not exact translations because further processing is done after the span has finished and can be vendor specific. For example, there is no count of the number of dropped attributes in the span record. And an attribute's value can be a function to only evaluate the value if it is actually used (at the time of exporting). And the stacktrace is a regular Erlang stack trace.attribute() = {attribute_key(), attribute_value()}
attribute_key() = unicode:unicode_binary() | atom()
attribute_value() = unicode:unicode_binary() | atom() | number() | boolean() | [unicode:unicode_binary() | atom() | float() | integer() | boolean()] | {unicode:unicode_binary() | atom() | float() | integer() | boolean()}
attributes_map() = #{attribute_key() => attribute_value()} | [attribute()]
event() = #{system_time_nano => non_neg_integer(), name := event_name(), attributes := attributes_map()}
event_name() = unicode:unicode_binary() | atom()
hex_span_id() = binary()
hex_trace_id() = binary()
instrumentation_library() = #instrumentation_library{}
link() = #{trace_id := trace_id(), span_id := span_id(), attributes := attributes_map(), tracestate := tracestate()}
resource() = #{unicode:unicode_binary() => unicode:unicode_binary()}
span() = term()
span_ctx() = #span_ctx{}
span_id() = non_neg_integer()
span_kind() = '?SPAN_KIND_INTERNAL' | '?SPAN_KIND_SERVER' | '?SPAN_KIND_CLIENT' | '?SPAN_KIND_PRODUCER' | '?SPAN_KIND_CONSUMER'
span_name() = unicode:unicode_binary() | atom()
status() = #status{}
status_code() = '?OTEL_STATUS_UNSET' | '?OTEL_STATUS_OK' | '?OTEL_STATUS_ERROR'
text_map() = [{unicode:unicode_binary(), unicode:unicode_binary()}]
timestamp() = integer()
trace_flags() = non_neg_integer()
trace_id() = non_neg_integer()
tracer() = {module(), term()}
tracestate() = [{unicode:latin1_chardata(), unicode:latin1_chardata()}]
convert_timestamp/2 | Convert a native monotonic timestamp to POSIX time of any erlang:time_unit() . |
create_application_tracers/1 | |
event/2 | |
event/3 | |
events/1 | |
get_application/1 | |
get_application_tracer/1 | |
get_text_map_extractor/0 | |
get_text_map_injector/0 | |
get_tracer/0 | |
get_tracer/1 | |
get_tracer/3 | |
instrumentation_library/3 | |
link/1 | |
link/2 | |
link/4 | |
links/1 | |
set_default_tracer/1 | |
set_text_map_extractor/1 | |
set_text_map_injector/1 | |
set_text_map_propagator/1 | |
set_tracer/2 | |
status/2 | |
timestamp/0 | A monotonically increasing time provided by the Erlang runtime system in the native time unit. |
timestamp_to_nano/1 | Convert a native monotonic timestamp to nanosecond POSIX time. |
verify_and_set_term/3 |
convert_timestamp(Timestamp::timestamp(), Unit::erlang:time_unit()) -> integer()
Convert a native monotonic timestamp to POSIX time of any erlang:time_unit()
.
Meaning the time since Epoch. Epoch is defined to be 00:00:00 UTC, 1970-01-01.
create_application_tracers(Applications::[{Application, Description, Vsn}]) -> ok
event(Timestamp, Name, Attributes) -> event() | undefined
events(List) -> any()
get_application(ModuleName::module()) -> ApplicationTuple
get_application_tracer(ModuleName::module()) -> tracer()
get_text_map_extractor() -> any()
get_text_map_injector() -> any()
get_tracer() -> tracer()
get_tracer(Name) -> Tracer
get_tracer(Name, Vsn, SchemaUrl) -> Tracer
instrumentation_library(Name, Vsn, SchemaUrl) -> any()
link(SpanCtx::span_ctx() | undefined) -> link()
link(Span_ctx::span_ctx() | undefined, Attributes::attributes_map()) -> link()
link(TraceId, SpanId, Attributes, TraceState) -> link() | undefined
links(List::[{TraceId, SpanId, Attributes, TraceState} | span_ctx() | {span_ctx(), Attributes}]) -> [link()]
set_default_tracer(Tracer::tracer()) -> boolean()
set_text_map_extractor(Propagator) -> any()
set_text_map_injector(Propagator) -> any()
set_text_map_propagator(Propagator) -> any()
set_tracer(Name::atom(), Tracer::tracer()) -> boolean()
status(Code, Message) -> status() | undefined
timestamp() -> integer()
A monotonically increasing time provided by the Erlang runtime system in the native time unit. This value is the most accurate and precise timestamp available from the Erlang runtime and should be used for finding durations or any timestamp that can be converted to a system time before being sent to another system.
timestamp_to_nano(Timestamp::timestamp()) -> integer()
Convert a native monotonic timestamp to nanosecond POSIX time. Meaning the time since Epoch. Epoch is defined to be 00:00:00 UTC, 1970-01-01.
verify_and_set_term(Module::module() | {module(), term()}, TermKey::term(), Behaviour::atom()) -> boolean()
Generated by EDoc