otel_tracer behaviour (opentelemetry_api v1.0.0-rc.2)

Link to this section Summary

Link to this section Types

Link to this type

traced_fun/1

Specs

traced_fun(T) :: fun((opentelemetry:span_ctx()) -> T).
Link to this type

tracer_ctx/0

Specs

tracer_ctx() :: term().

Link to this section Functions

Link to this function

add_event(Name, Attributes)

Specs

add_event(Name, Attributes) -> boolean()
             when Name :: opentelemetry:event_name(), Attributes :: opentelemetry:attributes().
Link to this function

add_events(Events)

Specs

add_events(Events) -> boolean() when Events :: opentelemetry:events().
Link to this function

current_span_ctx()

Specs

current_span_ctx() -> opentelemetry:span_ctx() | undefined.
Link to this function

current_span_ctx(Ctx)

Specs

current_span_ctx(otel_ctx:t()) -> opentelemetry:span_ctx() | undefined.

Specs

end_span() -> opentelemetry:span_ctx().
Link to this function

non_recording_span(TraceId, SpanId, Traceflags)

Specs

non_recording_span(opentelemetry:trace_id(), opentelemetry:span_id(), opentelemetry:trace_flags()) ->
                      opentelemetry:span_ctx().
Returns a span_ctx record with is_recording set to false. This is mainly for use in propagators when they extract a Span to be used as a parent.
Link to this function

set_attribute(Key, Value)

Specs

set_attribute(Key, Value) -> boolean()
                 when
                     Key :: opentelemetry:attribute_key(),
                     Value :: opentelemetry:attribute_value().
Link to this function

set_attributes(Attributes)

Specs

set_attributes(Attributes) -> boolean() when Attributes :: opentelemetry:attributes().
Link to this function

set_current_span(SpanCtx)

Specs

set_current_span(opentelemetry:span_ctx() | undefined) -> ok.
Link to this function

set_current_span(Ctx, SpanCtx)

Specs

set_current_span(otel_ctx:t(), opentelemetry:span_ctx() | undefined) -> otel_ctx:t() | undefined.
Link to this function

set_status(Status)

Specs

set_status(Status) -> boolean() when Status :: opentelemetry:status().
Link to this function

start_span(Tracer, Name, Opts)

Specs

start_span(opentelemetry:tracer(), opentelemetry:span_name(), otel_span:start_opts()) ->
              opentelemetry:span_ctx().
Link to this function

start_span(Ctx, Tracer, Name, Opts)

Specs

start_span(otel_ctx:t(),
           opentelemetry:tracer(),
           opentelemetry:span_name(),
           otel_span:start_opts()) ->
              opentelemetry:span_ctx().
Link to this function

text_map_propagators(Module)

Specs

text_map_propagators(module()) ->
                        {otel_propagator:text_map_extractor(),
                         otel_propagator:text_map_injector()}.
Link to this function

update_name(Name)

Specs

update_name(Name) -> boolean() when Name :: opentelemetry:span_name().
Link to this function

with_span(Tracer, SpanName, Opts, Fun)

Specs

with_span(opentelemetry:tracer(),
          opentelemetry:span_name(),
          otel_span:start_opts(),
          traced_fun(T)) ->
             T.
Link to this function

with_span(Ctx, Tracer, SpanName, Opts, Fun)

Specs

with_span(otel_ctx:t(),
          opentelemetry:tracer(),
          opentelemetry:span_name(),
          otel_span:start_opts(),
          traced_fun(T)) ->
             T.

Link to this section Callbacks

Specs

start_span(otel_ctx:t(),
           opentelemetry:tracer(),
           opentelemetry:span_name(),
           otel_span:start_opts()) ->
              opentelemetry:span_ctx().

Specs

with_span(otel_ctx:t(),
          opentelemetry:tracer(),
          opentelemetry:span_name(),
          otel_span:start_opts(),
          traced_fun(T)) ->
             T.