pub struct KernelSpan {
pub kernel_id: String,
pub operation: String,
pub context: SpanContext,
pub start: Instant,
pub attributes: HashMap<String, String>,
pub events: Vec<SpanEvent>,
}Expand description
A kernel execution span
Fields§
§kernel_id: StringKernel ID
operation: StringOperation name
context: SpanContextSpan context
start: InstantStart time
attributes: HashMap<String, String>Attributes
events: Vec<SpanEvent>Events
Implementations§
Source§impl KernelSpan
impl KernelSpan
Sourcepub fn start(kernel_id: impl Into<String>, operation: impl Into<String>) -> Self
pub fn start(kernel_id: impl Into<String>, operation: impl Into<String>) -> Self
Start a new span
Sourcepub fn start_child(
parent: &SpanContext,
kernel_id: impl Into<String>,
operation: impl Into<String>,
) -> Self
pub fn start_child( parent: &SpanContext, kernel_id: impl Into<String>, operation: impl Into<String>, ) -> Self
Start a child span
Sourcepub fn set_attribute(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
)
pub fn set_attribute( &mut self, key: impl Into<String>, value: impl Into<String>, )
Add an attribute
Sourcepub fn add_event_with_attributes(
&mut self,
name: impl Into<String>,
attributes: HashMap<String, String>,
)
pub fn add_event_with_attributes( &mut self, name: impl Into<String>, attributes: HashMap<String, String>, )
Add an event with attributes
Sourcepub fn record_error(&mut self, error: &dyn Error)
pub fn record_error(&mut self, error: &dyn Error)
Record an error
Auto Trait Implementations§
impl Freeze for KernelSpan
impl RefUnwindSafe for KernelSpan
impl Send for KernelSpan
impl Sync for KernelSpan
impl Unpin for KernelSpan
impl UnwindSafe for KernelSpan
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.