Struct ockam_core::OpenTelemetryContext
source · pub struct OpenTelemetryContext(/* private fields */);
Expand description
Serializable data type to hold the opentelemetry propagation context.
Implementations§
source§impl OpenTelemetryContext
impl OpenTelemetryContext
sourcepub fn extract(&self) -> Context
pub fn extract(&self) -> Context
Recover an OpenTelemetry context from the currently serialized data
sourcepub fn inject(context: &Context) -> Self
pub fn inject(context: &Context) -> Self
Serialize the current OpenTelemetry context as OpenTelemetryContext
sourcepub fn update(self) -> OpenTelemetryContext
pub fn update(self) -> OpenTelemetryContext
Update the OpenTelemetryContext with the latest span id
sourcepub fn current() -> OpenTelemetryContext
pub fn current() -> OpenTelemetryContext
Return the current OpenTelemetryContext
sourcepub fn current_context() -> Context
pub fn current_context() -> Context
Return the current opentelemetry::Context
sourcepub fn from_remote_context(tracing_context: &str) -> OpenTelemetryContext
pub fn from_remote_context(tracing_context: &str) -> OpenTelemetryContext
Parse a serialized tracing context, set it as the current parent context and return the current OpenTelemetry context This function is use to start new traces when receiving a serialized OpenTelemetryContext from remote nodes.
Trait Implementations§
source§impl Clone for OpenTelemetryContext
impl Clone for OpenTelemetryContext
source§fn clone(&self) -> OpenTelemetryContext
fn clone(&self) -> OpenTelemetryContext
Returns a copy 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 OpenTelemetryContext
impl Debug for OpenTelemetryContext
source§impl<'de> Deserialize<'de> for OpenTelemetryContext
impl<'de> Deserialize<'de> for OpenTelemetryContext
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 Display for OpenTelemetryContext
impl Display for OpenTelemetryContext
source§impl Extractor for OpenTelemetryContext
impl Extractor for OpenTelemetryContext
source§impl FromStr for OpenTelemetryContext
impl FromStr for OpenTelemetryContext
source§impl Hash for OpenTelemetryContext
impl Hash for OpenTelemetryContext
source§impl Injector for OpenTelemetryContext
impl Injector for OpenTelemetryContext
source§impl Ord for OpenTelemetryContext
impl Ord for OpenTelemetryContext
source§impl PartialEq for OpenTelemetryContext
impl PartialEq for OpenTelemetryContext
source§fn eq(&self, other: &OpenTelemetryContext) -> bool
fn eq(&self, other: &OpenTelemetryContext) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for OpenTelemetryContext
impl PartialOrd for OpenTelemetryContext
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for OpenTelemetryContext
impl Serialize for OpenTelemetryContext
source§impl TryFrom<&str> for OpenTelemetryContext
impl TryFrom<&str> for OpenTelemetryContext
Parse the OpenTelemetry context from a String
source§impl TryFrom<String> for OpenTelemetryContext
impl TryFrom<String> for OpenTelemetryContext
Parse the OpenTelemetry context from a String
impl Eq for OpenTelemetryContext
impl StructuralPartialEq for OpenTelemetryContext
Auto Trait Implementations§
impl Freeze for OpenTelemetryContext
impl RefUnwindSafe for OpenTelemetryContext
impl Send for OpenTelemetryContext
impl Sync for OpenTelemetryContext
impl Unpin for OpenTelemetryContext
impl UnwindSafe for OpenTelemetryContext
Blanket Implementations§
source§impl<D> AsyncTryClone for D
impl<D> AsyncTryClone for D
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