pub struct ObservabilityEvent {
pub version: u32,
pub occurred_at_millis: u64,
pub tick: u64,
pub conversation_id: String,
pub span_id: Option<u64>,
pub kind: EventKind,
}Expand description
A single observability event with envelope metadata.
kind is flattened so the wire JSON is a single flat object:
{
"version": 1,
"occurred_at_millis": 1715000000000,
"tick": 42,
"conversation_id": "thread-1",
"kind": "prompt.started",
"model": "gpt-4o",
"messages_in": 3
}Fields§
§version: u32Schema version. See SCHEMA_VERSION.
occurred_at_millis: u64Wall-clock timestamp in milliseconds since the Unix epoch.
tick: u64Monotonic per-process counter. Use to order events without clock skew.
conversation_id: StringConversation / thread identifier this event belongs to.
span_id: Option<u64>Numeric id of the tracing::Span that was current when this event
was emitted, when one exists. Mirrors
tracing::span::Id::into_u64 so consumers using
tracing-opentelemetry (or any subscriber that attaches span ids to
events) can stitch rig-tap events into the existing span
waterfall without conversation-id post-processing. Absent (None)
when no span is active at emit time.
kind: EventKindEvent-specific payload. Flattened into the parent object.
Implementations§
Trait Implementations§
Source§impl Clone for ObservabilityEvent
impl Clone for ObservabilityEvent
Source§fn clone(&self) -> ObservabilityEvent
fn clone(&self) -> ObservabilityEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ObservabilityEvent
impl Debug for ObservabilityEvent
Source§impl<'de> Deserialize<'de> for ObservabilityEvent
impl<'de> Deserialize<'de> for ObservabilityEvent
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>,
Source§impl PartialEq for ObservabilityEvent
impl PartialEq for ObservabilityEvent
Source§fn eq(&self, other: &ObservabilityEvent) -> bool
fn eq(&self, other: &ObservabilityEvent) -> bool
self and other values to be equal, and is used by ==.