feat: telemetry cost profile with head sampling, coarse buckets and balanced tail sampling

- [telemetry] trace_sample_ratio (ParentBased(TraceIdRatioBased), 1 keeps
  ParentBased(ALWAYS_ON)) and metric_buckets (default|coarse with SLO bounds),
  export interval <= 30 s; otel.sdk.span.started, span.live dropped; startup
  records name ratio, buckets and interval
- bench: telemetry services on mtusi-bench, TELEMETRY=on switch for uploads
  and queue, make bench_telemetry[_quick] with off/full/full-aa/head/tail/
  metrics/balanced, rare events, lookup from Tempo/Loki/Prometheus, cost
  sampler, verdicts H1-H8 and B1-B5; collector layers and lean Prometheus in
  bench/otel with preflight checks
- REPORT: telemetry cost hypotheses and criteria before the label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 19:17:25 +03:00
co-authored by Claude Opus 5.5
parent 37f86801d6
commit 509afca89e
43 changed files with 5784 additions and 159 deletions
+7
View File
@@ -420,6 +420,13 @@ Design change `otel-telemetry`, решения 1, 7, 14–20; правила к
раньше сервера, тот падал на `eacces`. Стенд с нуля проверяет `driver.py stand-from-scratch`
(свой проект, удаляет свои volumes сам).
- **`restart.sh`** сервисы телеметрии не трогает (решение 6).
- **Стенд `bench/`** (design change `track1-telemetry-cost`, решения 1, 13): те же сервисы и
конфигурации под проектом `mtusi-bench` — `container_name` `mtusi-bench-<сервис>`, `restart:
"no"`, лимиты `BENCH_*` (поля `Profile`, рабочего стенда, сверка с этим файлом до стенда), без
swap и портов, сеть `telemetry` — имя `mtusi-bench-telemetry`; Grafana описана, порт сброшен, не
запускается. Запускают их только профиль цены телеметрии и `TELEMETRY=on` (`bench.md`). Правка
лимитов или образа сервиса телеметрии здесь — та же правка полей `Profile` в `bench/run.py`,
иначе профили с телеметрией откажут до стенда (код 2).
- **Суммы:** постоянные лимиты 11,5 CPU / 7296 МиБ, с одноразовыми 12,5 CPU / 7680 МиБ при ВМ
12 CPU / 7934 МиБ; телеметрия — 2,5 CPU / 2304 МиБ (Collector 256, Prometheus 384, Loki 512,
Tempo 640, Grafana 512); пики и правило «лимит ≥ 1,5 × пика» — `evidence/telemetry/budget.md`;