pub struct OperationContext { /* private fields */ }Expand description
Identifiers describing where an operation is executing.
System, component, and operation are intended to remain low-cardinality. Request, job, correlation, trace, and span identifiers are correlation values and should not normally become metric dimensions or indexed tags.
Implementations§
Source§impl OperationContext
impl OperationContext
Sourcepub fn builder() -> OperationContextBuilder
pub fn builder() -> OperationContextBuilder
Starts building a validated operation context.
Sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request identifier, when present.
Sourcepub fn correlation_id(&self) -> Option<&str>
pub fn correlation_id(&self) -> Option<&str>
Returns the correlation identifier, when present.
Sourcepub fn to_map(&self) -> BTreeMap<&'static str, &str>
pub fn to_map(&self) -> BTreeMap<&'static str, &str>
Returns only identifiers that are present.
Sourcepub fn index_fields(&self) -> BTreeMap<&'static str, &str>
pub fn index_fields(&self) -> BTreeMap<&'static str, &str>
Returns low-cardinality fields suitable for filtering and indexing.
Trait Implementations§
Source§impl Clone for OperationContext
impl Clone for OperationContext
Source§impl Debug for OperationContext
impl Debug for OperationContext
Source§impl Default for OperationContext
impl Default for OperationContext
impl Eq for OperationContext
Source§impl PartialEq for OperationContext
impl PartialEq for OperationContext
Source§impl Serialize for OperationContext
impl Serialize for OperationContext
impl StructuralPartialEq for OperationContext
Auto Trait Implementations§
impl Freeze for OperationContext
impl RefUnwindSafe for OperationContext
impl Send for OperationContext
impl Sync for OperationContext
impl Unpin for OperationContext
impl UnsafeUnpin for OperationContext
impl UnwindSafe for OperationContext
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