Skip to main content

How each copy went: the Runs tab

Each time Prism copies a context stream, it records that run: when it started and finished, what started it, how it ended, and the lines it printed. Read them on Admin → Context streams: open the stream, then its Runs tab. This is where to look first when a stream isn't up to date, rather than the ingest pod's logs, which are gone once the pod is cleaned up.

The tab is for super admins only, like the rest of Context streams. Ingest activity links each stream to its tab, and links a copy the scheduler is running straight to that copy.

What the tab shows​

The scheduler's newest decision, in one sentence at the top:

What it saysWhat it means
Next copy after timeThe stream is up to date and waits for its schedule.
Backing off until time after a failed copyThe last copy failed. The stream is retried at that time, or at the next tick after an upgrade. The ⓘ gives the reason the copy failed.
Copying nowThe scheduler started a copy and it is still running.
The last copy, started at time, ended outcomeThe scheduler's newest decision was to copy, and that copy has ended.
Due, but the last ingest tick ran out of time; it runs on the nextThe tick's time limit (ingest.runDeadlineSeconds) was spent on streams ahead of this one.
Copied on its own, outside the scheduled ingest, so the other context streams keep their scheduleThis copy did not fit in ingest.engine.sourceDeadlineSeconds, and it gets one run with the rest of the day. The Copy now job runs it, in a pod of its own. The ingest tick goes on with the other streams meanwhile.
Not copied by the ingest schedulerSomething stops the scheduler copying it, such as the stream being switched off for the ingest engine, a manifest that does not validate, or a connection this installation does not cover. The ⓘ says which.

A ⚠ beside the sentence means the scheduler has not looked at the stream for three hours. A tick may be running long.

Every copy, newest first, with what started it (the schedule, Copy now, an upload or the command line), how long it took, its outcome, the records it fetched, the window it covered and how many warnings it gave:

OutcomeWhat it means
okThe copy completed.
partial ⚠The copy completed, and some partitions did not finish. Hover the ⚠ to see which ones. Their figures are short until a later copy reaches them.
failed ⚠The copy stopped with an error. Open it for the full error and its log.
abandoned ⚠The copy did not finish. It was stopped at its time limit (ingest.engine.sourceDeadlineSeconds, or what was left of ingest.runDeadlineSeconds) or by a shutdown, or its process died (out of memory, evicted, or it lost its database connection) and the next tick recorded it.
skippedAnother copy of the same stream was still running, so this one left it to finish.
runningThe copy is in progress. Open it to follow its log.

A copy whose process was stopped after it had already recorded its progress is kept as ok, because the stream did move on.

A copy's detail opens when you click its row. It shows the full error and the copy's log, with warnings and errors by default; Show every line shows the rest. While a copy runs, its log updates every few seconds.

When an upstream refuses a request, the error names the request and the HTTP status, for example GET https://api.example.com/v1/report?ending_at=…&starting_at=… -> 400. Prism keeps the query values out of the error, because a value can be a credential or a page token. A … marks a value that Prism left out. A value that was really empty reads name= with nothing after it. The upstream's own reason is in the copy's log, on the line that starts upstream said. That line holds the upstream's error message, or the first 300 characters of its reply. The line before it repeats the request with its values. When a copy failed or was partial, its detail shows the newest upstream said line under the error. Prism leaves the reply out of that line in four cases:

  1. The reply repeats the credential that Prism sent, in any spelling Prism can decode. The line then says withheld, because the reply repeats the credential.
  2. The stream's credential has fewer than 4 letters and digits. Prism cannot tell so short a credential apart from ordinary text, so it leaves out every reply for that stream. The line says the credential is too short. For such a stream, the upstream's reason is never in the log.
  3. The reply is longer than 1,000,000 bytes. The line then says the reply is too long to check.
  4. Checking the reply failed. The line then says withheld, because Prism could not check the reply. The copy goes on exactly as it would have.

The line before it ends with the reason phrase from the reply's status line. When that phrase repeats the credential, the line ends (reason phrase withheld).

When an upstream asks Prism to slow down, Prism waits and tries again. The stream's manifest names the statuses that mean slow down, under connection.rate_limit.pushback_statuses. The log gets one upstream said (429, slow down) line for each request, from the first reply.

After Copy now, the stream opens on its Runs tab, and the copy it asked for appears there and opens once it starts: within ingest.engine.copyNow.minutes, or at the next ingest tick where that is off.

What is kept, and for how long​

These settings are in Limits:

  • ingest.runHistory.keepRuns (default 50) runs per stream, and nothing older than ingest.runHistory.keepDays (default 30) days. The ingest prunes the rest at the start of every tick, and a run's log goes with it.
  • Up to ingest.runHistory.logLinesPerRun (default 2,000) log lines per run, for copies the scheduler starts. Past that, a run keeps only its warnings and errors, up to ten times the limit. It then ends with one line saying how many lines it did not keep, and its row shows the count behind an ⓘ.

The ingest pod's own log is unchanged and keeps every line, including the per-request lines from the external call log. Those per-request lines are not copied into a run's log.

A copy started by one of the older per-source ingest jobs (the command line), rather than by the ingest scheduler, is recorded with when it ran and how it ended, but keeps no log.

Why log text is not in the diagnostic bundle​

A copy's error and its log can quote an upstream system's own words, such as a message from your GitHub or Jira that names a project or a person. They are shown only to super admins in the app, and the diagnostic bundle you send to Tetrate never includes a copy's full error or its log. The bundle carries each stream's last failure and its counts, not its log lines.

When the app itself is down​

The Runs tab needs the app. If the app isn't running, the ingest pod's own log is the fallback:

kubectl logs -n <namespace> -l 'app.kubernetes.io/component in (ingest-tick,ingest-requests)' --tail=200 | grep '<stream name>'

Troubleshooting covers an app that will not start.