This module defines the otel_sampler behaviour.
Required callback functions: setup/2.
description() = unicode:unicode_binary()
sampler() = {fun((otel_ctx:t(), opentelemetry:trace_id(), opentelemetry:links(), opentelemetry:span_name(), opentelemetry:kind(), opentelemetry:attributes(), term()) -> sampling_result()), description(), term()}
sampling_decision() = '?DROP' | '?RECORD_ONLY' | '?RECORD_AND_SAMPLE'
sampling_result() = {sampling_decision(), opentelemetry:attributes(), opentelemetry:tracestate()}
abstract datatype: t()
always_off/7 | |
always_on/7 | |
get_description/1 | |
parent_based/7 | |
setup/1 | |
trace_id_ratio_based/7 |
always_off(Ctx, TraceId, Links, SpanName, Kind, Attributes, Opts) -> any()
always_on(Ctx, TraceId, Links, SpanName, Kind, Attributes, Opts) -> any()
get_description(X1::sampler()) -> description()
parent_based(Ctx, TraceId, Links, SpanName, Kind, Attributes, Opts) -> any()
setup(Sampler::atom() | {atom() | module(), term()}) -> t()
trace_id_ratio_based(Ctx, TraceId, X3, X4, X5, X6, IdUpperBound) -> any()
Generated by EDoc