pub struct Event {Show 13 fields
pub id: EventId,
pub schema_version: u16,
pub observed_at: DateTime<Utc>,
pub recorded_at: DateTime<Utc>,
pub source: EventSource,
pub event_type: EventType,
pub trace_id: Option<TraceId>,
pub session_id: Option<String>,
pub domain_tags: Vec<String>,
pub payload: Value,
pub payload_hash: String,
pub prev_event_hash: Option<String>,
pub event_hash: String,
}Expand description
An immutable observed fact in the Cortex ledger.
Field order is the BUILD_SPEC §9.1 wire order; do not reorder without a schema bump.
Fields§
§id: EventIdStable identifier (also the dedup key for re-ingest).
schema_version: u16Schema version this row was written under.
observed_at: DateTime<Utc>When the event was observed in the world.
recorded_at: DateTime<Utc>When Cortex recorded the event (typically >= observed_at).
source: EventSourceWhere the event came from.
event_type: EventTypeWhat kind of event this is.
trace_id: Option<TraceId>Trace this event belongs to, if any.
session_id: Option<String>Session identifier (free-form; not modeled as a typed ID at this layer).
Free-form domain tags (agents, security, …).
payload: ValueStructured payload. Schema is event-type-specific and not validated at this layer; downstream consumers may run typed validation.
payload_hash: StringHex-encoded BLAKE3 hash of the canonical payload encoding.
Computed by cortex-ledger; opaque here.
prev_event_hash: Option<String>Hex-encoded event_hash of the previous event in the chain (if any).
event_hash: StringHex-encoded event_hash of this event.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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 JsonSchema for Event
impl JsonSchema for Event
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more