Skip to content

Lineage & activity

Two observability surfaces. LineageService answers “what has actually arrived, from where, and when” for each configured source, from the connector-run log. ActivityService streams what FACE’s agents are doing right now, including runs the caller did not start: scheduled fetches, other sessions, and long analyses.

Summary

ServiceRPCKindPurpose
LineageServiceGetSourceActivityUnaryPer-connection delivery activity over a window
ActivityServiceSubscribeAgentActivityServer streamingReplay the in-flight runs, then stream live steps
ActivityServiceListFeaturedMessagesUnaryOperator-curated messages for the cockpit strip

LineageService

Full name semantics.v1.LineageService.

FACE records every connector extraction and delivery. A record holds the connection, the connector type, column names, row counts, the duration, a literal-free query shape and a closed-set error class. A lineage record, and so every answer here, never contains a result value, a driver’s error message, any part of a credential, or a query literal.

An answer does not show that a source is healthy, that data is flowing now, or that nothing arrived. When the deployment has no durable lineage store, only the newest few records are held in memory and are lost on restart. Check durable and show durable_reason whenever you show an empty or thin answer.

GetSourceActivity

rpc GetSourceActivity(GetSourceActivityRequest) returns (GetSourceActivityResponse);
  • Kind: Unary.
  • Auth: Bearer session.
  • Errors: UNAVAILABLE if the lineage log cannot be read. The message carries only the error class. It does not mean that no data arrived.

Folds the lineage records in the window into one row per connection, newest last_observed_unix first.

Request: GetSourceActivityRequest

FieldTypeDescription
window_daysint32How far back to look. 0, a negative value, or more than the retention period means the full retention period.
connection_idstringOne connection. Empty means every connection.

Response: GetSourceActivityResponse

FieldTypeDescription
sourcesrepeated SourceActivityOne entry per connection with records in the window, newest first.
durableboolWhether these records survive a restart. false means an in-memory ring, so an empty answer may say more about this process’s uptime than about the sources.
durable_reasonstringThe sentence to show about durability.
window_since_unixint64Start of the window actually read, which may be shorter than requested.
window_until_unixint64End of the window (now).
records_readint32Records in the window before folding. 0 with no sources means nothing was recorded in this window.

ActivityService

Full name semantics.v1.ActivityService.

SubscribeAgentActivity

rpc SubscribeAgentActivity(SubscribeAgentActivityRequest) returns (stream SubscribeAgentActivityResponse);
  • Kind: Server streaming. Available over native gRPC and gRPC-web.
  • Auth: Bearer session.
  • Errors: None of its own. The stream ends when the client cancels.

When the stream opens, the server first replays current state. It sends one snapshot event for every in-flight run in scope, each with its most recent steps, then one snapshot_complete event. After that it streams live run_started, step and run_finished events. Render nothing until snapshot_complete arrives, so that a client joining mid-run does not show a partial picture.

Scope. Only runs whose session matches are streamed. The session is session from the request or, when that is empty, the caller’s x-agent-trace-id metadata. A run carries the trace id of the client that started it, so a client that sets the header on every call sees its own runs. When both are absent, the stream is ambient and covers every agent run on the instance, which is what an operator console wants.

Limits. A run keeps its last 100 steps. Every free-text field and operand value is truncated to 240 characters. Each subscriber has a buffer of 256 events. A subscriber that stops reading loses the events that do not fit, and the run itself is not affected. At most 64 runs are tracked in flight.

Request: SubscribeAgentActivityRequest

FieldTypeDescription
replay_steps_per_runint32Maximum trailing steps per run in the initial replay. 0 or negative means 20.
sessionstringShow only runs from this session. Empty falls back to the x-agent-trace-id metadata. Ambient only when both are absent.

Response: SubscribeAgentActivityResponse

Exactly one of the event fields is set.

FieldTypeDescription
snapshotAgentRunoneof event. One per in-flight run when the stream opens, with its recent steps.
snapshot_completebooloneof event. Marks the end of the replay.
run_startedAgentRunoneof event. A run began.
stepAgentSteponeof event. A run recorded a step.
run_finishedAgentRunoneof event. A run ended. See status and error.

ListFeaturedMessages

