otel_tracer behaviour (OpenTelemetry API v1.4.0)

View Source

Summary

Functions

Returns a span_ctx record with is_recording set to false and is_remote set to true. This is mainly for use in propagators when they extract a Span to be used as a parent.

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.

Types

traced_fun/1

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

Callbacks

Functions

current_span_ctx()

-spec current_span_ctx() -> opentelemetry:span_ctx() | undefined.

current_span_ctx(Ctx)

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

from_remote_span(TraceId, SpanId, Traceflags)

Returns a span_ctx record with is_recording set to false and is_remote set to true. This is mainly for use in propagators when they extract a Span to be used as a parent.

non_recording_span(TraceId, SpanId, Traceflags)

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.

set_current_span(SpanCtx)

-spec set_current_span(opentelemetry:span_ctx() | undefined) -> opentelemetry:span_ctx() | undefined.

set_current_span(Ctx, SpanCtx)

-spec set_current_span(otel_ctx:t(), opentelemetry:span_ctx() | undefined) -> otel_ctx:t().

start_span(Tracer, SpanName, Opts)

start_span(Ctx, Tracer, SpanName, Opts)

update_logger_process_metadata(Ctx)

with_span(Tracer, SpanName, Opts, Fun)

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