fix(mcp): get_anomaly shows a quick Steward restart, not only a gap over 90 s (#5862)
A redeploy's new process ticks at once, so its once-a-minute samples never broke for 90 s and get_anomaly showed none of the day's restarts. The first self-monitor tick in a process now records restart_gap_secs (time since the last process's last sample), and steward_gaps shows each one as a restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -298,6 +298,7 @@ METRICS: dict[str, tuple[str, str]] = {
|
||||
"ingest_slowest_ms": ("Slowest agent post", "the longest report in the last minute; agents give up at 10 s"),
|
||||
"db_roundtrip_ms": ("Database round trip", "a trivial query to Steward's database, connection included"),
|
||||
"unwatched_secs": ("Time not watching", "how long Steward wasn't recording before this minute; 0 when unbroken"),
|
||||
"restart_gap_secs": ("Restarted after", "recorded when Steward starts: how long since it last recorded"),
|
||||
"cleanup_secs": ("Hourly cleanup took", "how long the last retention and rollup run took"),
|
||||
"backup_age_secs": ("Newest backup's age", "time since Steward last sent a backup to its bucket"),
|
||||
"backup_bytes": ("Backup size", "the size of the last backup sent"),
|
||||
|
||||
Reference in New Issue
Block a user