feat(health): oldest-parked-message age on the site health report (parked-retention aging signal)

This commit is contained in:
Joseph Doherty
2026-07-08 21:49:29 -04:00
parent 0321ad0c20
commit 11c72ecf0f
6 changed files with 88 additions and 2 deletions
@@ -107,6 +107,15 @@ public class HealthReportSender : BackgroundService
{
var parkedCount = await _sfStorage.GetParkedMessageCountAsync();
_collector.SetParkedMessageCount(parkedCount);
// Parked-retention aging signal: age of the oldest parked row
// (null when none are parked), so a forgotten site's stale
// backlog is visible by age, not just count.
var oldestParked = await _sfStorage.GetOldestParkedCreatedAtAsync();
_collector.SetOldestParkedMessageAgeSeconds(
oldestParked.HasValue
? (DateTimeOffset.UtcNow - oldestParked.Value).TotalSeconds
: null);
}
catch (Exception ex)
{