insonl
← journal

Monitor an AI Queue With Service-Level Objectives

date
23 November 2026
by
insonl
read

An AI workflow queue can empty while the work its users need is still missing. A worker can read a document, call a model, and acknowledge the queue message before a downstream application rejects the result. Define a service-level objective (SLO) around the outcome the user depends on. Then use the age of the oldest unfinished item, the rate of confirmed completions, and downstream failure signals to decide when someone needs to intervene. Google SRE Workbook, Implementing SLOs

Illustrative scenario. An accounts payable team receives supplier invoices in a shared mailbox. The workflow uses AI to extract fields and prepare invoices for review. An invoice is ready when the ERP exposes the draft to the assigned reviewer or a policy-defined exception is visible in a staffed review queue with the information needed to act. Approving the invoice and authorizing payment happen later. The monitoring below covers the time from receipt to a usable handoff.

Start the clock where the workflow takes responsibility

Use the original receipt timestamp for every eligible invoice in the monitored mailbox. Assign a stable case ID and reconcile the intake register with the mailbox so a missed notification or failed enqueue still leaves a case to account for. Keep the original timestamp across retries, manual reassignment, and replays from a dead-letter queue. Define eligibility in advance so repeated deliveries of the same invoice and messages outside the workflow are handled consistently. Insonl, Gmail API Intake Queue for Operational Attachments

Define the deadline from the point when delay affects the user. In the invoice example, that point could be a review cutoff that gives the team enough time to handle exceptions before a payment run. Specify how arrivals near the cutoff and outside staffed hours are treated. Save the deadline on each case at intake so a retry or a shift change leaves it intact. Write down which exception routes qualify as a handoff and verify that the assigned reviewer can see the record. A technical failure parked for investigation remains open until the workflow delivers a usable outcome. Insonl, Three-Way Invoice Matching Exceptions: Queue Rules

Calculate the service-level indicator (SLI) as eligible cases with a confirmed handoff by their deadline divided by all eligible cases whose deadlines fall in the reporting window. Evaluate elapsed deadlines. An open case becomes a miss when its deadline passes, and a late recovery still counts as a miss in that window. With no cases due, show the count and leave the ratio undefined. The operations owner sets the target share and reporting window. The share of cases the objective allows to miss is the error budget. Google SRE Workbook, Implementing SLOs

Put three signals on the same timeline

Build the view from case-level events. Record receipt, entry into each stage, the downstream acknowledgement, and the failure class when a stage cannot finish. Keep attempt IDs for debugging and count distinct case IDs for workflow measurements. Put case IDs in the event record for drill-down and group charts by a small set of dimensions such as workflow, priority, and destination. Insonl, Business Intelligence and Analytics

Signal What to measure What it helps explain
Oldest unfinished item Time since original receipt for the oldest open case. Show time until the nearest deadline alongside it when deadlines vary. Whether a case has waited long enough to require action, including work in flight, in retry, or waiting on a downstream response.
Confirmed completion rate Distinct cases reaching a qualifying handoff per unit of time, alongside distinct arrivals over the same interval. Whether the workflow is keeping up or catching up. A backlog may keep ageing while completions trail arrivals.
Downstream failure signals Rejected writes, acknowledgements that never reach a terminal state, and cases moved to a dead-letter queue. Break out causes and show affected case counts. Where the work stopped after the model returned a result, and whether a retry, repair, or manual handoff can recover it.

For example, use a destination record ID and a read-back check where an ERP API acknowledges receipt before it finishes the write. If the acknowledgement is lost, reconcile by the stable case ID or destination reference before retrying. Use the destination’s timestamp if it records when the draft became visible. Otherwise, use the time you first verified visibility. Reconciliation also reduces the risk of duplicate drafts. When an incoming record has been accepted and the monitoring feed stalls, show that the data is stale and reconcile against the source systems. A blank chart during a quiet shift and a blank chart during a failed exporter need different responses.

If you use Amazon SQS, its CloudWatch metrics help locate a queue problem. ApproximateAgeOfOldestMessage can miss repeatedly failing messages in a standard queue, and the age reported by a dead-letter queue reflects when the message entered that queue. NumberOfMessagesDeleted can count repeated deletes, and automatic redrive does not increment the destination queue’s NumberOfMessagesSent metric. Use the dead-letter queue’s visible-message count to detect parked work and the original case timestamp to measure how long that work has been waiting. AWS, Available CloudWatch Metrics for Amazon SQS · Insonl, Dead-Letter Queue for ERP Integrations: Recovery

Page for a deadline at risk or a budget burning fast

Use the three signals together to identify the likely cause, while giving urgent cases their own alert path. In the illustrative invoice workflow, rising oldest-item age, completions falling behind arrivals, and few destination errors point toward a capacity check. If the ERP starts rejecting writes, page the integration owner when affected cases are close to their deadline. Adding workers at that point can increase the number of failed attempts. An individual invoice nearing a critical cutoff needs attention even when aggregate throughput looks normal.

Set a warning threshold from the time someone needs to acknowledge the alert and recover the case. Include the time to verify that the handoff worked. Give the alert a destination owner, the approaching deadline, counts of affected cases, and a link to a filtered worklist. Document when the person on call can route to a staffed manual queue, and who can pause retries after a persistent destination error. Confirm the successful handoff before closing the incident.

Once enough cases flow through the queue, compare the observed miss share with the miss share the objective allows. That ratio is the burn rate. Require the burn rate to cross the alert threshold in both a longer window and a shorter one. The longer window shows sustained misses, and the shorter one checks whether they are still occurring. Use deadline-based counts in both windows. Replay the rule against actual arrival and cutoff patterns before enabling it, since cases due in batches can concentrate budget consumption. In a low-volume queue, use individual deadlines to catch a critical case even when the ratio is unstable. Keep the budget alert for sustained reliability problems and use the deadline alert for intervention while there is still time. Google SRE Workbook, Alerting on SLOs

Test the alert against a failure the queue can hide

In a test environment, let the AI worker finish and the broker remove the message, then make the downstream write fail. Verify that the original case stays open, confirmed completion throughput falls when expected, and the error points to the destination. Verify that the deadline alert fires with time for recovery. Let the deadline pass and verify that the SLI records one miss. Restore the destination, reconcile before replaying, and confirm that the recovered case leaves the open worklist while the historical miss stays recorded. Repeat with a lost acknowledgement and with no incoming work so the team can distinguish an unconfirmed write from an idle queue.

Sources

Request an audit for one workflow

Bring a queue your team runs and the downstream action people are waiting for. Insonl can review where the clock starts, what proves a handoff succeeded, and which failures need an alert. The audit is free. Insonl charges for any follow-on work you choose to commission. Request a free AI workflow audit