pub struct ObservationBody {Show 14 fields
pub id: String,
pub trace_id: String,
pub parent_observation_id: Option<String>,
pub name: Option<String>,
pub start_time: Option<String>,
pub end_time: Option<String>,
pub input: Option<Value>,
pub output: Option<Value>,
pub metadata: Option<Value>,
pub level: Option<ObservationLevel>,
pub status_message: Option<String>,
pub environment: Option<String>,
pub model: Option<String>,
pub usage_details: Option<Map<String, Value>>,
}Expand description
Body of an observation (generation / span).
Generation and span share the same set of body fields — they differ only in the event
type and whether model / usageDetails are present (span usually does not carry
them).
Fields§
§id: StringObservation id. Sending the same id twice results in a merge (first create, then update endTime).
trace_id: StringThe trace ID this observation belongs to.
parent_observation_id: Option<String>Parent observation; None means it is directly attached to the trace.
name: Option<String>§start_time: Option<String>§end_time: Option<String>§input: Option<Value>§output: Option<Value>§metadata: Option<Value>§level: Option<ObservationLevel>§status_message: Option<String>§environment: Option<String>§model: Option<String>The model name (generation only).
usage_details: Option<Map<String, Value>>Free-form token usage details: keys are arbitrary; if total is omitted, the
backend infers it.
We populate input / output / cache_read_input_tokens /
cache_creation_input_tokens (aligned with defect_agent::llm::Usage).
Trait Implementations§
Source§impl Clone for ObservationBody
impl Clone for ObservationBody
Source§fn clone(&self) -> ObservationBody
fn clone(&self) -> ObservationBody
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 ObservationBody
impl Debug for ObservationBody
Source§impl Default for ObservationBody
impl Default for ObservationBody
Source§fn default() -> ObservationBody
fn default() -> ObservationBody
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ObservationBody
impl RefUnwindSafe for ObservationBody
impl Send for ObservationBody
impl Sync for ObservationBody
impl Unpin for ObservationBody
impl UnsafeUnpin for ObservationBody
impl UnwindSafe for ObservationBody
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