Stream Pipeline Logs
Required role: read or higher.
Retrieve logs of a pipeline as a stream.
The logs stream catches up to the extent of the internally configured per-pipeline circular logs buffer (limited to a certain byte size and number of lines, whichever is reached first). After the catch-up, new lines are pushed whenever they become available.
It is possible for the logs stream to end prematurely due to the API server temporarily losing connection to the runner. In this case, it is needed to issue again a new request to this endpoint.
The logs stream will end when the pipeline is deleted, or if the runner restarts. Note that in both cases the logs will be cleared.
Resuming a stream
Supplying the cursor parameter asks for only the lines the caller is missing, rather
than the whole retained buffer. This matters on an unstable connection, where replaying
the buffer on every reconnect can consume the entire link and leave the caller unable to
reach the live tail.
A caller that supplies cursor is answered with three response headers:
feldera-logs-epoch: 0199c3f1-2d0a-7e84-b711-6f2c9a1d4e08
feldera-logs-seq: 41272
feldera-logs-gap: 0
feldera-logs-epochidentifies this lifetime of the logs buffer. Pass it back unchanged.feldera-logs-seqis the sequence number of the line preceding the response's first log line.feldera-logs-gapcounts lines that were discarded between the requested cursor and the sequence number above, and which the caller will therefore never receive. Zero means the resume is exact.
The body is log lines and nothing else, one per sequence number, so the caller's current
position is feldera-logs-seq plus the number of lines it has received. To reconnect,
pass cursor=<epoch>:<position>.
A 503 means the position could not be resolved. Retry it with the same cursor.
A pipeline's logs buffer is created when the runner first sees the pipeline and discarded when the runner restarts or the pipeline is deleted, which is also when the logs are cleared. Stopping and starting a pipeline leaves the buffer alone: the epoch stays the same and the numbering continues across runs.
A cursor carrying an epoch from a buffer that no longer exists is not an error: it is answered with a full catch-up and a gap naming what was lost, so a caller can never be locked out of its logs by an old cursor.
Callers that supply cursor receive no informational lines in the body, which is what
makes the one-line-per-sequence-number correspondence exact. Callers that omit it get
the body they have always received, and no position headers.
| Path Parameters |
|---|
pipeline_name string — REQUIREDUnique pipeline name |
| Query Parameters |
|---|
cursor stringResume the stream after this position, formatted as |
| Responses | ||||
|---|---|---|---|---|
200Pipeline logs retrieved successfully
| ||||
400Cursor is malformed
| ||||
404Pipeline with that name does not exist
| ||||
500
| ||||
503
|