#[repr(u8)]pub enum SamplingDecision {
Sampled = 0,
Unsampled = 1,
}
Expand description
Indicates whether a sampler has decided whether or not to sample the trace associated with the Context. Downstream samplers do not need to abide by “no sample” decisions–for example, an upstream client may choose to never sample, which may not make sense for the client’s dependencies. On the other hand, if an upstream process has chosen to sample this trace, then the downstream samplers are expected to respect that decision and also sample the trace. Otherwise, the full trace would not be able to be reconstructed reliably.
Variants§
Sampled = 0
The associated span was sampled by its creating process. Child spans must also be sampled.
Unsampled = 1
The associated span was not sampled by its creating process.
Trait Implementations§
Source§impl Clone for SamplingDecision
impl Clone for SamplingDecision
Source§fn clone(&self) -> SamplingDecision
fn clone(&self) -> SamplingDecision
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SamplingDecision
impl Debug for SamplingDecision
Source§impl Default for SamplingDecision
impl Default for SamplingDecision
Source§impl<'de> Deserialize<'de> for SamplingDecision
impl<'de> Deserialize<'de> for SamplingDecision
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&SpanContext> for SamplingDecision
impl From<&SpanContext> for SamplingDecision
Source§fn from(context: &SpanContext) -> Self
fn from(context: &SpanContext) -> Self
Converts to this type from the input type.
Source§impl From<SamplingDecision> for TraceFlags
impl From<SamplingDecision> for TraceFlags
Source§fn from(decision: SamplingDecision) -> Self
fn from(decision: SamplingDecision) -> Self
Converts to this type from the input type.
Source§impl Hash for SamplingDecision
impl Hash for SamplingDecision
Source§impl PartialEq for SamplingDecision
impl PartialEq for SamplingDecision
Source§impl Serialize for SamplingDecision
impl Serialize for SamplingDecision
impl Copy for SamplingDecision
impl Eq for SamplingDecision
impl StructuralPartialEq for SamplingDecision
Auto Trait Implementations§
impl Freeze for SamplingDecision
impl RefUnwindSafe for SamplingDecision
impl Send for SamplingDecision
impl Sync for SamplingDecision
impl Unpin for SamplingDecision
impl UnwindSafe for SamplingDecision
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more