"""Bounded grade-4 failures, recovery and stored telemetry observations.""" from concurrent.futures import ThreadPoolExecutor import time from common import * def alerts(): return query('prometheus','/api/v1/alerts')['data']['alerts'] def main(): c=Client(BASE);alice,bob,eve,chat=c.bootstrap() result={'before':snapshot(),'incidents':[]} def wait_result(att): transitional=[] deadline=time.monotonic()+90 while time.monotonic()=2,'retry trace missing') result['retry']={'trace_id':tid,'spans':spans,'ready':True} save('incidents.json',result) # DB unavailable to active business traffic, not just /health. fault=DBLock();fault.start() observations=[];responses=[] try: with ThreadPoolExecutor(max_workers=6) as pool: deadline=time.monotonic()+45 while time.monotonic()0 for sample in snapshots for r in sample['failed']), 'export failure counter did not increase') check(all(float(r['value'][1])<=128 for sample in snapshots for r in sample['queue']), 'Collector queue exceeded configured bound') # Observe recovery, allowing the independent error-rate lookback to age out. deadline=time.monotonic()+160 while time.monotonic()