ComposableRuleBased
in package
implements
ComposableSamplerInterface
FinalYes
Evaluates (predicate, sampler) rules in order and returns the intent of the first matching rule.
When no rule matches the span is dropped.
Tags
Table of Contents
Interfaces
- ComposableSamplerInterface
- A sampler that returns its sampling preference (a {@see SamplingIntentInterface}) instead of a decision.
Properties
- $description : string
- $rules : array<int, PredicatedSampler>
Methods
- __construct() : mixed
- getDescription() : string
- getSamplingIntent() : SamplingIntentInterface
Properties
$description read-only
private
string
$description
$rules read-only
private
array<int, PredicatedSampler>
$rules
Methods
__construct()
public
__construct(PredicatedSampler ...$rules) : mixed
Parameters
- $rules : PredicatedSampler
getDescription()
public
getDescription() : string
Attributes
- #[Override]
Return values
stringgetSamplingIntent()
public
getSamplingIntent(ContextInterface $parentContext, string $spanName, int $spanKind, AttributesInterface $attributes, array<string|int, mixed> $links) : SamplingIntentInterface
Parameters
- $parentContext : ContextInterface
- $spanName : string
- $spanKind : int
- $attributes : AttributesInterface
- $links : array<string|int, mixed>
Attributes
- #[Override]