lab7: конфиг OpenBao вне каталога entrypoint, без disable_mlock; tail decision_wait 10s; восстановление трасс после отказа Tempo

This commit is contained in:
2026-11-12 12:51:02 +03:00
parent 83de76f19e
commit c6974baad9
5 changed files with 15 additions and 8 deletions
+6 -2
View File
@@ -262,7 +262,7 @@ def scenario_incident_worker(c):
'oldest_age_s': o.prom_value('max(messenger_jobs_oldest_age_seconds)'),
'jobs_processed_rate_1m': o.prom_value('sum(rate(messenger_jobs_processed_total[1m]))', default=0.0),
'worker_capacity_series': len(o.prom('messenger_worker_capacity')),
'rabbitmq_ready': o.prom_value('sum(rabbitmq_detailed_queue_messages_ready{queue="attachment.process"})'),
'rabbitmq_ready': o.prom_value('sum(rabbitmq_queue_messages_ready{queue="attachment.process"})'),
'api_5xx_ratio': o.prom_value('messenger:http_error_ratio:rate1m', default=0.0),
'producer_spans_since_stop': len(o.tempo_search('{name="attachment.process publish"}', t_stop)),
'consumer_spans_since_stop': len(o.tempo_search('{name="attachment.process process"}', t_stop + 2)),
@@ -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