pub struct Config { /* private fields */ }Expand description
Production configuration for async-inspect
Implementations§
Source§impl Config
impl Config
Sourcepub fn set_sampling_rate(&self, rate: usize)
pub fn set_sampling_rate(&self, rate: usize)
Set sampling rate (1 = track all, 10 = track 1 in 10, etc.)
Sourcepub fn sampling_rate(&self) -> usize
pub fn sampling_rate(&self) -> usize
Get current sampling rate
Sourcepub fn set_max_events(&self, max: usize)
pub fn set_max_events(&self, max: usize)
Set maximum number of events to retain
Sourcepub fn max_events(&self) -> usize
pub fn max_events(&self) -> usize
Get maximum number of events
Sourcepub fn set_max_tasks(&self, max: usize)
pub fn set_max_tasks(&self, max: usize)
Set maximum number of tasks to track
Sourcepub fn set_track_awaits(&self, enabled: bool)
pub fn set_track_awaits(&self, enabled: bool)
Enable or disable await tracking
Sourcepub fn track_awaits(&self) -> bool
pub fn track_awaits(&self) -> bool
Check if await tracking is enabled
Sourcepub fn set_track_polls(&self, enabled: bool)
pub fn set_track_polls(&self, enabled: bool)
Enable or disable poll tracking
Sourcepub fn track_polls(&self) -> bool
pub fn track_polls(&self) -> bool
Check if poll tracking is enabled
Sourcepub fn set_enable_html(&self, enabled: bool)
pub fn set_enable_html(&self, enabled: bool)
Enable or disable HTML report generation
Sourcepub fn enable_html(&self) -> bool
pub fn enable_html(&self) -> bool
Check if HTML reports are enabled
Sourcepub fn should_sample(&self) -> bool
pub fn should_sample(&self) -> bool
Decide whether to sample this task
Sourcepub fn record_overhead(&self, nanos: u64)
pub fn record_overhead(&self, nanos: u64)
Record instrumentation overhead
Sourcepub fn total_overhead_ns(&self) -> u64
pub fn total_overhead_ns(&self) -> u64
Get total overhead in nanoseconds
Sourcepub fn instrumentation_calls(&self) -> u64
pub fn instrumentation_calls(&self) -> u64
Get total instrumentation calls
Sourcepub fn avg_overhead_ns(&self) -> f64
pub fn avg_overhead_ns(&self) -> f64
Get average overhead per call in nanoseconds
Sourcepub fn production_mode(&self)
pub fn production_mode(&self)
Configure for production use (minimal overhead)
Sourcepub fn development_mode(&self)
pub fn development_mode(&self)
Configure for development use (full tracking)
Sourcepub fn debug_mode(&self)
pub fn debug_mode(&self)
Configure for debugging (maximum detail)
Sourcepub fn overhead_stats(&self) -> OverheadStats
pub fn overhead_stats(&self) -> OverheadStats
Get overhead statistics
Sourcepub fn reset_overhead(&self)
pub fn reset_overhead(&self)
Reset overhead counters
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more