pub struct SpanMetadata {
pub model: Option<String>,
pub provider: Option<String>,
pub tokens_in: Option<u32>,
pub tokens_out: Option<u32>,
pub total_tokens: Option<u32>,
pub tool_name: Option<String>,
pub extra: HashMap<String, Value>,
}Expand description
Type-specific metadata for spans
Fields§
§model: Option<String>Model name for LLM generations (e.g., “gpt-4o”)
provider: Option<String>Provider name (e.g., “openai”)
tokens_in: Option<u32>Input token count
tokens_out: Option<u32>Output token count
total_tokens: Option<u32>Total token count
tool_name: Option<String>Tool name for tool call spans
extra: HashMap<String, Value>Custom key-value metadata
Trait Implementations§
Source§impl Clone for SpanMetadata
impl Clone for SpanMetadata
Source§fn clone(&self) -> SpanMetadata
fn clone(&self) -> SpanMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SpanMetadata
impl Debug for SpanMetadata
Source§impl Default for SpanMetadata
impl Default for SpanMetadata
Source§fn default() -> SpanMetadata
fn default() -> SpanMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SpanMetadata
impl<'de> Deserialize<'de> for SpanMetadata
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
Auto Trait Implementations§
impl Freeze for SpanMetadata
impl RefUnwindSafe for SpanMetadata
impl Send for SpanMetadata
impl Sync for SpanMetadata
impl Unpin for SpanMetadata
impl UnsafeUnpin for SpanMetadata
impl UnwindSafe for SpanMetadata
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