Every queue and every session reports its own numbers

Table of Contents

1. Summary

Every session operation records how long it waited for a connection, how long it ran and how many rows it moved. Every queue records its depth, what it dropped and why, and the age of its oldest entry. Each service publishes these as telemetry samples once a minute, beside the tick funnel's counters, so a slow statement, a full pool or a queue that drops shows as a number on the timeline. Nothing is measured by reading logs.

2. Detail

2.1. What is recorded

Source Numbers
A statement (A hand-written statement is declared once, typed both ways and prepared once) Executions, time, rows, by statement name
The pool (A service holds a few long-lived connections and never connects per query) Wait for a connection, connections in use
A queue (Delivery threads enqueue and a bounded pool runs the handlers) Depth, drops by reason, age of the oldest entry
A tick lane (Ticks reach the store through sharded binary COPY in bounded batches) Batches, rows, batch time, skipped duplicates
The tick funnel Published, received, dropped by reason, stored, republished

The republished count is a gauge of the lane's work. It is not the delivery meter of A source tick is stored once and entitled when it is read, which counts each delivery to each party for billing.

2.2. Where it goes

The numbers are counters and gauges in memory. A service publishes a sample of them once a minute to the telemetry service, which stores the samples as it stores the message-bus samples. Rates come from the difference between two samples, so a sample costs a few rows a minute however busy the service is.

2.3. What it is for

The tick funnel balances: a tick that is received is dropped, stored or still queued. An interval that does not balance names the stage where ticks go missing, and the rate a feed configures, set beside the rate the funnel counts, shows a feed that runs away.

3. See also

Emacs 29.3 (Org mode 9.6.15)