Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
attributes: Optional[Attributes] = None, # TODO
links: Sequence["Link"] = (),
) -> "Decision":
if parent_context is not None:
return Decision(parent_context.trace_options.sampled)
return Decision(trace_id & self.CHECK_BYTES < self.bound)
# Samplers that ignore the parent sampling decision and never/always sample.
ALWAYS_OFF = StaticSampler(Decision(False))
ALWAYS_ON = StaticSampler(Decision(True))
# Samplers that respect the parent sampling decision, but otherwise
# never/always sample.
DEFAULT_OFF = ProbabilitySampler(0.0)
DEFAULT_ON = ProbabilitySampler(1.0)
links: Sequence["Link"] = (),
) -> "Decision":
if parent_context is not None:
return Decision(parent_context.trace_options.sampled)
return Decision(trace_id & self.CHECK_BYTES < self.bound)
# Samplers that ignore the parent sampling decision and never/always sample.
ALWAYS_OFF = StaticSampler(Decision(False))
ALWAYS_ON = StaticSampler(Decision(True))
# Samplers that respect the parent sampling decision, but otherwise
# never/always sample.
DEFAULT_OFF = ProbabilitySampler(0.0)
DEFAULT_ON = ProbabilitySampler(1.0)