opentelemetry.trace.sampling¶
-
class
opentelemetry.trace.sampling.Decision(sampled=False, attributes=None)[source]¶ Bases:
objectA sampling decision as applied to a newly-created Span.
- Parameters
sampled (
bool) – Whether theopentelemetry.trace.Spanshould be sampled.attributes (
Optional[Mapping[str,Union[str,bool,int,float,Sequence[str],Sequence[bool],Sequence[int],Sequence[float]]]]) – Attributes to add to theopentelemetry.trace.Span.
-
class
opentelemetry.trace.sampling.StaticSampler(decision)[source]¶ Bases:
opentelemetry.trace.sampling.SamplerSampler that always returns the same decision.