rpc ListFeaturedMessages(ListFeaturedMessagesRequest) returns (ListFeaturedMessagesResponse);
  • Kind: Unary.
  • Auth: Bearer session.
  • Errors: None beyond authentication. If the operator has provided no message file, or the file is unreadable or not a JSON array, the response has no messages and a diagnostic source.

Returns the operator-curated cards the cockpit cycles through. The operator edits them on the deployment, without a rebuild. Messages with neither a title nor a body are skipped.

Request: ListFeaturedMessagesRequest

No fields.

Response: ListFeaturedMessagesResponse

FieldTypeDescription
messagesrepeated FeaturedMessageThe messages, in file order.
sourcestringWhere the server read them from, for an operator diagnosing an empty strip. Diagnostic only. Do not parse or display it to end users.

Messages

SourceActivity

What one configured source did over the window.

FieldTypeDescription
connection_idstringConnection id.
connection_namestringConnection name.
connector_typestringNormalised connector type, for example postgres or mqtt.
environmentstringEnvironment label of the connection.
runnerstringThe runner that executed the runs.
last_observed_unixint64Latest record in the window. 0 means no record in the window, not “has never delivered”.
first_observed_unixint64Earliest record in the window.
extractionsint32Extraction runs observed.
deliveriesint32Records of data actually landing somewhere.
rowsint64Rows summed across deliveries.
okint32Runs that succeeded with data.
emptyint32Runs that connected and received nothing. This is neither a failure nor a delivery.
failedint32Runs that failed.
error_classesrepeated stringClosed-set error classes, present when failed is non-zero. Never a driver message.
last_duration_msint64Duration of the last run, when one was observed.
destinationsrepeated LineageDestinationWhere this source’s data went. Empty means extractions were seen but no delivery was recorded.
last_columnsrepeated stringColumn names from the last extraction. Names only, never values.

LineageDestination

FieldTypeDescription
kindstringDestination kind, for example recordstore or objectstore.
idstringDestination id.
namestringDestination name.
movementsint32Deliveries to this destination.
rowsint64Rows delivered.
first_seen_unixint64First delivery in the window.
last_seen_unixint64Last delivery in the window.

AgentRun

One agent execution.

FieldTypeDescription
run_idstringRun id. For an orchestrator run started with a thread_id, it is that thread id.
agentstringAgent id, for example posture, fetch-cascade or ralph:twins.
sessionstringSession (trace id) of the client that started the run.
started_unixint64Start time.
ended_unixint64End time. 0 while in flight.
statusAgentRunStatusLifecycle state.
step_countint32Steps recorded so far.
stepsrepeated AgentStepSet only on snapshot events, bounded by replay_steps_per_run. Live steps arrive as step events.
errorstringSet when status is AGENT_RUN_STATUS_FAILED.

AgentStep

One iteration of an agent loop.

FieldTypeDescription
run_idstringThe run this step belongs to.
indexint32Step index within the run.
thoughtstringReasoning text. Often empty: phase-style runs such as the fetch cascade record only action and result.
actionstringWhat the step did.
inputstringStep input.
resultstringStep result.
modelstringModel that served the step, if any.
latency_msint64Step latency.
errorstringNon-empty when the step failed. A failed step does not necessarily fail the run.
at_unixint64When the step was recorded.
codestringStable, machine-readable step kind, for example STEP_ANALYSING or STEP_MODEL_THOUGHT. Compose the display line from it in your own locale. STEP_MODEL_THOUGHT is the one code whose text the model wrote. Empty is permanently valid: fall back to action. Render nothing for a code you do not recognise, never the raw token.
operandsmap<string, string>Facts the backend observed for code, such as counts and names. Provenance is included under provenance_source, provenance_degraded and provenance_computed_at. A missing operand should degrade the line, not drop the step.

FeaturedMessage

FieldTypeDescription
idstringMessage id.
titlestringTitle.
bodystringBody text.
localestringBCP-47 tag, for example en or pt-BR. Empty means any locale.
hrefstringOptional link target.
iconstringOptional semantic icon name for the client to map to its own icons. Never a URL.

Enums

AgentRunStatus

ValueMeaning
AGENT_RUN_STATUS_UNSPECIFIEDNot set.
AGENT_RUN_STATUS_RUNNINGIn flight.
AGENT_RUN_STATUS_DONEFinished.
AGENT_RUN_STATUS_FAILEDFailed. See error.