Flow PHP

Sampler

Methods

__toString()  : string
Get a string representation of this sampler for debugging.
shouldSample()  : SamplingResult
Determine if a span should be sampled.

Methods

__toString()

Get a string representation of this sampler for debugging.

public __toString() : string

Examples:

  • "AlwaysOnSampler"
  • "TraceIdRatioBasedSampler{0.001}"
  • "ParentBased{root=AlwaysOnSampler}"
Return values
string

shouldSample()

Determine if a span should be sampled.

public shouldSample(Context $parentContext, Span $span) : SamplingResult
Parameters
$parentContext : Context

The parent context of the span to be created

$span : Span

The span to evaluate for sampling

Return values
SamplingResult —

The sampling decision

On this page

Search results