[−][src]Trait opentelemetry::api::trace::sampler::Sampler
The Sampler
interface allows implementations to provide samplers which will
return a sampling SamplingResult
based on information that is typically
available just before the Span
was created.
Required methods
fn should_sample(
&self,
parent_context: Option<&SpanContext>,
trace_id: TraceId,
name: &str,
span_kind: &SpanKind,
attributes: &[KeyValue],
links: &[Link]
) -> SamplingResult
&self,
parent_context: Option<&SpanContext>,
trace_id: TraceId,
name: &str,
span_kind: &SpanKind,
attributes: &[KeyValue],
links: &[Link]
) -> SamplingResult
Returns the SamplingDecision
for a Span
to be created.
Implementors
impl Sampler for Sampler
[src]
fn should_sample(
&self,
parent_context: Option<&SpanContext>,
trace_id: TraceId,
_name: &str,
_span_kind: &SpanKind,
_attributes: &[KeyValue],
_links: &[Link]
) -> SamplingResult
[src]
&self,
parent_context: Option<&SpanContext>,
trace_id: TraceId,
_name: &str,
_span_kind: &SpanKind,
_attributes: &[KeyValue],
_links: &[Link]
) -> SamplingResult