Module ot_span

Span behaviour.

This module defines the ot_span behaviour.
Required callback functions: get_ctx/1, set_attribute/3, set_attributes/2, add_event/3, add_events/2, set_status/2, update_name/2.

Data Types

start_opts()


start_opts() = #{parent => undefined | opentelemetry:span() | opentelemetry:span_ctx(), attributes => opentelemetry:attributes(), sampler => ot_sampler:sampler(), links => opentelemetry:links(), is_recording => boolean(), start_time => opentelemetry:timestamp(), kind => opentelemetry:span_kind()}

Function Index

add_event/4
add_events/3
get_ctx/2
is_recording/2
set_attribute/4
set_attributes/3
set_status/3
update_name/3

Function Details

add_event/4


add_event(Tracer, SpanCtx, Name, Attributes) -> boolean()

add_events/3


add_events(Tracer, SpanCtx, Events) -> boolean()

get_ctx/2


get_ctx(Tracer, Span) -> SpanCtx

is_recording/2


is_recording(Tracer, SpanCtx) -> boolean()

set_attribute/4


set_attribute(Tracer, SpanCtx, Key, Value) -> boolean()

set_attributes/3


set_attributes(Tracer, SpanCtx, Attributes) -> boolean()

set_status/3


set_status(Tracer, SpanCtx, Status) -> boolean()

update_name/3


update_name(Tracer, SpanCtx, Name) -> boolean()