lab6: tail decision_wait 10s (потеря ошибок при 5s), измерение восстановления трасс после отказа Tempo, runbooks

This commit is contained in:
2026-11-12 12:50:19 +03:00
parent 2c09b347f2
commit 57d8d3f324
4 changed files with 45 additions and 4 deletions
+5 -1
View File
@@ -401,7 +401,11 @@ def scenario_backend_down(c):
rid = 'obs-after-' + uuid.uuid4().hex[:8]
c.call('POST', '/api/v1/chats/%s/messages' % chat['id'], 201, actor=alice, body={'text': 'after'},
headers={'Idempotency-Key': uuid.uuid4().hex, 'X-Request-Id': rid})
phase['new_trace_after_recovery'] = bool(o.find_trace('{span.request_id="%s"}' % rid, t_up - 2, timeout=90))
# gRPC-клиент Collector переподключается к Tempo с экспоненциальной паузой (до 120 s):
# измеряем, через сколько секунд после возврата Tempo новые трассы снова доступны.
got = o.find_trace('{span.request_id="%s"}' % rid, t_up - 2, timeout=240)
phase['new_trace_after_recovery'] = bool(got)
phase['traces_visible_seconds_after_tempo_up'] = round(time.time() - t_up, 1) if got else None
# Фаза 2: остановлен сам Collector — SDK отбрасывает по ограниченной очереди
compose('stop', 'otel-collector')
t_cd = time.time()
+1 -1
View File
@@ -114,7 +114,7 @@ def one_run(c, name, actor, chat, rnd):
p.wait(timeout=60)
elapsed = time.time() - t_start
cpu1 = {cid: o.cpu_usec(cid) for cid in api + col}
time.sleep(15) # tail decision_wait 5 s + batch + экспорт метрик + scrape
time.sleep(20) # tail decision_wait 10 s + batch + экспорт метрик + scrape
c1 = counters()
s = load.summary(exclude=windows)
recs = load.records