pub struct ObservationEvent {Show 18 fields
pub trace_id: String,
pub span_id: String,
pub parent_span_id: Option<String>,
pub turn_id: String,
pub agent_id: String,
pub actor_id: Option<String>,
pub session_id: Option<String>,
pub event_type: EventType,
pub purpose: ObservationPurpose,
pub status: EventStatus,
pub timestamp: DateTime<Utc>,
pub duration_ms: u64,
pub tokens: Option<ObservationTokenUsage>,
pub cost: Option<CostEstimate>,
pub error: Option<ObservationError>,
pub dimensions: HashMap<String, String>,
pub tags: HashMap<String, String>,
pub payload: Option<Value>,
}Expand description
Completed observation record that can be aggregated, reported, or exported.
Fields§
§trace_id: StringTrace ID shared by all spans in the same operation.
span_id: StringUnique ID for this event span.
parent_span_id: Option<String>Parent span ID when this event is nested under another span.
turn_id: StringChat turn ID for the agent call that produced this event.
agent_id: StringAgent that produced this event.
actor_id: Option<String>§session_id: Option<String>§event_type: EventTypeWhat kind of operation produced this event.
purpose: ObservationPurposeWhy the operation was executed.
status: EventStatusSuccess, error, cancellation, or skipped state.
timestamp: DateTime<Utc>UTC timestamp when the event was recorded.
duration_ms: u64Duration of the measured operation in milliseconds.
tokens: Option<ObservationTokenUsage>§cost: Option<CostEstimate>§error: Option<ObservationError>§dimensions: HashMap<String, String>Safe grouping fields used by aggregators and exporters.
Extra safe labels that survived redaction.
payload: Option<Value>Trait Implementations§
Source§impl Clone for ObservationEvent
impl Clone for ObservationEvent
Source§fn clone(&self) -> ObservationEvent
fn clone(&self) -> ObservationEvent
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 ObservationEvent
impl Debug for ObservationEvent
Source§impl<'de> Deserialize<'de> for ObservationEvent
impl<'de> Deserialize<'de> for ObservationEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ObservationEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ObservationEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ObservationEvent
impl Serialize for ObservationEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ObservationEvent
impl RefUnwindSafe for ObservationEvent
impl Send for ObservationEvent
impl Sync for ObservationEvent
impl Unpin for ObservationEvent
impl UnsafeUnpin for ObservationEvent
impl UnwindSafe for ObservationEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.