Trait holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dependencies::ghost_actor::dependencies::observability::OpenSpanExt
source · pub trait OpenSpanExt {
fn get_context(&self) -> Context;
fn get_current_context() -> Context;
fn get_current_bytes() -> Vec<u8, Global> ⓘ;
fn set_context(&self, context: Context);
fn set_current_context(context: Context);
fn set_current_bytes(bytes: Vec<u8, Global>);
fn display_context(&self) -> String;
fn get_context_bytes(&self) -> Vec<u8, Global> ⓘ { ... }
fn set_from_bytes(&self, bytes: Vec<u8, Global>) { ... }
}
Expand description
Opentelemetry span extension trait. This trait provides helper methods to the tracing::Span for crossing thread and process boundaries.
Required Methods§
sourcefn get_context(&self) -> Context
fn get_context(&self) -> Context
Get the context of this span.
sourcefn get_current_context() -> Context
fn get_current_context() -> Context
Get the context of the current span.
sourcefn set_context(&self, context: Context)
fn set_context(&self, context: Context)
Set the context of this span.
sourcefn set_current_context(context: Context)
fn set_current_context(context: Context)
Set the context of the current span.
sourcefn set_current_bytes(bytes: Vec<u8, Global>)
fn set_current_bytes(bytes: Vec<u8, Global>)
Set the current span context from message pack bytes.
sourcefn display_context(&self) -> String
fn display_context(&self) -> String
Display this spans context as a String.
Provided Methods§
sourcefn get_context_bytes(&self) -> Vec<u8, Global> ⓘ
fn get_context_bytes(&self) -> Vec<u8, Global> ⓘ
Get the context as message pack bytes for sending over process boundaries.
sourcefn set_from_bytes(&self, bytes: Vec<u8, Global>)
fn set_from_bytes(&self, bytes: Vec<u8, Global>)
Set the context of this span from bytes over the network.