Flow PHP

ParentBasedSampler implements Sampler

Read onlyYes
FinalYes

Interfaces

Sampler

Methods

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

Methods

__construct()

public __construct(Sampler $rootSampler[, null|Sampler $remoteParentSampled = null ][, null|Sampler $remoteParentNotSampled = null ][, null|Sampler $localParentSampled = null ][, null|Sampler $localParentNotSampled = null ]) : mixed
Parameters
$rootSampler : Sampler

Sampler to use for root spans (no parent)

$remoteParentSampled : null|Sampler = null

Sampler for remote sampled parents (default: AlwaysOnSampler)

$remoteParentNotSampled : null|Sampler = null

Sampler for remote non-sampled parents (default: AlwaysOffSampler)

$localParentSampled : null|Sampler = null

Sampler for local sampled parents (default: AlwaysOnSampler)

$localParentNotSampled : null|Sampler = null

Sampler for local non-sampled parents (default: AlwaysOffSampler)

__toString()

Get a string representation of this sampler for debugging.

public __toString() : string

Examples:

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

Search results