pub struct TelemetrySystem { /* private fields */ }Expand description
Global telemetry system
Implementations§
Source§impl TelemetrySystem
impl TelemetrySystem
Sourcepub fn new(config: TelemetryConfig) -> Self
pub fn new(config: TelemetryConfig) -> Self
Create a new telemetry system
Sourcepub fn span_add_attribute(&self, span_id: u64, key: String, value: String)
pub fn span_add_attribute(&self, span_id: u64, key: String, value: String)
Add attribute to active span
Sourcepub fn end_span(&self, span_id: u64) -> Option<SpanMetrics>
pub fn end_span(&self, span_id: u64) -> Option<SpanMetrics>
End a span
Sourcepub fn get_events(&self) -> Vec<LogEvent>
pub fn get_events(&self) -> Vec<LogEvent>
Get all events (for testing/debugging)
Sourcepub fn get_span_metrics(&self) -> Vec<SpanMetrics>
pub fn get_span_metrics(&self) -> Vec<SpanMetrics>
Get closed span metrics
Auto Trait Implementations§
impl !Freeze for TelemetrySystem
impl RefUnwindSafe for TelemetrySystem
impl Send for TelemetrySystem
impl Sync for TelemetrySystem
impl Unpin for TelemetrySystem
impl UnsafeUnpin for TelemetrySystem
impl UnwindSafe for TelemetrySystem
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