Module otel_tracer

This module defines the otel_tracer behaviour.
Required callback functions: start_span/4, with_span/5.

Data Types

traced_fun()

traced_fun(T) = fun((opentelemetry:span_ctx()) -> T)

tracer_ctx()

tracer_ctx() = term()

Function Index

current_span_ctx/0
current_span_ctx/1
from_remote_span/3Returns a span_ctx record with is_recording set to false and is_remote set to true.
non_recording_span/3Returns a span_ctx record with is_recording set to false.
set_current_span/1
set_current_span/2
start_span/3
start_span/4
with_span/4
with_span/5

Function Details

current_span_ctx/0

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

current_span_ctx/1

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

from_remote_span/3

from_remote_span(TraceId::opentelemetry:trace_id(), SpanId::opentelemetry:span_id(), Traceflags::opentelemetry:trace_flags()) -> opentelemetry:span_ctx()

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/3

non_recording_span(TraceId::opentelemetry:trace_id(), SpanId::opentelemetry:span_id(), Traceflags::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.

set_current_span/1

set_current_span(SpanCtx::opentelemetry:span_ctx() | undefined) -> opentelemetry:span_ctx() | undefined

set_current_span/2

set_current_span(Ctx::otel_ctx:t(), SpanCtx::opentelemetry:span_ctx() | undefined) -> otel_ctx:t() | undefined

start_span/3

start_span(Tracer::opentelemetry:tracer(), SpanName::opentelemetry:span_name(), Opts::otel_span:start_opts()) -> opentelemetry:span_ctx()

start_span/4

start_span(Ctx::otel_ctx:t(), Tracer::opentelemetry:tracer(), SpanName::opentelemetry:span_name(), Opts::otel_span:start_opts()) -> opentelemetry:span_ctx()

with_span/4

with_span(Tracer::opentelemetry:tracer(), SpanName::opentelemetry:span_name(), Opts::otel_span:start_opts(), Fun::traced_fun(T)) -> T

with_span/5

with_span(Ctx::otel_ctx:t(), Tracer::opentelemetry:tracer(), SpanName::opentelemetry:span_name(), Opts::otel_span:start_opts(), Fun::traced_fun(T)) -> T


Generated by EDoc