feat: show unchecked monitors and tell about regions without checkers
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 6m17s
ci / test (pull_request) Successful in 12m7s
ci / build (pull_request) Successful in 19m34s
ci / image (pull_request) Successful in 3m15s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 6m17s
ci / test (pull_request) Successful in 12m7s
ci / build (pull_request) Successful in 19m34s
ci / image (pull_request) Successful in 3m15s
A region whose checkers had all gone left its monitors looking up: the console and status pages took the last result, however old, and nobody was told. - A region's last result counts only while it is younger than the evaluator's staleness (3 intervals, at least 2 minutes); older ones show as "no data since …" in the console and leave status page components unknown instead of operational. - A monitor no region has reported for recently is marked "not being checked", counted on the dashboard with an explanation, and noted on its page. - A region watch on every API replica emails the platform's admins (platform regions) or the organization's owners (own regions) once a region with checkers and enabled monitors has had no live checker for UPTIME_REGION_ALERT_AFTER (default 5m), and again when one is back. The dashboard names such regions at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
f3d0a4c844
commit
dc2e21f964
18 files changed
+3272
-2652
No files matched your search
@@ -53,9 +53,9 @@ type Observation struct {
|
||||
Regions []string
|
||||
}
|
||||
|
||||
// staleAfter is how old a region's last result may be before the region
|
||||
// StaleAfter is how old a region's last result may be before the region
|
||||
// counts as unknown.
|
||||
func staleAfter(interval time.Duration) time.Duration {
|
||||
func StaleAfter(interval time.Duration) time.Duration {
|
||||
return max(3*interval, 2*time.Minute)
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ func (e *Evaluator) Observe(ctx context.Context, o Observation) (Transition, err
|
||||
if o.OK {
|
||||
ok = "1"
|
||||
}
|
||||
stale := e.now().Add(-staleAfter(o.Interval)).UnixMilli()
|
||||
stale := e.now().Add(-StaleAfter(o.Interval)).UnixMilli()
|
||||
args := []any{o.Region, ok, o.At.UnixMilli(), max(o.Confirmations, 1), stale, int(stateTTL.Seconds())}
|
||||
for _, r := range o.Regions {
|
||||
args = append(args, r)
|
||||
|
||||
Reference in new issue
Block a user