pub struct ParentBasedSampler { /* private fields */ }Expand description
基于父 span 的采样器。
采样策略:
- 根 span(parent_sampled = None):使用内部 root sampler 决策
- 有父 span:遵循父 span 的采样标志
Implementations§
Source§impl ParentBasedSampler
impl ParentBasedSampler
Sourcepub fn always_on_root() -> Self
pub fn always_on_root() -> Self
使用 AlwaysOn 作为根采样器的便捷构造
Sourcepub fn ratio_root(ratio: f64) -> Self
pub fn ratio_root(ratio: f64) -> Self
使用 TraceIdRatio 作为根采样器的便捷构造
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ParentBasedSampler
impl !UnwindSafe for ParentBasedSampler
impl Freeze for ParentBasedSampler
impl Send for ParentBasedSampler
impl Sync for ParentBasedSampler
impl Unpin for ParentBasedSampler
impl UnsafeUnpin for ParentBasedSampler
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