SamplingIntentInterface
in
The sampling preference returned by a {@see ComposableSamplerInterface}.
Tags
Table of Contents
Methods
- getAttributes() : iterable<string, mixed>
- Attributes to add to the span when it is sampled.
- getThreshold() : int
- The rejection threshold: the lower, the more likely the span is sampled (0 samples every span).
- isAdjustedCountReliable() : bool
- Whether the threshold can be used to compute the adjusted count (the reciprocal of the sampling probability, used for span to metrics estimation).
- updateTraceState() : TraceStateInterface
- Returns the TraceState of the span, given the one of the parent and the final decision. Called for every span.
Methods
getAttributes()
Attributes to add to the span when it is sampled.
public
getAttributes() : iterable<string, mixed>
Return values
iterable<string, mixed>getThreshold()
The rejection threshold: the lower, the more likely the span is sampled (0 samples every span).
public
getThreshold() : int
SamplingIntent::INVALID_THRESHOLD means that the span is dropped.
Return values
intisAdjustedCountReliable()
Whether the threshold can be used to compute the adjusted count (the reciprocal of the sampling probability, used for span to metrics estimation).
public
isAdjustedCountReliable() : bool
Return values
boolupdateTraceState()
Returns the TraceState of the span, given the one of the parent and the final decision. Called for every span.
public
updateTraceState(TraceStateInterface $parentState, bool $sampled) : TraceStateInterface
Implementations must not modify the ot entry, which is owned by the CompositeSampler.
Parameters
- $parentState : TraceStateInterface
- $sampled : bool
-
whether the final decision is RECORD_AND_SAMPLE