ComposableAnnotating
in package
implements
ComposableSamplerInterface
FinalYes
Delegates the decision to another composable sampler and adds attributes to sampled spans.
Attributes of the delegate are kept; on a key conflict the attributes of this sampler win.
Tags
Table of Contents
Interfaces
- ComposableSamplerInterface
- A sampler that returns its sampling preference (a {@see SamplingIntentInterface}) instead of a decision.
Properties
- $attributes : array<string|int, mixed>
- $delegate : ComposableSamplerInterface
- $description : string
Methods
- __construct() : mixed
- getDescription() : string
- getSamplingIntent() : SamplingIntentInterface
Properties
$attributes read-only
private
array<string|int, mixed>
$attributes
$delegate read-only
private
ComposableSamplerInterface
$delegate
$description read-only
private
string
$description
Methods
__construct()
public
__construct(array<non-empty-string, mixed> $attributes, ComposableSamplerInterface $delegate) : mixed
Parameters
- $attributes : array<non-empty-string, mixed>
-
Attributes to add to sampled spans
- $delegate : ComposableSamplerInterface
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]