feat(harness): hold recovery while a Grafana alert is firing, add legacy:busy host resolution

キャンペーン第 2 回のグレーゾーン 3 件を受けた変更。SLO 3 系列に現れない症状
(レプリケーション一時停止、メモリ圧迫)でも、受信中のアラートが解決するまで
recovered を出さないよう、AlertRouter が firing 中のアラートを保持し judge が
alerts_ok を条件に加える。legacy:busy は直近 2 分で最も多くリクエストを受けた
MIG インスタンス(Mimir topk)を指し、run+シナリオ単位でキャッシュして revert が
同じインスタンスに当たるようにする(ILB のハッシュで api の接続が 1 台に偏る)。
This commit is contained in:
seon committed 2026-10-08 19:20:35 +09:00
1 parent 13797e5741
commit cd8fbdddab
4 files changed
+109 -7

No files matched your search

+7 -5
View File
@@ -10,6 +10,7 @@ import (
"net/http"
"os"
"strings"
"sync"
"time"
"github.com/prometheus/client_golang/prometheus"
@@ -74,11 +75,12 @@ var (
)
type App struct {
cfg Config
store *Store
scen map[string]*Scenario
runs *RunManager
hooks *AlertRouter
cfg Config
store *Store
scen map[string]*Scenario
runs *RunManager
hooks *AlertRouter
busyLegacy sync.Map // run/scenario -> gceInstance chosen for legacy:busy (gcp.go)
}
func main() {