Skip to content

Gaps are a signal

AnalyticsHTTPSDKCLIMCPDashboardtimelineByFacettimeline_by_facet

One entity's timeline lists every interval across every queue and keeps the gaps between them, so hand-off delay is visible, not averaged away.

The situation

Machine SN-123 finished a run at 09:30, but the unload row did not open until 09:42. Twelve minutes of nobody owning the machine is exactly what a summary chart hides.

The recipe

reports/timeline.ts
const { data } = await lt.escalations.timelineByFacet({
facet: { key: 'serialNumber', value: 'SN-123' },
query: { entity: 'serialNumber' },
});
// intervals: [{ role, subtype, status, startedAt, endedAt, durationSeconds }, ...]
Recent first, then page back
ltc esc timeline serialNumber SN-123 --entity serialNumber --order desc --limit 100
ltc esc timeline serialNumber SN-123 --entity serialNumber --order desc --limit 100 \
--before 2026-10-22T09:15:00Z

Intervals come back in start order. An open interval reports endedAt: null. The time between one interval’s end and the next one’s start is untracked time, and it is left as a gap.

The guarantee

The facet match is GIN-served containment, so the stored value must be a JSON string. Gaps are preserved, never filled. Timelines always take the full read gate (read_all on every role in scope), since an entity’s history is item-level disclosure. See Analytics.