#[non_exhaustive]pub struct RunRecord {Show 26 fields
pub run_id: String,
pub workflow: String,
pub fingerprint: String,
pub status: RunStatus,
pub created_ms: u64,
pub updated_ms: u64,
pub pause_reasons: Vec<PauseReason>,
pub outputs: IndexMap<String, Value>,
pub answer: String,
pub error: Option<String>,
pub error_type: Option<String>,
pub usage: Usage,
pub event_count: u64,
pub events_truncated: bool,
pub inputs: Option<IndexMap<String, Value>>,
pub trace_id: Option<String>,
pub span_id: Option<String>,
pub metadata: IndexMap<String, String>,
pub session_id: Option<String>,
pub user_id: Option<String>,
pub user_verified: bool,
pub tags: Vec<String>,
pub deployment: Option<String>,
pub deployment_version: Option<String>,
pub epoch: u64,
pub owner: Option<String>,
}Expand description
Persisted summary of one run.
The struct is #[non_exhaustive]: build one with RunRecord::running or
RunRecord::queued and set fields afterwards.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.run_id: String§workflow: StringName the workflow is served under.
fingerprint: StringFingerprint of the workflow graph (resume requires the same graph).
status: RunStatus§created_ms: u64§updated_ms: u64§pause_reasons: Vec<PauseReason>Why the run is paused (empty unless status == paused).
outputs: IndexMap<String, Value>§answer: StringOrdered answer text assembled from response nodes.
error: Option<String>§error_type: Option<String>§usage: Usage§event_count: u64Index of the run’s next event: how many events were appended so far. Stores
keep at most their per-run cap of them (see events_truncated); the count
keeps growing past it so event indices (and SSE id:s) stay stable.
events_truncated: boolWhether events were dropped because the store’s per-run cap was reached.
inputs: Option<IndexMap<String, Value>>Run inputs as the start node accepted them, secrets masked. Only kept when
the host opts in (graphrt serve --store-inputs).
trace_id: Option<String>OpenTelemetry trace id (32 hex digits) of the latest execution, when traced.
span_id: Option<String>Span id (16 hex digits) of that execution’s root invoke_workflow span, so
later spans (online evaluation scores) can join the same trace.
metadata: IndexMap<String, String>Caller-supplied labels for filtering and evaluation (RunRequest.metadata).
session_id: Option<String>Caller’s session / conversation id.
user_id: Option<String>Caller’s end-user id.
user_verified: boolWhether user_id is the verified subject of an end-user token (the
host checked its signature) rather than a label the caller sent. Only
a verified owner may act on the run as that user (rate it, for example).
Caller-supplied tags.
deployment: Option<String>Deployment the run belongs to (the namespace of a gateway’s store); None
on a standalone server.
deployment_version: Option<String>Immutable version of that deployment the run executes (resume needs the same workflow graph).
epoch: u64Execution epoch: 0 when created, incremented by every claim (dispatch,
resume). Conditional writes (RunStore::put_if) compare it, and an
executor refuses work for an epoch other than the one it was given.
owner: Option<String>Who executes the current epoch (a replica id), when known.
Implementations§
Source§impl RunRecord
impl RunRecord
Sourcepub fn running(
run_id: impl Into<String>,
workflow: impl Into<String>,
fingerprint: impl Into<String>,
now_ms: u64,
) -> Self
pub fn running( run_id: impl Into<String>, workflow: impl Into<String>, fingerprint: impl Into<String>, now_ms: u64, ) -> Self
A new running record.