Skip to content

Lite bands no collection freshness, so a server can go quiet and stay green #2452

Description

@erikdarlingdata

Two things #2437's Lite half (#2451) surfaced and deliberately did not fix, because both are wider than a tooltip.

1. Lite bands no collection freshness at all, so a card can go quiet and stay green

Writing Lite's card tooltip meant reading every signal the card actually carries. It carries five metric rows and a status word, and none of them is freshness.

  • LastCollectionDisplay renders HH:mm:ss in the plain ForegroundBrush — no band, no brush, no threshold. A timestamp from four hours ago looks exactly like one from four seconds ago.
  • ServerSummaryItem.IsOnline comes from _serverManager.GetConnectionStatus(...) — a live connection check, which succeeds whether or not anything is being collected.
  • HasCollectorErrors comes from ErroringCollectors > 0, which counts collectors with ConsecutiveErrors > 0. A collector that silently returns nothing, or one that has stopped being scheduled, increments nothing.

So the failure mode is: the connection is fine, no collector is erroring, and the store has had no new rows for hours. Lite's card shows a green "Online", a neutral border, and a stale timestamp nobody is asked to read. The Darling viewer bands exactly this and calls it Warning — collection stale (ServerHealthThresholds.StaleThreshold = 2x the fastest collector's cadence, OfflineThreshold = 15 minutes).

The tooltip added in #2451 does not paper over this, on purpose: it is built from the card's own rows precisely so it cannot assert a band the card does not show. Adding a "collection stale" clause to the tooltip while the row underneath stays uncoloured would have been the exact drift that property exists to prevent.

What would settle it: the thresholds already live once, in PerformanceMonitor.Common's ServerHealthThresholds, and Lite already has LastCollectionTime on the card. So the options are:

  1. Band the Last Collect row from ServerHealthThresholds and let the tooltip name it, the way it names CPU and Blocking today. Smallest change, keeps the card as the single source, and the tooltip picks it up for free through the existing gate pattern.
  2. Fold freshness into the status word, as the viewer does — which would make Lite's ServerCardStatus.CollectorErrors mean two things again, and is the shape Say why the card is amber, and give "+52 more" somewhere to go (#2424) #2429 spent four review rounds untangling. Probably wrong here.
  3. Leave it, and accept that Lite reports collector errors but not collector silence.

The measurement that should decide: whether Lite installs actually see collection stop without a collector erroring. Lite's collection_log equivalent per server would show it directly — if a gap of more than a few cadences with zero ERROR rows is common, option 1 is not optional.

2. ServerConnection.DotStatus is a fourth copy of the same four-word ladder

Lite/Models/ServerConnection.cs:199 computes "Unknown" | "Online" | "Warning" | "Offline" from its own (IsOnline, HasCollectorErrors) pair, for the sidebar row's dot.

#2451 collapsed the Overview card's three readings of that pair into one ServerCardStatus, for the reason #2429 established: with one discriminant there is no flag combination left for the renderings to disagree about. DotStatus is a different type on a different surface and was out of that PR's lane, but it is now the remaining place the same words are derived independently — the sidebar and the card can say different things about the same server, and nothing would notice.

It also has no tooltip, which is the #2422 complaint one surface over.

Low priority on its own; worth doing at the same time as (1), since a freshness band would otherwise need writing twice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions