class MultiSampler implements SamplerInterface

This implementation of the SamplerInterface wraps any number of child SamplerInterface implementations. All provided implementations must return true in order for the request to be sampled.

Example:

use OpenCensus\Trace\Sampler\AlwaysSampleSampler;
use OpenCensus\Trace\Sampler\MultiSampler;

$sampler = new MultiSampler([
  new AlwaysSampleSampler()
]);

Methods

__construct(array $samplers = [])

Create a new MultiSampler.

bool
shouldSample()

Returns false if any provided sampler chooses not to sample this request.

Details

at line 48
__construct(array $samplers = [])

Create a new MultiSampler.

Parameters

array $samplers The samplers to consult.

at line 59
bool shouldSample()

Returns false if any provided sampler chooses not to sample this request.

Return Value

bool