MimirAnalytics.Row.EventRaw (mimir_analytics v0.8.1)

Copy Markdown View Source

One row of events_raw — a single raw event from either a Capture session result or a gateway request log's turn_events, tagged by source so downstream consumers can tell which shape payload carries, and by domain (llm | agent | workflow) when the source event carries the typed vocabulary.

ce_id/ce_source/ce_type are the CloudEvents v1.0 envelope attributes, populated only for gateway rows whose source entry was enveloped; they are NULL for session/eval rows and for pre-envelope gateway history. ts is the envelope's wall-clock time (UTC RFC3339) — NULL wherever no producer ever emitted one. The source event's monotonic ts is never stored here; it rides verbatim inside payload.

Summary

Functions

Build a t() from the mapper-resolved context. :domain and the three :ce_* envelope attributes are optional and default to nil.

Types

source()

@type source() :: String.t()

t()

@type t() :: %MimirAnalytics.Row.EventRaw{
  ce_id: String.t() | nil,
  ce_source: String.t() | nil,
  ce_type: String.t() | nil,
  domain: String.t() | nil,
  payload: map(),
  scope_id: String.t() | nil,
  seq: integer(),
  source: source(),
  source_file: String.t(),
  ts: String.t() | nil,
  type: String.t() | nil
}

Functions

new(attrs)

@spec new(%{
  :scope_id => String.t() | nil,
  :seq => integer(),
  :ts => String.t() | nil,
  optional(:domain) => String.t() | nil,
  optional(:ce_id) => String.t() | nil,
  optional(:ce_source) => String.t() | nil,
  optional(:ce_type) => String.t() | nil,
  type: String.t() | nil,
  payload: map(),
  source: source(),
  source_file: String.t()
}) :: t()

Build a t() from the mapper-resolved context. :domain and the three :ce_* envelope attributes are optional and default to nil.