pub struct ExecutionSpanAttributes {
pub execution_id: String,
pub parent_id: Option<String>,
pub parent_type: Option<String>,
pub tenant_id: Option<String>,
pub user_id: Option<String>,
}Expand description
Span attributes for execution-level spans
Fields§
§execution_id: StringExecution ID
parent_id: Option<String>Parent ID (if nested execution)
parent_type: Option<String>Parent type
tenant_id: Option<String>Tenant ID
user_id: Option<String>User ID
Implementations§
Source§impl ExecutionSpanAttributes
impl ExecutionSpanAttributes
Sourcepub fn new(execution_id: &ExecutionId) -> Self
pub fn new(execution_id: &ExecutionId) -> Self
Create from an ExecutionId
Sourcepub fn with_parent(
self,
parent_id: impl Into<String>,
parent_type: impl Into<String>,
) -> Self
pub fn with_parent( self, parent_id: impl Into<String>, parent_type: impl Into<String>, ) -> Self
Add parent context
Sourcepub fn with_tenant(self, tenant_id: impl Into<String>) -> Self
pub fn with_tenant(self, tenant_id: impl Into<String>) -> Self
Add tenant context
Sourcepub fn to_attributes(&self) -> Vec<(&'static str, String)>
pub fn to_attributes(&self) -> Vec<(&'static str, String)>
Convert to a map of attributes for OpenTelemetry
Auto Trait Implementations§
impl Freeze for ExecutionSpanAttributes
impl RefUnwindSafe for ExecutionSpanAttributes
impl Send for ExecutionSpanAttributes
impl Sync for ExecutionSpanAttributes
impl Unpin for ExecutionSpanAttributes
impl UnsafeUnpin for ExecutionSpanAttributes
impl UnwindSafe for ExecutionSpanAttributes
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