instrument_sampler_always_off (instrument v1.0.0)

View Source

Always-off sampler that drops every span.

This sampler returns drop for all spans, meaning no spans will be recorded or exported.

Summary

Functions

get_description(Config)

-spec get_description(Config :: map()) -> binary().

Returns the sampler description.

should_sample(Config, TraceId, SpanName, SpanKind, Attributes, Links, ParentCtx)

-spec should_sample(Config :: map(),
                    TraceId :: binary(),
                    SpanName :: binary(),
                    SpanKind :: atom(),
                    Attributes :: map(),
                    Links :: list(),
                    ParentCtx ::
                        #span_ctx{trace_id :: <<_:128>> | undefined,
                                  span_id :: <<_:64>> | undefined,
                                  trace_flags :: 0 | 1,
                                  trace_state :: [{binary(), binary()}],
                                  is_remote :: boolean()} |
                        undefined) ->
                       #sampling_result{decision :: drop | record_only | record_and_sample,
                                        attributes :: map(),
                                        trace_state :: [{binary(), binary()}]}.

Always returns drop.