pub struct Span {Show 16 fields
pub run_id: Uuid,
pub parent_run_id: Option<Uuid>,
pub trace_id: Uuid,
pub kind: SpanKind,
pub name: String,
pub started_at: SystemTime,
pub ended_at: Option<SystemTime>,
pub level: ObservationLevel,
pub status_message: Option<String>,
pub input: Option<Value>,
pub output: Option<Value>,
pub session_id: Option<String>,
pub user_id: Option<String>,
pub tags: Vec<String>,
pub metadata: HashMap<String, Value>,
pub generation: Option<Generation>,
}Expand description
One node in the trace tree.
Fields§
§run_id: UuidThis observation’s id.
parent_run_id: Option<Uuid>Parent observation id, when nested.
trace_id: UuidRoot run_id of the trace this span belongs to.
kind: SpanKindObservation type.
name: StringFriendly name (e.g. “openai.gpt-4o”, “search_tool”, “agent_node”).
started_at: SystemTimeWall-clock start.
ended_at: Option<SystemTime>Wall-clock end (None until span closes).
level: ObservationLevelSeverity.
status_message: Option<String>Set when level == Warning or Error.
input: Option<Value>Input payload (Value to be backend-agnostic).
output: Option<Value>Output payload.
session_id: Option<String>Set only on the trace root.
user_id: Option<String>Set only on the trace root.
Set only on the trace root.
metadata: HashMap<String, Value>Free-form metadata (excluding well-known fields above).
generation: Option<Generation>Some iff kind == Generation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Span
impl<'de> Deserialize<'de> for Span
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 Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
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