pub struct DistributedTraceCollector { /* private fields */ }Expand description
Distributed trace collector for NAT traversal operations
Implementations§
Source§impl DistributedTraceCollector
impl DistributedTraceCollector
Sourcepub async fn new(config: TracingConfig) -> Result<Self, MonitoringError>
pub async fn new(config: TracingConfig) -> Result<Self, MonitoringError>
Create new distributed trace collector
Sourcepub async fn start(&self) -> Result<(), MonitoringError>
pub async fn start(&self) -> Result<(), MonitoringError>
Start tracing system
Sourcepub async fn stop(&self) -> Result<(), MonitoringError>
pub async fn stop(&self) -> Result<(), MonitoringError>
Stop tracing system
Sourcepub async fn start_nat_trace(
&self,
attempt: &NatTraversalAttempt,
) -> Result<TraceId, MonitoringError>
pub async fn start_nat_trace( &self, attempt: &NatTraversalAttempt, ) -> Result<TraceId, MonitoringError>
Start NAT traversal trace
Sourcepub async fn complete_nat_trace(
&self,
result: &NatTraversalResult,
) -> Result<(), MonitoringError>
pub async fn complete_nat_trace( &self, result: &NatTraversalResult, ) -> Result<(), MonitoringError>
Complete NAT traversal trace
Sourcepub async fn add_span(
&self,
attempt_id: &str,
span_name: &str,
parent_span_id: Option<SpanId>,
attributes: HashMap<String, AttributeValue>,
) -> Result<SpanId, MonitoringError>
pub async fn add_span( &self, attempt_id: &str, span_name: &str, parent_span_id: Option<SpanId>, attributes: HashMap<String, AttributeValue>, ) -> Result<SpanId, MonitoringError>
Add span to existing trace
Sourcepub async fn add_event(
&self,
attempt_id: &str,
span_id: &SpanId,
event_type: TraceEventType,
attributes: HashMap<String, AttributeValue>,
) -> Result<(), MonitoringError>
pub async fn add_event( &self, attempt_id: &str, span_id: &SpanId, event_type: TraceEventType, attributes: HashMap<String, AttributeValue>, ) -> Result<(), MonitoringError>
Add event to trace
Sourcepub async fn complete_span(
&self,
attempt_id: &str,
span_id: &SpanId,
status: SpanStatus,
) -> Result<(), MonitoringError>
pub async fn complete_span( &self, attempt_id: &str, span_id: &SpanId, status: SpanStatus, ) -> Result<(), MonitoringError>
Complete span in trace
Sourcepub async fn get_status(&self) -> String
pub async fn get_status(&self) -> String
Get trace status
Auto Trait Implementations§
impl Freeze for DistributedTraceCollector
impl !RefUnwindSafe for DistributedTraceCollector
impl Send for DistributedTraceCollector
impl Sync for DistributedTraceCollector
impl Unpin for DistributedTraceCollector
impl !UnwindSafe for DistributedTraceCollector
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