pub struct TelemetryEvent {Show 14 fields
pub kind: TelemetryEventKind,
pub trace_id: Option<String>,
pub span_id: Option<String>,
pub parent_span_id: Option<String>,
pub correlation_id: Option<String>,
pub request_id: Option<String>,
pub session_id: Option<String>,
pub route_path: Option<String>,
pub event_name: Option<String>,
pub ok: bool,
pub latency_ms: Option<u64>,
pub bytes: Option<usize>,
pub count: Option<usize>,
pub attributes: Map<String, Value>,
}Fields§
§kind: TelemetryEventKind§trace_id: Option<String>§span_id: Option<String>§parent_span_id: Option<String>§correlation_id: Option<String>§request_id: Option<String>§session_id: Option<String>§route_path: Option<String>§event_name: Option<String>§ok: bool§latency_ms: Option<u64>§bytes: Option<usize>§count: Option<usize>§attributes: Map<String, Value>Implementations§
Source§impl TelemetryEvent
impl TelemetryEvent
pub fn new(kind: TelemetryEventKind) -> Self
pub fn with_session(self, session_id: impl Into<String>) -> Self
pub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
pub fn with_span_id(self, span_id: impl Into<String>) -> Self
pub fn with_parent_span_id(self, parent_span_id: impl Into<String>) -> Self
pub fn with_correlation_id(self, correlation_id: impl Into<String>) -> Self
pub fn with_request_id(self, request_id: impl Into<String>) -> Self
pub fn with_route(self, route_path: impl Into<String>) -> Self
pub fn with_event_name(self, event_name: impl Into<String>) -> Self
pub fn with_latency_ms(self, latency_ms: u64) -> Self
pub fn with_bytes(self, bytes: usize) -> Self
pub fn with_count(self, count: usize) -> Self
pub fn with_ok(self, ok: bool) -> Self
pub fn with_attribute(self, key: impl Into<String>, value: Value) -> Self
Trait Implementations§
Source§impl Clone for TelemetryEvent
impl Clone for TelemetryEvent
Source§fn clone(&self) -> TelemetryEvent
fn clone(&self) -> TelemetryEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TelemetryEvent
impl Debug for TelemetryEvent
Source§impl<'de> Deserialize<'de> for TelemetryEvent
impl<'de> Deserialize<'de> for TelemetryEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TelemetryEvent
impl PartialEq for TelemetryEvent
Source§fn eq(&self, other: &TelemetryEvent) -> bool
fn eq(&self, other: &TelemetryEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TelemetryEvent
impl Serialize for TelemetryEvent
impl StructuralPartialEq for TelemetryEvent
Auto Trait Implementations§
impl Freeze for TelemetryEvent
impl RefUnwindSafe for TelemetryEvent
impl Send for TelemetryEvent
impl Sync for TelemetryEvent
impl Unpin for TelemetryEvent
impl UnsafeUnpin for TelemetryEvent
impl UnwindSafe for TelemetryEvent
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