pub struct Observation {
pub id: u64,
pub origin: Origin,
pub kind: ObservationKind,
pub data: Value,
pub severity: Severity,
pub source_location: Option<SourceLocation>,
pub timestamp_ns: u64,
pub correlation_id: Option<Arc<str>>,
pub parent_id: Option<u64>,
pub tags: Option<Vec<String>>,
pub session_id: Option<Arc<str>>,
pub node_id: Option<Arc<str>>,
}Fields§
§id: u64§origin: Origin§kind: ObservationKind§data: Value§severity: Severity§source_location: Option<SourceLocation>§timestamp_ns: u64§correlation_id: Option<Arc<str>>§parent_id: Option<u64>§session_id: Option<Arc<str>>§node_id: Option<Arc<str>>Implementations§
Source§impl Observation
impl Observation
Sourcepub fn new(
origin: Origin,
kind: ObservationKind,
data: Value,
severity: Severity,
source_location: Option<SourceLocation>,
) -> Self
pub fn new( origin: Origin, kind: ObservationKind, data: Value, severity: Severity, source_location: Option<SourceLocation>, ) -> Self
Build a new observation. id starts at 0 (the store assigns the real
monotonic sequence on insert) and timestamp_ns is captured from the
system clock at call time.
Trait Implementations§
Source§impl Clone for Observation
impl Clone for Observation
Source§fn clone(&self) -> Observation
fn clone(&self) -> Observation
Returns a duplicate of the value. Read more
1.0.0 · 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 Observation
impl Debug for Observation
Source§impl<'de> Deserialize<'de> for Observation
impl<'de> Deserialize<'de> for Observation
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
Auto Trait Implementations§
impl Freeze for Observation
impl RefUnwindSafe for Observation
impl Send for Observation
impl Sync for Observation
impl Unpin for Observation
impl UnsafeUnpin for Observation
impl UnwindSafe for Observation
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