feat(health): oldest-parked-message age on the site health report (parked-retention aging signal)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user