pub struct DistributedTracer { /* private fields */ }Expand description
Distributed tracing system for monitoring pipeline execution across services
Implementations§
Source§impl DistributedTracer
impl DistributedTracer
Sourcepub fn new(config: TracingConfig) -> Self
pub fn new(config: TracingConfig) -> Self
Create a new distributed tracer
Sourcepub fn add_exporter(&mut self, exporter: Box<dyn TraceExporter>)
pub fn add_exporter(&mut self, exporter: Box<dyn TraceExporter>)
Add trace exporter
Sourcepub fn register_service(&self, service_id: &str, service_info: ServiceInfo)
pub fn register_service(&self, service_id: &str, service_info: ServiceInfo)
Register a service
Sourcepub fn start_trace(&self, operation_name: &str, service_id: &str) -> TraceHandle
pub fn start_trace(&self, operation_name: &str, service_id: &str) -> TraceHandle
Start a new root trace
Sourcepub fn start_child_span(
&self,
parent_handle: &TraceHandle,
operation_name: &str,
service_id: &str,
) -> TraceHandle
pub fn start_child_span( &self, parent_handle: &TraceHandle, operation_name: &str, service_id: &str, ) -> TraceHandle
Start a child span
Sourcepub fn get_active_spans(&self) -> Vec<TraceSpan>
pub fn get_active_spans(&self) -> Vec<TraceSpan>
Get all active spans
Sourcepub fn analyze_trace_performance(&self, trace_id: &str) -> Option<TraceAnalysis>
pub fn analyze_trace_performance(&self, trace_id: &str) -> Option<TraceAnalysis>
Analyze trace performance
Sourcepub fn export_traces(&mut self)
pub fn export_traces(&mut self)
Export traces to configured exporters
Sourcepub fn get_trace_statistics(&self) -> TraceStatistics
pub fn get_trace_statistics(&self) -> TraceStatistics
Get trace statistics
Sourcepub fn cleanup_old_traces(&self, retention_period: Duration)
pub fn cleanup_old_traces(&self, retention_period: Duration)
Clean up old completed traces
Auto Trait Implementations§
impl Freeze for DistributedTracer
impl !RefUnwindSafe for DistributedTracer
impl Send for DistributedTracer
impl Sync for DistributedTracer
impl Unpin for DistributedTracer
impl !UnwindSafe for DistributedTracer
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
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>
Converts
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>
Converts
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