View Source otel_tracer behaviour (opentelemetry_api v1.1.1)
Link to this section 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.Link to this section Types
-type traced_fun(T) :: fun((opentelemetry:span_ctx()) -> T).
Link to this section Callbacks
-callback start_span(otel_ctx:t(), opentelemetry:tracer(), opentelemetry:span_name(), otel_span:start_opts()) -> opentelemetry:span_ctx().
-callback with_span(otel_ctx:t(), opentelemetry:tracer(), opentelemetry:span_name(), otel_span:start_opts(), traced_fun(T)) -> T.
Link to this section Functions
-spec current_span_ctx() -> opentelemetry:span_ctx() | undefined.
-spec current_span_ctx(otel_ctx:t()) -> opentelemetry:span_ctx() | undefined.
-spec from_remote_span(opentelemetry:trace_id(), opentelemetry:span_id(), opentelemetry:trace_flags()) -> opentelemetry:span_ctx().
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.
-spec non_recording_span(opentelemetry:trace_id(), opentelemetry:span_id(), opentelemetry:trace_flags()) -> opentelemetry:span_ctx().
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.
-spec set_current_span(opentelemetry:span_ctx() | undefined) -> opentelemetry:span_ctx() | undefined.
-spec set_current_span(otel_ctx:t(), opentelemetry:span_ctx() | undefined) -> otel_ctx:t().
-spec start_span(opentelemetry:tracer(), opentelemetry:span_name(), otel_span:start_opts()) -> opentelemetry:span_ctx().
-spec start_span(otel_ctx:t(), opentelemetry:tracer(), opentelemetry:span_name(), otel_span:start_opts()) -> opentelemetry:span_ctx().
-spec with_span(opentelemetry:tracer(), opentelemetry:span_name(), otel_span:start_opts(), traced_fun(T)) -> T.
-spec with_span(otel_ctx:t(), opentelemetry:tracer(), opentelemetry:span_name(), otel_span:start_opts(), traced_fun(T)) -> T.