# ЛР 6 — БВТ2301 — Владимирцева — на 5 #55
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: lab6-bench
|
||||
description: Load measurements of lab 6 for grade 5, track 1 "cost of observability" — telemetry off/full, head sampling, typical and balanced tail sampling with metric aggregation (profile telemetry) under one open load with rare events of known count; latency, replica CPU per request, container CPU/RAM, ingest of Collector/Tempo/Loki/Prometheus, telemetry losses, which errors and slow requests the sampling keeps. Use when asked to run benchmarks, make bench-telemetry (or bench-telemetry-quick), or fill REPORT.md with measured numbers and the outcomes of hypotheses T1–T7 and criteria S1–S5.
|
||||
---
|
||||
|
||||
# Замеры лабы 6 (трек 1)
|
||||
|
||||
Сначала прочитай целиком (`cat`): **`bench/RUNBOOK.md`** (порядок шагов),
|
||||
`bench/AGENTS.md` (правила стенда), корневой `AGENTS.md` (разделы 2,
|
||||
8–11 действуют всегда), в `REPORT.md` — раздел «Трек 1. Цена
|
||||
наблюдаемости» (гипотезы и пороги записаны до замеров).
|
||||
|
||||
Коротко:
|
||||
|
||||
1. Шаг 0 RUNBOOK: ресурсы ВМ Docker (≥ 10 CPU, ≥ 7,7 ГиБ), самопроверки
|
||||
разбора (`bench/telemetry.py --selftest` и остальные), `make up`,
|
||||
`make test`, `make telemetry-check`, `make test-isolated`, `make
|
||||
failure-checks`, `make stop`, самопроверка `make bench-telemetry-quick`
|
||||
(~7 мин). Остановка и отчёт пользователю.
|
||||
2. Шаг 1: `make bench-telemetry` (~50 мин) → `evidence/telemetry-cost/baseline/`;
|
||||
таблицы и итоги T1–T7, S1–S5 из `summary.md` — в `REPORT.md` (строки
|
||||
`TODO (Codex)`). Остановка и отчёт.
|
||||
3. Шаг 2: `make lint`, `make check`, `make test-isolated`, абзац
|
||||
«Состояние» в `AGENTS.md`, уборка `vlad-bench*`.
|
||||
|
||||
Нельзя: переписывать гипотезы, пороги и критерии после замеров, менять
|
||||
код приложения, профиль или слои `bench/otel/` ради результата, править
|
||||
файлы меток руками, перезаписывать или удалять каталоги меток без
|
||||
согласия, считать числа вручную вместо `summary.md`, переводить рабочий
|
||||
стенд на `balanced`. Если `balanced` не прошёл — правило из `REPORT.md`,
|
||||
новая метка только с согласия пользователя. Долгое — в фоне с журналом
|
||||
(`nohup make … > /tmp/bench-*.log 2>&1 &`), docker — вне sandbox с
|
||||
одобрения пользователя. `aborted`, `host_warnings`, `not_applied`,
|
||||
упавшие проверки — остановиться и сказать пользователю.
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
name: messenger-stand
|
||||
description: Run, check and operate the lab 6 messenger stand — HAProxy with API replicas, PostgreSQL, Valkey, SeaweedFS S3, RabbitMQ, relay, image worker, cleaner, plus the telemetry stack (OTel Collector, Prometheus, Loki, Tempo, Grafana). Use when asked to start or stop the stand, run make test / student-test / test-isolated / failure-checks / s3-check, telemetry-check / trace-chain / alerts-test / alerts-check / telemetry-outage, open Grafana, show the defense scenario (worker stopped → 202 → restart → ready, firing → resolved), inspect the pipeline state, list or replay failed jobs, stop one replica, run cleanup or reconcile, do a rolling update, or reproduce an API bug over HTTP.
|
||||
---
|
||||
|
||||
# Стенд мессенджера лабы 6
|
||||
|
||||
Команды — корневой `AGENTS.md`, раздел 4; устройство стенда, брокер, S3,
|
||||
worker, телеметрия, таймауты, скрипты — `infra/AGENTS.md`; pipeline —
|
||||
`src/services/AGENTS.md`; тесты — `student-tests/AGENTS.md`.
|
||||
|
||||
| Задача | Команда |
|
||||
|---|---|
|
||||
| поднять стенд целиком | `make up` → `127.0.0.1:${HOST_PORT:-8180}` |
|
||||
| адрес Grafana и dashboard | `make grafana` (порт `GRAFANA_HOST_PORT`, 3180) |
|
||||
| связь трасса ↔ лог, метрики, утечки | `make telemetry-check` |
|
||||
| одна трасса API → relay → worker с retry | `make trace-chain` |
|
||||
| правила Prometheus: promtool check и test | `make alerts-test` |
|
||||
| alerts firing → resolved на реальных отказах (~6,5 мин) | `make alerts-check` |
|
||||
| Tempo недоступен под нагрузкой | `make telemetry-outage [OUTAGE_SECONDS=120]` |
|
||||
| журнал Collector, Prometheus, Loki, Tempo, Grafana | `make logs-telemetry` |
|
||||
| публичный smoke / свои тесты | `make test`, `make student-test` |
|
||||
| всё на чистом отдельном стенде | `make test-isolated` |
|
||||
| проверки отказов (в том числе pipeline) | `make failure-checks [FAULT_ARGS=-rP]` |
|
||||
| сценарий защиты, шаги 2–3 | `make defense` |
|
||||
| задания по состояниям и очередь брокера | `make pipeline-state` |
|
||||
| реестр failed / возврат | `make replay [ERROR_CODE=…]` / `make replay APPLY=1 ATTACHMENT=<id> OPERATOR=<кто> REASON=<зачем>` |
|
||||
| остановить / запустить worker | `make stop-worker` / `make start-worker` |
|
||||
| журнал relay и worker | `make logs-pipeline` |
|
||||
| приватность bucket вне API | `make s3-check` |
|
||||
| вложение после остановки принявшей реплики | `make attachment-failover [STOP_MODE=kill]` |
|
||||
| реплики за LB | `make instances`, `make lb-stats`, `make failover-each` |
|
||||
| уборка / сверка (dry-run) | `make cleanup-once` / `make reconcile [STRATEGY=head] [DEEP=1]` |
|
||||
| обновить код без простоя | `make rolling-update` |
|
||||
| остановить / удалить контейнеры | `make stop` / `make down` (volume остаются) |
|
||||
|
||||
Правила:
|
||||
|
||||
- Порт занят другим сервисом — не убивать процесс: другие порты в `.env`
|
||||
(`make env HOST_PORT=… POSTGRES_HOST_PORT=… VALKEY_HOST_PORT=…
|
||||
S3_HOST_PORT=… BROKER_HOST_PORT=… GRAFANA_HOST_PORT=…` до первого `make up`) и
|
||||
`BASE_URL=http://localhost:<порт>` у тестов и `make defense`.
|
||||
- `make defense` останавливает worker и перезапускает хранилища и брокер
|
||||
рабочего стенда (`scripts/restart.sh`); worker запускается при любом
|
||||
исходе.
|
||||
- `make alerts-check` останавливает worker и блокирует таблицу `sessions`
|
||||
на рабочем стенде, `make telemetry-outage` — останавливает Tempo; оба
|
||||
возвращают сервис при любом исходе, запускать с согласия пользователя.
|
||||
- `make replay APPLY=1` и `make reconcile APPLY=1` меняют рабочий стенд —
|
||||
только с согласия пользователя; без `APPLY` — только показ.
|
||||
- `make wipe`, `docker compose down -v` и любое удаление volume — только
|
||||
с согласия пользователя.
|
||||
- Пароли, ключи S3 и брокера из `.env`, токены не печатать; в
|
||||
`evidence/` — только обезличенный вывод (`evidence/AGENTS.md`).
|
||||
@@ -0,0 +1,190 @@
|
||||
# Правила команд Codex для проекта (execpolicy, Starlark).
|
||||
#
|
||||
# Действуют на команды, которые Codex запускает вне sandbox (docker, сеть):
|
||||
# allow — без вопроса;
|
||||
# prompt — спросить пользователя перед каждым запуском;
|
||||
# forbidden — не запускать никогда.
|
||||
# Несколько совпавших правил — побеждает самое строгое (forbidden →
|
||||
# prompt → allow). pattern — точный префикс аргументов команды; список в
|
||||
# позиции — варианты. match / not_match — примеры, которые Codex
|
||||
# проверяет при загрузке правил.
|
||||
#
|
||||
# Файл загружается, только если проект доверенный (слой .codex/ проекта
|
||||
# trusted). После правки — перезапустить Codex. Проверка правила (команда —
|
||||
# без «--» перед ней: с ним ничего не сопоставляется):
|
||||
# codex execpolicy check --pretty --rules "$PWD/.codex/rules/messenger.rules" git push
|
||||
#
|
||||
# Источник запретов — корневой AGENTS.md, раздел 2 «Нельзя»; правила их
|
||||
# дублируют на уровне команд, но не заменяют.
|
||||
|
||||
# --- git: только смотреть; изменения — по просьбе пользователя -------------
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["git", ["status", "diff", "log", "show", "rev-parse", "ls-files"]],
|
||||
decision = "allow",
|
||||
justification = "Read-only git commands are always fine.",
|
||||
match = ["git status", "git diff --stat", "git log --oneline -5"],
|
||||
not_match = ["git commit -m x"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["git", ["commit", "checkout", "switch", "reset", "stash", "rebase", "merge", "restore", "tag", "branch"]],
|
||||
decision = "prompt",
|
||||
justification = "AGENTS.md: git changes only when the user asked for them (commit message in English, conventional style).",
|
||||
match = ["git commit -m 'feat: x'", "git reset --hard", "git checkout main"],
|
||||
not_match = ["git status"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["git", ["push", "clean"]],
|
||||
decision = "forbidden",
|
||||
justification = "Never push or clean the working tree: the user does it; git clean would delete evidence and local files.",
|
||||
match = ["git push", "git push origin main", "git clean -fdx"],
|
||||
)
|
||||
|
||||
# --- данные стендов: удаление только с согласия -----------------------------
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["make", "wipe"],
|
||||
decision = "prompt",
|
||||
justification = "make wipe deletes the working stand volume (all data). Ask the user first (AGENTS.md, section 2, item 8).",
|
||||
match = ["make wipe"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["docker", "compose", "down", "-v"],
|
||||
decision = "prompt",
|
||||
justification = "down -v deletes volumes. The bench and test stands remove their own projects themselves; for the working stand ask the user.",
|
||||
match = ["docker compose down -v", "docker compose down -v --remove-orphans"],
|
||||
not_match = ["docker compose down"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["docker", "volume", ["rm", "prune"]],
|
||||
decision = "prompt",
|
||||
justification = "Deleting volumes deletes data: only bench leftovers (vlad-bench*) and only with the user's consent.",
|
||||
match = ["docker volume rm vlad-bench_pgdata", "docker volume prune -f"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["docker", ["rm", "kill", "stop", "pause"]],
|
||||
decision = "prompt",
|
||||
justification = "Only own containers (vladimirceva-lab6*, vlad-bench*); never containers of other projects.",
|
||||
match = ["docker rm -f vlad-bench-gen", "docker stop some-container"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["docker", ["system", "builder", "image", "container", "network"], "prune"],
|
||||
decision = "forbidden",
|
||||
justification = "Prune touches every project on this machine. Remove own leftovers by name instead (bench/AGENTS.md).",
|
||||
match = ["docker system prune -af", "docker image prune -a"],
|
||||
)
|
||||
|
||||
# --- процессы: не убивать по порту вслепую ------------------------------------
|
||||
|
||||
prefix_rule(
|
||||
pattern = [["kill", "pkill", "killall"]],
|
||||
decision = "prompt",
|
||||
justification = "Kill only a PID whose command is `python -m src` (AGENTS.md, section 10). A published port on macOS belongs to com.docker.backend: killing it stops Docker Desktop.",
|
||||
match = ["kill 12345", "pkill -f uvicorn"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["rm", ["-rf", "-fr", "-r"]],
|
||||
decision = "prompt",
|
||||
justification = "Recursive delete: label folders in evidence/ are removed only with the user's consent (bench/AGENTS.md).",
|
||||
match = ["rm -rf evidence/scaling/quick-x"],
|
||||
)
|
||||
|
||||
# --- проект: проверки, стенд, замеры — без вопроса ----------------------------
|
||||
|
||||
prefix_rule(
|
||||
pattern = [
|
||||
"make",
|
||||
[
|
||||
"install", "lint", "fmt", "check", "validate", "test", "load",
|
||||
"test-persistence", "test-failover", "student-test", "test-isolated",
|
||||
"failure-checks", "requirements", "requirements-check", "env",
|
||||
"docker-build", "up", "stop", "down", "logs", "db-up", "run",
|
||||
"migrate-local", "replicas", "instances", "lb-stats",
|
||||
"failover-each", "rolling-update",
|
||||
"attachment-failover", "s3-check", "cleanup-once",
|
||||
"stop-worker", "start-worker", "defense", "pipeline-state",
|
||||
"logs-pipeline", "run-relay", "run-worker",
|
||||
"unit-test", "grafana", "logs-telemetry", "telemetry-check",
|
||||
"trace-chain", "alerts-test", "alerts-check", "telemetry-outage",
|
||||
"bench-telemetry", "bench-telemetry-quick",
|
||||
"bench-queue", "bench-queue-quick",
|
||||
"bench-uploads", "bench-uploads-quick", "bench-reconcile",
|
||||
"bench-reconcile-quick",
|
||||
"bench-failover", "bench-failover-quick", "bench-rollout",
|
||||
"bench-rollout-quick", "bench-scaling", "bench-scaling-quick",
|
||||
"bench-compare", "bench-plots",
|
||||
],
|
||||
],
|
||||
decision = "allow",
|
||||
justification = "Project targets: checks, the working stand without deleting data, bench profiles (bench/RUNBOOK.md).",
|
||||
match = ["make lint", "make test-isolated", "make bench-telemetry", "make bench-telemetry-quick", "make telemetry-check", "make failover-each STOP_MODE=kill"],
|
||||
not_match = ["make wipe", "make reconcile APPLY=1", "make replay APPLY=1"],
|
||||
)
|
||||
|
||||
# реестр failed: показ ничего не меняет
|
||||
prefix_rule(
|
||||
pattern = ["make", "replay"],
|
||||
decision = "allow",
|
||||
justification = "Without APPLY=1 replay only lists failed jobs.",
|
||||
match = ["make replay", "make replay ERROR_CODE=retry_exhausted"],
|
||||
)
|
||||
|
||||
# возврат failed в очередь меняет рабочую базу: спросить пользователя
|
||||
prefix_rule(
|
||||
pattern = ["make", "replay", "APPLY=1"],
|
||||
decision = "prompt",
|
||||
justification = "replay --apply returns failed jobs to the queue of the working stand and writes an audit row: ask the user first.",
|
||||
match = ["make replay APPLY=1 ATTACHMENT=x OPERATOR=me REASON=s3"],
|
||||
)
|
||||
|
||||
# make reconcile без APPLY — dry-run: ничего не меняет
|
||||
prefix_rule(
|
||||
pattern = ["make", "reconcile"],
|
||||
decision = "allow",
|
||||
justification = "Dry-run reconcile only reports discrepancies (exit 0 or 3).",
|
||||
match = ["make reconcile", "make reconcile STRATEGY=head DEEP=1"],
|
||||
)
|
||||
|
||||
# с APPLY=1 сверка удаляет объекты без строки и помечает потерянные
|
||||
# оригиналы в рабочей базе: спросить пользователя
|
||||
prefix_rule(
|
||||
pattern = ["make", "reconcile", "APPLY=1"],
|
||||
decision = "prompt",
|
||||
justification = "reconcile --apply deletes orphan objects and marks lost originals in the working stand: ask the user first.",
|
||||
match = ["make reconcile APPLY=1", "make reconcile APPLY=1 MAX_CHANGES=10"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["docker", ["ps", "info", "version", "inspect", "logs", "images", "events", "exec", "cp", "build", "tag", "run", "start", "unpause"]],
|
||||
decision = "allow",
|
||||
justification = "Inspecting and running own stand containers; deletion is covered by stricter rules above.",
|
||||
match = ["docker ps -a", "docker info", "docker logs -t vlad-bench-lb"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["docker", "compose"],
|
||||
decision = "allow",
|
||||
justification = "Compose of this project; down -v is prompted by the stricter rule above.",
|
||||
match = ["docker compose ps", "docker compose logs api"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = ["uv", ["run", "sync", "lock", "export"]],
|
||||
decision = "allow",
|
||||
justification = "Project environment from uv.lock; new dependencies still need the user's consent (AGENTS.md, section 2, item 11).",
|
||||
match = ["uv run pytest", "uv sync", "uv run python bench/telemetry.py --selftest"],
|
||||
)
|
||||
|
||||
prefix_rule(
|
||||
pattern = [["python3", "python"], ["scripts/lab6.py", "student-tests/stand.py", "tests/smoke.py", "tests/resilience.py", "scripts/check_contract.py"]],
|
||||
decision = "allow",
|
||||
justification = "Project scripts on the host Python (stdlib only).",
|
||||
match = ["python3 scripts/lab6.py s3-check", "python3 student-tests/stand.py isolated"],
|
||||
)
|
||||
@@ -18,3 +18,17 @@ __pycache__
|
||||
node_modules
|
||||
evidence
|
||||
.DS_Store
|
||||
.codex
|
||||
.agents
|
||||
tests
|
||||
student-tests
|
||||
bench
|
||||
contracts
|
||||
infra
|
||||
scripts
|
||||
**/AGENTS.md
|
||||
**/__pycache__
|
||||
**/*.pyc
|
||||
**/.DS_Store
|
||||
*.md
|
||||
**/*.md
|
||||
|
||||
+52
-1
@@ -1,6 +1,7 @@
|
||||
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
|
||||
# These are logical interface suggestions; map actual framework names in REPORT.md.
|
||||
APP_HOST=0.0.0.0
|
||||
# Host process (make run); the container binds 0.0.0.0 in Dockerfile.
|
||||
APP_HOST=127.0.0.1
|
||||
APP_PORT=8080
|
||||
APP_ENV=lab
|
||||
SESSION_TTL_SECONDS=3600
|
||||
@@ -11,6 +12,8 @@ SESSION_STORE=postgres
|
||||
CACHE_URL_FILE=/run/secrets/cache_url
|
||||
API_REPLICAS=2
|
||||
IDEMPOTENCY_TTL_SECONDS=86400
|
||||
# Lab 4 logical names (skeleton). Containers get S3_ENDPOINT from compose.yaml,
|
||||
# make run overrides it with 127.0.0.1:S3_HOST_PORT; keys come from the lines below.
|
||||
S3_ENDPOINT=http://s3:9000
|
||||
S3_REGION=us-east-1
|
||||
S3_BUCKET=messenger-attachments
|
||||
@@ -18,13 +21,61 @@ S3_ACCESS_KEY_ID_FILE=/run/secrets/s3_access_key_id
|
||||
S3_SECRET_ACCESS_KEY_FILE=/run/secrets/s3_secret_access_key
|
||||
MAX_UPLOAD_BYTES=10485760
|
||||
MAX_IMAGE_PIXELS=40000000
|
||||
# Lab 5 logical names (skeleton). BROKER_URL_FILE is not used: relay and worker
|
||||
# get BROKER_HOST/BROKER_PASSWORD from compose.yaml (REPORT.md, «Конфигурация»).
|
||||
BROKER_URL_FILE=/run/secrets/broker_url
|
||||
WORKER_CONCURRENCY=2
|
||||
JOB_MAX_ATTEMPTS=5
|
||||
JOB_TIMEOUT_SECONDS=60
|
||||
STAGING_RETENTION_SECONDS=86400
|
||||
# Lab 6 names (skeleton). service.name is fixed by each entry point
|
||||
# (messenger-api, messenger-worker, messenger-relay), so OTEL_SERVICE_NAME is
|
||||
# not read; compose.yaml points api, worker and relay at the Collector by name.
|
||||
# Only deployment.environment.name is accepted in OTEL_RESOURCE_ATTRIBUTES.
|
||||
# make run sets OTEL_SDK_DISABLED=true for host processes.
|
||||
OTEL_SERVICE_NAME=messenger-api
|
||||
# Worker must set a distinct service.name.
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
|
||||
OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=lab
|
||||
|
||||
# Compose and make run. make env fills the empty passwords and keys locally.
|
||||
HOST_PORT=8080
|
||||
POSTGRES_USER=messenger
|
||||
POSTGRES_DB=messenger
|
||||
POSTGRES_PASSWORD=
|
||||
POSTGRES_HOST_PORT=5433
|
||||
VALKEY_PASSWORD=
|
||||
VALKEY_HOST_PORT=6380
|
||||
LOG_LEVEL=INFO
|
||||
SHUTDOWN_TIMEOUT=5
|
||||
# S3 (SeaweedFS): the root pair and the signing key stay with the s3 server;
|
||||
# api, worker and cleaner have their own users created by s3-bootstrap.
|
||||
S3_HOST_PORT=8334
|
||||
S3_ROOT_ACCESS_KEY=
|
||||
S3_ROOT_SECRET_KEY=
|
||||
S3_JWT_SIGNING_KEY=
|
||||
S3_API_ACCESS_KEY=
|
||||
S3_API_SECRET_KEY=
|
||||
S3_WORKER_ACCESS_KEY=
|
||||
S3_WORKER_SECRET_KEY=
|
||||
S3_CLEANER_ACCESS_KEY=
|
||||
S3_CLEANER_SECRET_KEY=
|
||||
# RabbitMQ (lab 5): only relay and worker get the password.
|
||||
BROKER_PASSWORD=
|
||||
BROKER_HOST_PORT=5673
|
||||
WORKER_PREFETCH=2
|
||||
RENDER_MEMORY_MB=768
|
||||
UPLOAD_MAX_UNFINISHED=300
|
||||
# Observability (lab 6): Grafana on 127.0.0.1, admin password generated by
|
||||
# make env. Telemetry knobs (defaults = full telemetry; track 1 changes them):
|
||||
# OTEL_SDK_DISABLED=true switches the SDK off in api, worker and relay;
|
||||
# OTEL_TRACES_SAMPLER_ARG is the share of root traces kept (0..1);
|
||||
# OTEL_METRIC_EXPORT_INTERVAL is in ms; TELEMETRY_HISTOGRAM_BUCKETS is
|
||||
# default or coarse.
|
||||
GRAFANA_HOST_PORT=3180
|
||||
GRAFANA_ADMIN_PASSWORD=
|
||||
OTEL_SDK_DISABLED=false
|
||||
OTEL_TRACES_SAMPLER_ARG=1.0
|
||||
OTEL_METRIC_EXPORT_INTERVAL=15000
|
||||
TELEMETRY_HISTOGRAM_BUCKETS=default
|
||||
|
||||
+11
@@ -15,6 +15,7 @@ data/
|
||||
backups/
|
||||
# Runtime/build artifacts
|
||||
.venv/
|
||||
.local-tools/
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
node_modules/
|
||||
@@ -25,8 +26,18 @@ bin/
|
||||
obj/
|
||||
coverage/
|
||||
*.log
|
||||
!evidence/**/raw/*.log
|
||||
.DS_Store
|
||||
.idea/
|
||||
.vscode/
|
||||
# Temporary benchmark state and self-check results are not submission evidence.
|
||||
bench/.bench.lock
|
||||
evidence/failover/quick-*/
|
||||
evidence/rollout/quick-*/
|
||||
evidence/scaling/quick-*/
|
||||
evidence/uploads/quick-*/
|
||||
evidence/reconcile/quick-*/
|
||||
evidence/queue/quick-*/
|
||||
evidence/telemetry-cost/quick-*/
|
||||
# Keep small, sanitized evidence summaries in evidence/ under version control.
|
||||
# Inspect git diff --cached: ignore rules are not a secret scanner.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
3.13
|
||||
@@ -0,0 +1,315 @@
|
||||
# AGENTS.md — мессенджер MTUSI, лабораторная 6
|
||||
|
||||
REST API мессенджера с вложениями-изображениями и фоновой обработкой:
|
||||
реплики API за HAProxy; PostgreSQL — источник истины (данные, сессии,
|
||||
ключи идемпотентности, метаданные вложений, **задания обработки**);
|
||||
Valkey — кэш карточек чатов; S3 (SeaweedFS) — staging и опубликованные
|
||||
файлы; RabbitMQ — сообщения о заданиях; relay — outbox → брокер; worker —
|
||||
обработка изображений в отдельном процессе; cleaner — уборка и сверка.
|
||||
Загрузка отвечает **202 `queued`**, готовность клиент узнаёт из метаданных
|
||||
(`ready` с вариантами `thumbnail`, `crop`, `optimized` или `failed` с
|
||||
`error_code`). Бизнес-код перенесён из лабы 5 (`mtusi2026lab5-vladimirceva`) без
|
||||
изменения поведения; в лабе 6 добавлена наблюдаемость: OpenTelemetry SDK в api,
|
||||
relay и worker, Collector, Prometheus, Loki, Tempo, Grafana, перенос trace
|
||||
context через очередь, SLO и alerts. Цель — **«5»**: уровни 3 и 4 `README.md`
|
||||
и трек 1 «Цена наблюдаемости».
|
||||
|
||||
**Состояние (16 ноября 2026).** Лаба 6 и трек 1 завершены локально.
|
||||
Код приложения заморожен: `src_sha256` 81c47ffc…; Git подключён к Gitea,
|
||||
база `main@470d9d6`. На машине замеров прошли 38 unit, 178 isolated
|
||||
(все resilience hooks 0), 34 fault и 22/22 telemetry-check. Полная метка
|
||||
`evidence/telemetry-cost/baseline-after-restart/`: 15/15 за 48,9 мин,
|
||||
без flags, потерь и host_warnings, прирост swap 0; T1 и T3 опровергнуты,
|
||||
T2 и T4–T7 подтверждены, S1–S5 выполнены. Таблицы и выводы — `REPORT.md`.
|
||||
Финальные lint/check и повторный isolated (178 passed, все resilience 0)
|
||||
прошли; доказательство `evidence/tests/final-check-20261116.txt`, всё своё остановлено.
|
||||
Первая `baseline` прервана при host swap и сохранена; перед выбранной
|
||||
меткой Docker перезапущен. Пользователь согласовал PostgreSQL профиля
|
||||
2 → 1 CPU (сумма 9,75 CPU) под Apple M4 с 10 ядрами и автономное
|
||||
прохождение всех шагов. ВМ — 10 CPU / 7,65 ГиБ; точный минимум памяти
|
||||
6,125 + 1,5 = 7,625 ГиБ. Запуск на старом Docker Desktop — через
|
||||
`tools/docker-compat/` (Compose 5.6.1, см. отчёт). Гипотезы и пороги
|
||||
записаны до замеров и не переписывались. Рабочая конфигурация — full.
|
||||
|
||||
**Аудит перед сдачей (20 ноября 2026).** Пользователь опубликовал решение
|
||||
`4f4e07a` в `solution/bvt2301-vladimirceva`. Отчёт уточнён по реальному
|
||||
окружению и условному SLI ready; в Grafana уточнены только подписи SLO.
|
||||
Повторены smoke, telemetry 22/22, promtool 7 правил, alerts 6/6,
|
||||
диагностика по реальным Tempo/Loki 7/7, retry 9/9 и outage 5/5:
|
||||
`evidence/telemetry/submission-review-20261120.txt`. Хеш приложения и
|
||||
конфигурации измеренных вариантов совпадают с паспортом 16 ноября.
|
||||
|
||||
Стек: Python 3.13, FastAPI, uvicorn, pydantic v2, SQLAlchemy Core 2.1 +
|
||||
asyncpg, alembic, argon2-cffi, redis-py, aiobotocore 3.x, aio-pika 10,
|
||||
Pillow 12 (только в процессе рендера), OpenTelemetry API/SDK/OTLP-HTTP 1.45;
|
||||
PostgreSQL 18.6, Valkey 9.1.2, HAProxy 3.4.6, SeaweedFS 4.48, RabbitMQ 4.3.7,
|
||||
OpenTelemetry Collector contrib 0.164, Prometheus 3.15, Loki 3.7, Tempo 3.1,
|
||||
Grafana 13.3; uv, pip + `requirements.txt` с хешами (в образе), pytest + httpx.
|
||||
|
||||
## 1. Где инструкции и как их читать
|
||||
|
||||
Codex сам загружает `AGENTS.md` от корня до рабочего каталога (вместе — не
|
||||
больше 32 КиБ). Правила слоёв лежат глубже, поэтому **перед правкой файла
|
||||
прочитай каждый `AGENTS.md` на пути к нему** (`cat`).
|
||||
|
||||
| Файл | Когда читать |
|
||||
|---|---|
|
||||
| `AGENTS.md` (этот) | всегда: запреты, команды, карта, Definition of Done |
|
||||
| `src/AGENTS.md` | любая правка в `src/`: слои, импорты, процессы, ошибки, конфиг (таблица переменных), логи, `src/telemetry/` |
|
||||
| `src/api/AGENTS.md` | роуты, схемы, middleware, вход, `X-Instance-Id`, `Idempotency-Key`, вложения |
|
||||
| `src/services/AGENTS.md` | бизнес-правила, загрузка, worker, relay, replay, уборка и сверка |
|
||||
| `src/storage/AGENTS.md` | PostgreSQL: транзакции, гонки, вложения, задания и fencing; кэш; объекты S3 |
|
||||
| `migrations/AGENTS.md` | схема, новые ревизии, совместимость с работающей версией |
|
||||
| `infra/AGENTS.md` | `Dockerfile`, `compose.yaml`, S3, брокер, relay, worker, HAProxy, `scripts/*`, `infra/otel/` (Collector, хранилища телеметрии, Grafana, правила, runbooks) |
|
||||
| `student-tests/AGENTS.md` | свои тесты, отдельные стенды, проверки отказов |
|
||||
| `evidence/AGENTS.md` | доказательства для `REPORT.md` |
|
||||
| `bench/AGENTS.md`, `bench/RUNBOOK.md` | нагрузочный стенд; замеры трека 1 по шагам |
|
||||
|
||||
Ещё Codex читает **правила команд** `.codex/rules/messenger.rules` (только у
|
||||
доверенного проекта; после правки — перезапуск Codex; проверка — `codex
|
||||
execpolicy check --pretty --rules "$PWD/.codex/rules/messenger.rules" make
|
||||
wipe`) и **навыки** `.agents/skills/`: `lab6-bench` (замеры трека 1 по RUNBOOK),
|
||||
`messenger-stand` (стенд, проверки телеметрии и alerts, демонстрация). Они дублируют раздел 2,
|
||||
но не заменяют его.
|
||||
|
||||
Конфликт: глубже — уточняет, но не отменяет раздел 2. Прямая просьба
|
||||
пользователя важнее этих файлов, кроме пунктов «спросить».
|
||||
|
||||
## 2. Нельзя
|
||||
|
||||
1. **Менять skeleton преподавателя** (спросить): `contracts/`, `tests/`,
|
||||
`scripts/` (кроме своих `restart.sh`, `stop-one.sh`,
|
||||
`rolling-update.sh`, `lab6.py`), `lab.json`, `README.md`, `COURSE.md`,
|
||||
`CONTRIBUTING.md`, `MAINTAINERS.md`, `Dockerfile.example`,
|
||||
`compose.example.yaml`, `infra/README.md`, `requirements-dev.txt`,
|
||||
`evidence/README.md`, `examples/`, `.github/`, верх `Makefile` до строки
|
||||
`=====`. Публичный тест упал — чиним приложение.
|
||||
2. **Подгонять тесты под код**: ослаблять `assert`, менять ожидаемый
|
||||
статус, `skip`/`xfail`, удалять тест.
|
||||
3. **Состояние в памяти процесса, от которого зависит корректность**:
|
||||
данные, сессии, ключи, метаданные и **задания** — только PostgreSQL;
|
||||
байты — только S3; сообщение брокера — только подсказка «посмотри
|
||||
задание». `--workers`, gunicorn, `reload`; sticky session. Уборка и
|
||||
сверка — только `cleaner`, публикация — только `relay`, обработка —
|
||||
только `worker`.
|
||||
4. **Порты реплик наружу и `container_name` у `api`**; консоль, master,
|
||||
volume, filer SeaweedFS, мониторинг LB, management RabbitMQ — наружу.
|
||||
5. **Файлы конфигурации приложения**: настройки — только переменные
|
||||
окружения (`src/config.py`).
|
||||
6. **JSON-логи, structlog, `print`** вместо логгера (`src/log.py`).
|
||||
7. **Писать в лог и телеметрию** (атрибуты span, метки метрик, записи Loki) текст сообщений, `display_name`, `title`, username,
|
||||
`filename` (только длину), пароль, токен, ключи, их хэши,
|
||||
`Authorization`, `Idempotency-Key`, тела, параметры SQL, оператора и
|
||||
причину replay (только длины). Можно id, ключ объекта, размеры.
|
||||
8. **Git без просьбы**: `commit`, `push`, `checkout`, `reset`, `stash`,
|
||||
`rebase`, `clean`. Смотреть можно.
|
||||
9. **Удалять данные стенда без просьбы** (спросить): `make wipe`, `docker
|
||||
compose down -v`, `docker volume rm`, очистку очереди брокера,
|
||||
`FLUSHALL`, `TRUNCATE`/`DROP`, удаление объектов мимо API, каталоги
|
||||
меток в `evidence/`; `make replay APPLY=1`, `make reconcile APPLY=1` на
|
||||
рабочем стенде.
|
||||
10. **Секреты и `.env`** в git, образ, `evidence/`, вывод и отчёт; `COPY .
|
||||
.`. Административную пару S3 — никому, кроме `s3`; пароль брокера —
|
||||
только `rabbitmq`, `relay`, `worker`.
|
||||
11. **Незакреплённые версии**: `latest`, тег без digest, пакет без lock.
|
||||
12. **Новая зависимость** (спросить).
|
||||
13. **Миграция, которая ломает работающую версию**: только expand;
|
||||
применённую ревизию не править.
|
||||
14. **`HTTPException`** в сервисах и хранилище, **403**, **422** наружу;
|
||||
прозрачные повторы `POST`.
|
||||
15. **Обходить sandbox Codex** (раздел 10).
|
||||
16. **Выдумывать результаты**: в отчёт и `evidence/` — только реальный
|
||||
вывод команд, которые ты запустил. Гипотезы T1–T7 и критерии S1–S5 не переписывать.
|
||||
Число из чужой лабы в отчёт не брать.
|
||||
17. **Чинить попутно найденное** без просьбы: записать в `KNOWN_ISSUES.md`.
|
||||
18. **Менять код приложения ради замеров** (спросить).
|
||||
|
||||
## 3. Порядок работы
|
||||
|
||||
1. Откуда требование: `README.md` (рубрика), `contracts/observability.md`
|
||||
(сигналы), `contracts/infrastructure.json`, `infra/otel/README.md` (задание),
|
||||
`contracts/README.md`, `contracts/attachment-states.md`,
|
||||
`contracts/jobs.schema.json`, `contracts/openapi.json`, `COURSE.md`.
|
||||
Неясно — спроси. Ответ преподавателя — в раздел 12.
|
||||
2. Прочитай нужные `AGENTS.md` и затрагиваемые файлы целиком.
|
||||
3. Задача больше пары файлов — короткий план в чате.
|
||||
4. Минимальный дифф. 5. Проверки раздела 8. 6. Отчёт — раздел 11.
|
||||
|
||||
## 4. Команды
|
||||
|
||||
| Команда | Что делает |
|
||||
|---|---|
|
||||
| `make install` / `make env [HOST_PORT=…]` | `uv sync` / `.env` со случайными паролями и ключами (существующий дополняется) |
|
||||
| `make up` | postgres, valkey, s3, rabbitmq → migrate, s3-bootstrap → api × `API_REPLICAS` (2), relay, worker, cleaner → haproxy; Collector, Prometheus, Loki, Tempo, Grafana; ждёт healthy (у телеметрии — `running`) |
|
||||
| `make stop` / `make down` / `make logs` / `make logs-pipeline` | остановить / удалить контейнеры (volume остаются) / журнал реплик / relay и worker |
|
||||
| `make wipe` | удалить контейнеры и volume `pgdata`, `s3data`, `rmqdata`: только после `yes` |
|
||||
| `make test [BASE_URL=...]` | публичный smoke (202, ready, оригинал, thumbnail 256×160) |
|
||||
| `make defense` | шаги 2–3 защиты: worker стоп → 202 → ссылка → 409 → `restart.sh` → worker → ready |
|
||||
| `make stop-worker` / `make start-worker` / `make pipeline-state` | worker; задания по состояниям и очередь брокера |
|
||||
| `make replay [ERROR_CODE=…] [ATTACHMENT=…] [APPLY=1 OPERATOR=… REASON=…]` | реестр failed; с `APPLY=1` — возврат с аудитом (коды 0/3/1/2) |
|
||||
| `make test-persistence ACTION_SCRIPT=scripts/restart.sh` | данные, токен, оригинал после рестарта LB, реплик, хранилищ и брокера |
|
||||
| `make test-failover ACTION_SCRIPT=scripts/stop-one.sh` / `make failover-each` | отказ одной реплики |
|
||||
| `make student-test [BASE_URL=…] [EXPECT_REPLICAS=…]` | свои тесты против стенда (без отказов) |
|
||||
| `make test-isolated` / `make failure-checks [FAULT_ARGS=-rP]` | отдельный стенд: всё выше / проверки отказов (в том числе pipeline) |
|
||||
| `make attachment-failover` / `make s3-check` | вложение после остановки принявшей реплики / приватность bucket |
|
||||
| `make replicas` / `instances` / `lb-stats` / `rolling-update` | реплики за LB |
|
||||
| `make cleanup-once` / `make reconcile [APPLY=1] …` | уборщик (и staging) / сверка (dry-run по умолчанию) |
|
||||
| `make db-up` / `run` / `run-relay` / `run-worker` / `migrate-local` | процессы на хосте рядом с хранилищами |
|
||||
| `make lint` / `fmt` / `check` / `validate` · `requirements[-check]` | ruff; офлайн-проверки skeleton; `requirements.txt` из `uv.lock` |
|
||||
| `make telemetry-check` | запрос и загрузка → трасса в Tempo ↔ запись в Loki, метрики без id, нет секретов (22 проверки) |
|
||||
| `make trace-chain` | S3 остановлен → повтор: одна трасса API → relay → worker, retry и ready |
|
||||
| `make alerts-test` / `make alerts-check` | promtool check и test правил / worker стоп и блокировка таблицы → firing → resolved (~6,5 мин) |
|
||||
| `make telemetry-outage [OUTAGE_SECONDS=120]` | Tempo остановлен под нагрузкой: API и загрузки живы, потери считает Collector |
|
||||
| `make grafana` / `make logs-telemetry` | адрес dashboard / журнал сервисов телеметрии |
|
||||
| `make bench-telemetry [TELEMETRY_LABEL=…]` / `make bench-telemetry-quick` | трек 1 «Цена наблюдаемости» (`bench/RUNBOOK.md`); `quick-*` в отчёт не идут |
|
||||
| `make bench-queue [QUEUE_LABEL=…]`, `bench-uploads`, `bench-reconcile`, `bench-failover`, `bench-rollout`, `bench-scaling` | профили лаб 3–5 (сохранены, в лабе 6 не обязательны) |
|
||||
|
||||
Проверки ходят через HAProxy, по умолчанию `http://localhost:8080`.
|
||||
Порты чистой `.env.example`: `HOST_PORT` (8080), `POSTGRES_HOST_PORT` (5433),
|
||||
`VALKEY_HOST_PORT` (6380), `S3_HOST_PORT` (8334), `BROKER_HOST_PORT` (5673),
|
||||
`GRAFANA_HOST_PORT` (3180); машина разработки использовала LB 8180.
|
||||
порты Collector, Prometheus, Loki, Tempo наружу не публикуются; разовая
|
||||
подмена — `make test BASE_URL=http://localhost:8190`. Тесты против рабочего стенда
|
||||
оставляют данные; чистый прогон — `make test-isolated`.
|
||||
|
||||
## 5. Карта кода
|
||||
|
||||
```
|
||||
src/ python -m src (__main__ → early_stop.install() → main.run()): API
|
||||
main.py create_app(): Db, кэш, хранилище, S3, места загрузок, пароли, роутеры
|
||||
config.py Settings.from_env(): Database, Cache, ObjectStorage, Uploads, Cleaner, Broker, Pipeline, Relay, Telemetry
|
||||
telemetry/ OpenTelemetry: sdk.py (провайдеры, экспорт, наблюдаемые инструменты), __init__.py (интерфейс для слоёв)
|
||||
constants.py, log.py, errors.py, clock.py, domain.py, pagination.py, healthcheck.py, early_stop.py
|
||||
images.py структурная проверка PNG/JPEG на входе API (stdlib)
|
||||
db.py, cache.py, s3.py, uploads.py, passwords.py инфраструктура процесса
|
||||
broker.py RabbitMQ (aio-pika): JobPublisher (confirms) и JobConsumer (qos, ack), формат сообщения
|
||||
renderer.py ImageRenderer: процесс обработки на задание, лимиты, коды выхода → исходы
|
||||
worker/ python -m src.worker: потребитель + WORKER_CONCURRENCY задач; render.py — дочерний процесс Pillow
|
||||
relay/ python -m src.relay: outbox → брокер, аренды, потерянные; `replay` — реестр failed
|
||||
cleaner/ python -m src.cleaner: брошенные загрузки, staging, сверка
|
||||
api/ routes/, schemas, deps, identity, request_id, handlers
|
||||
services/ User/Session/Chat/Message/Attachment, Processing, Relay, Replay, Cleanup, Reconcile
|
||||
storage/ base.py (Storage, MaintenanceStorage, PipelineStorage), postgres.py, pipeline.py, cached.py, tables.py, objects.py
|
||||
migrations/ 0001 лаба 2, 0002 ключи, 0003 вложения, 0004 задания, варианты, журнал replay, 0005 traceparent/tracestate заданий (expand)
|
||||
student-tests/ тесты по HTTP; test_processing.py, test_pipeline.py; unit/test_telemetry.py, unit/test_trace_chain.py (без стенда, лаба 6); stand.py, fault_hook.py
|
||||
bench/ нагрузочный стенд; профиль telemetry — трек 1 лабы 6 (bench/AGENTS.md), queue — лабы 5
|
||||
infra/ haproxy/, valkey/, s3/bootstrap.sh, rabbitmq/rabbitmq.conf, otel/ (collector.yaml, prometheus/, loki/, tempo/, grafana/, runbooks/)
|
||||
scripts/ restart.sh, stop-one.sh, rolling-update.sh, lab6.py (свои); остальное — skeleton
|
||||
.codex/rules/, .agents/skills/, evidence/, Dockerfile, compose.yaml, pyproject.toml, uv.lock, requirements.txt
|
||||
```
|
||||
|
||||
Поток: HAProxy → реплика (401, 400, 404, 415, 413, 429 предела, 429 места,
|
||||
тело, структура) → строка `pending` → PUT в staging → `queued` + задание
|
||||
(одна транзакция) → **202**. Дальше без клиента: relay публикует задание с
|
||||
подтверждением → worker захватывает с арендой → GET staging, рендер в
|
||||
отдельном процессе, PUT оригинала и вариантов → фиксация `ready`
|
||||
(fencing по номеру попытки) → ack. Подробно — `src/services/AGENTS.md`.
|
||||
|
||||
## 6. Контракт: самое важное
|
||||
|
||||
- Каждый ответ — `X-Request-Id` и `X-Instance-Id`; ошибка — `{"error":
|
||||
{"code", "message", "request_id"}}`; 422 и 403 — никогда.
|
||||
- Загрузка — PNG/JPEG ≤ 10 MiB, ≤ 40 млн пикселей; **202** `queued` только
|
||||
после staging и задания в PostgreSQL; задание ждёт и без брокера и worker.
|
||||
- Состояния `queued`/`processing`/`ready`/`failed`, варианты thumbnail, crop,
|
||||
optimized, `error_code` у `failed`; байты не готового или `failed` — 409,
|
||||
нет варианта — 404. Сообщение: до 10 видимых вложений чата, `failed` — 409.
|
||||
Подробно — `contracts/`.
|
||||
|
||||
## 7. Конфигурация, логи, Docker, зависимости
|
||||
|
||||
**Переменные** читает только `src/config.py`; неверное значение — код 2.
|
||||
Группы: `APP_*`, `LOG_LEVEL`, `DB_*`, `CACHE_*`, `S3_*`, `UPLOAD_*`
|
||||
(`UPLOAD_MAX_UNFINISHED` — предел незавершённых заданий), `CLEANER_*`,
|
||||
`STAGING_RETENTION_SECONDS`, `RECONCILE_*`, `BROKER_*`, `WORKER_*`,
|
||||
`JOB_*`, `RENDER_MEMORY_MB`, `RELAY_*`, `OTEL_*`, `TELEMETRY_HISTOGRAM_BUCKETS`.
|
||||
Таблица — `src/AGENTS.md`.
|
||||
`WORKER_FAULT`, `RELAY_FAULT` — точки сбоя только для проверок отказов.
|
||||
|
||||
**Логи**: строка на событие `время уровень логгер [rid=...] сообщение
|
||||
key=value`. Строки `attachment processed …`, `job delivery skipped …`,
|
||||
`reconcile pass finished …` разбирают `bench/` и тесты — имена полей не
|
||||
менять. С лабы 6 запись журнала несёт `trace_id`/`span_id` и дублируется в
|
||||
Loki по OTLP; имена метрик и меток — контракт `contracts/observability.md`,
|
||||
dashboard и правила на них опираются (меняются вместе).
|
||||
|
||||
**Docker, compose, S3, брокер, HAProxy** — `infra/AGENTS.md`. Числа менять
|
||||
только вместе: аренда задания `JOB_TIMEOUT_SECONDS + JOB_LEASE_MARGIN_SECONDS`
|
||||
(60 + 20 с) > времени рендера и записи; `timeout server` пути загрузки 40 с
|
||||
> 5 + 30 с; `CLEANER_GRACE` 900 с > 21 с; дренаж замены 90 с > 40 с.
|
||||
|
||||
**Зависимости**: `pyproject.toml` → `uv lock` → `make requirements` → `make
|
||||
requirements-check` → пересборка образа.
|
||||
|
||||
## 8. Definition of Done
|
||||
|
||||
- [ ] `make fmt`, затем `make lint` — без ошибок;
|
||||
- [ ] `make test-isolated` — в `results` все 0;
|
||||
- [ ] правка хранилища, вложений, pipeline, уборщика, сверки, сессий,
|
||||
ключей, кэша, клиентов, таймаутов — ещё `make failure-checks`;
|
||||
- [ ] правка `compose.yaml`, `haproxy.cfg`, `infra/`, `scripts/*` — `make
|
||||
up`, `test`, `defense`, `s3-check`, `attachment-failover`, `make
|
||||
test-persistence ACTION_SCRIPT=scripts/restart.sh`, `failover-each`;
|
||||
- [ ] правка схемы — новая expand-ревизия, `alembic check` чистый;
|
||||
- [ ] правка `Dockerfile`, зависимостей — `make up`, `test`,
|
||||
`requirements-check`;
|
||||
- [ ] правка телеметрии, `infra/otel/`, dashboard, правил — `make telemetry-check`,
|
||||
`make alerts-test`; перенос контекста — ещё `make trace-chain`;
|
||||
- [ ] правка `bench/` — самопроверки разбора и `make bench-telemetry-quick`;
|
||||
- [ ] новое поведение из рубрики — тест в `student-tests/`;
|
||||
- [ ] изменилось описанное в `REPORT.md`, `evidence/`, `AGENTS.md` —
|
||||
обновлено там же;
|
||||
- [ ] остановлены серверы и контейнеры, которые ты запустил.
|
||||
|
||||
Не смог выполнить пункт — так и напиши, с причиной.
|
||||
|
||||
## 9. Если тест или проверка упали
|
||||
|
||||
Воспроизведи, прочитай вывод целиком, определи причину: дефект приложения
|
||||
→ код; ошибка теста (противоречит контракту, случайная) → тест, с
|
||||
объяснением; стенд (чужой порт, старый образ, не тот `BASE_URL`, остатки
|
||||
прогона, сервис не healthy) → стенд. Неясно — спроси. `tests/` не
|
||||
правится никогда; на загруженном хосте проверки отказов могут ложно
|
||||
падать — один перезапуск и сказать.
|
||||
|
||||
## 10. Особенности Codex
|
||||
|
||||
- В sandbox нет сети и часто нет docker: запроси запуск вне sandbox
|
||||
(правила `.codex/rules/`) или попроси пользователя; команду — дословно.
|
||||
- Долгие команды (`make bench-telemetry`, `make failure-checks` — ~8 мин,
|
||||
`make alerts-check` — ~6,5 мин) — в фоне: `nohup make … > /tmp/x.log 2>&1 &`, затем `tail`.
|
||||
- Порт контейнера на macOS держит `com.docker.backend`: процесс по порту не
|
||||
убивать, чужие контейнеры не трогать — выбрать другие порты (`make env
|
||||
HOST_PORT=… … GRAFANA_HOST_PORT=…` до первого `make up`).
|
||||
- Этот файл ≤ ~26 КБ (`wc -c`); правило слоя — во вложенный `AGENTS.md`.
|
||||
|
||||
## 11. Отчёт пользователю
|
||||
|
||||
По-русски, коротко: что сделано; какие проверки и с каким итогом
|
||||
(`N passed`, `PASS: lab6 ...`, `results: {...}`, метки `evidence/…`); что
|
||||
не проверено и почему; что записано в `KNOWN_ISSUES.md`.
|
||||
|
||||
## 12. Согласования с преподавателем
|
||||
|
||||
Договорённости, которых нет в skeleton. Каждую упомянуть в `REPORT.md`.
|
||||
|
||||
| Дата | Договорённость | Где учтено |
|
||||
|---|---|---|
|
||||
| 2026-10-20 | Лаба 4: «пустой текст» сообщения — и `""`, и строка из одних пробелов. `" "` с ≥ 1 вложением — 201, без вложений — 400 | `src/api/schemas.py` (`CreateMessage`), `student-tests/test_attachments.py`, `REPORT.md` |
|
||||
|
||||
## 13. Стиль кода
|
||||
|
||||
- ruff: строка 88, py313; формат — `make fmt`. Аннотации везде. Скрипты на
|
||||
`python3` хоста (`student-tests/stand.py`, `fault_hook.py`,
|
||||
`scripts/lab6.py`, `bench/`) — stdlib, Python 3.9+.
|
||||
- Методы сервисов и изменяющие методы хранилища — keyword-only.
|
||||
- Комментарий объясняет причину, а не пересказывает код; пишем кратко,
|
||||
по-русски. Логи и
|
||||
`error.message` — по-английски.
|
||||
- Коммиты (только по просьбе): английский, conventional.
|
||||
|
||||
## 14. Документы решения
|
||||
|
||||
`REPORT.md` (отчёт, гипотезы T1–T7, ответы защиты), `evidence/`,
|
||||
`KNOWN_ISSUES.md`, `bench/RUNBOOK.md`. Доказательства лаб 3–5 — в их
|
||||
репозиториях; compose-проект — `vladimirceva-lab6`.
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
# Один образ на все процессы лабы 6: API (`python -m src`), миграции,
|
||||
# relay (`-m src.relay`), worker (`-m src.worker`, Pillow — только в его
|
||||
# дочернем `-m src.worker.render`) и уборщик (`-m src.cleaner`). Процесс
|
||||
# выбирает entrypoint сервиса compose. Правила — infra/AGENTS.md.
|
||||
#
|
||||
# Базовый образ один на оба stage и закреплён точной патч-версией плюс
|
||||
# digest мультиарх-индекса (amd64 и arm64): venv из deps работает только с
|
||||
# тем же интерпретатором. Чтобы обновить, взять новый тег и значение поля
|
||||
# Digest, которое печатает buildx imagetools inspect для этого тега.
|
||||
|
||||
# deps: зависимости строго по requirements.txt (экспорт uv.lock с хешами).
|
||||
# У asyncpg, greenlet и argon2-cffi-bindings есть готовые колёса для
|
||||
# linux amd64/arm64: компилятор в образе не нужен
|
||||
FROM python:3.13.15-slim-trixie@sha256:7c61056e61ac89e852de05f3dc6fa51a6dd2181797bceed46aa725dd7cb2cd3b AS deps
|
||||
|
||||
ENV PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
|
||||
RUN python -m venv /opt/venv
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
# --require-hashes: пакет с другим хешем или без пина — сборка падает;
|
||||
# --no-deps: ставится ровно список из файла, без догрузки зависимостей;
|
||||
# --only-binary: сборка из исходников (sdist) запрещена
|
||||
RUN /opt/venv/bin/pip install --require-hashes --no-deps --only-binary=:all: \
|
||||
-r /tmp/requirements.txt
|
||||
|
||||
|
||||
# runtime: интерпретатор базового образа, venv и код; без pip-кэша и тестов
|
||||
FROM python:3.13.15-slim-trixie@sha256:7c61056e61ac89e852de05f3dc6fa51a6dd2181797bceed46aa725dd7cb2cd3b AS runtime
|
||||
|
||||
RUN groupadd --system --gid 10001 messenger \
|
||||
&& useradd --system --uid 10001 --gid messenger --no-create-home \
|
||||
--home-dir /nonexistent --shell /usr/sbin/nologin messenger
|
||||
|
||||
# Фиксированный порог mmap в 128 KiB: всё крупнее glibc выделяет через
|
||||
# mmap, и BytesIO с телом загрузки (до 10 MiB) расширяется mremap без
|
||||
# копирования. По умолчанию порог плавающий — после первой загрузки glibc
|
||||
# задирает его почти до 10 MiB, буфер переезжает в кучу, и при realloc в
|
||||
# памяти на мгновение оказываются две копии тела
|
||||
ENV PATH=/opt/venv/bin:$PATH \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
MALLOC_MMAP_THRESHOLD_=131072 \
|
||||
APP_HOST=0.0.0.0 \
|
||||
APP_PORT=8080
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# владелец файлов — root, процесс от messenger может их только читать.
|
||||
# Миграции едут в том же образе: сервис migrate запускает его с командой
|
||||
# `python -m alembic upgrade head`
|
||||
COPY --from=deps /opt/venv /opt/venv
|
||||
COPY src ./src
|
||||
COPY alembic.ini ./
|
||||
COPY migrations ./migrations
|
||||
|
||||
USER messenger:messenger
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --start-interval=1s \
|
||||
--retries=3 CMD ["python", "-m", "src.healthcheck"]
|
||||
|
||||
# без shell-обёртки: python становится PID 1, и SIGTERM приходит прямо ему
|
||||
CMD ["python", "-m", "src"]
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
# Известные проблемы
|
||||
|
||||
Замечены по ходу работы; без отдельной просьбы код не трогаем (корневой
|
||||
`AGENTS.md`, раздел 2, п. 17). Формат: что, где, симптом, предложение. Исправленное
|
||||
удаляется отсюда.
|
||||
|
||||
## Лаба 6
|
||||
|
||||
### SLI ready/30 с условен по успешным вложениям
|
||||
|
||||
`messenger:attachment_ready_30s:ratio_7d` делит корзину ≤ 30 с на count
|
||||
гистограммы `messenger_attachment_time_to_ready_seconds`. Наблюдение пишется
|
||||
только после `ready`, поэтому failed и ещё ожидающие задания не входят в
|
||||
знаменатель. Это SLI задержки уже успешных вложений, а не доля всех принятых
|
||||
202, завершившихся за 30 с. Отчёт уточнён по фактической формуле; правила и
|
||||
измеренный код сохранены. Для полного SLO успеха нужен отдельный учёт
|
||||
принятых, failed и просроченных незавершённых заданий. API SLO при этом
|
||||
определён отдельно по ответам API без 5xx.
|
||||
|
||||
### Docker Desktop 28: запуск через локальный Compose
|
||||
|
||||
На машине замеров Docker CLI 28.0.4 подменяет `OTEL_RESOURCE_ATTRIBUTES`
|
||||
служебным `docker.cli.cobra.command_path` (docker/cli#4958), из-за чего
|
||||
приложение корректно отказывается запускаться. Прямой Compose 2.34.0
|
||||
устраняет подмену, но его `up --wait` завершается ошибкой на сервисе
|
||||
cleaner с отключённым healthcheck. Обход без изменения приложения:
|
||||
`sh tools/docker-compat/setup.sh`, затем
|
||||
`export PATH="$PWD/tools/docker-compat:$PATH"` — официальный Compose
|
||||
5.6.1 с закреплённой SHA-256, остальные команды идут в прежний Docker CLI.
|
||||
Системная установка не меняется. Проверка конфигурации, старт и smoke
|
||||
с этой обёрткой прошли; команды без неё на старом Docker затронуты.
|
||||
|
||||
### Потери SDK при недоступном Collector не считаются метрикой
|
||||
|
||||
Очередь `BatchSpanProcessor`/`BatchLogRecordProcessor` (2048 элементов)
|
||||
при переполнении молча отбрасывает новое, а неудачная отправка видна
|
||||
только строкой stdout `Failed to export …` (с лабы 6, уровень 4, — не
|
||||
чаще раза в минуту на логгер, со счётчиком пропущенных `suppressed=N`; поэтому
|
||||
в `bench/` их число — нижняя оценка).
|
||||
Счётчика отброшенного в SDK 1.x нет; потери считаются на стороне
|
||||
Collector (`otelcol_receiver_refused_*`, `otelcol_exporter_send_failed_*`),
|
||||
а это не покрывает случай «упал сам Collector». Предложение: свой
|
||||
`SpanProcessor`-обёртка со счётчиком отброшенного, если понадобится.
|
||||
|
||||
### Снимок очереди пропадает вместе с relay
|
||||
|
||||
Глубину очереди и возраст старейшего задания (`messenger_job_queue_*`)
|
||||
снимает relay. Relay остановлен — ряды уходят из экспортёра Collector через
|
||||
`metric_expiration` 3 мин, и `MessengerQueueLagGrowing` перестаёт
|
||||
срабатывать, хотя задания стоят. Сам застой виден по росту `outbox` до
|
||||
остановки и по `messenger_relay_jobs_total`. Предложение: alert на
|
||||
`absent(messenger_job_queue_oldest_age_seconds)` 5 мин.
|
||||
|
||||
### Ожидающие пула считаются только внутри `Db`
|
||||
|
||||
`db_client_connection_pending_requests` — счётчик в `src/db.py` от входа в
|
||||
`transaction()`/`read()` до выдачи соединения (включает BEGIN и pre-ping).
|
||||
Проба готовности (`ping`) мимо него. Для «ждёт соединения» этого
|
||||
достаточно, для точного времени ожидания — нет (нужен histogram).
|
||||
|
||||
### У Collector, Loki и Tempo нет healthcheck
|
||||
|
||||
В образах нет оболочки и HTTP-клиента, поэтому `make up --wait` ждёт
|
||||
только `running`. Живость видна в Prometheus (`up{job=…}`) и на панели
|
||||
«Scrape targets up». Сразу после старта Loki пишет `error getting ingester
|
||||
clients … empty ring` (кольцо ещё не собралось), Tempo — `error calling
|
||||
scheduler … no jobs found` (нечего уплотнять): это не отказы.
|
||||
|
||||
## Перенесено из лабы 5
|
||||
|
||||
Поведение лабы 5 в лабе 6 не менялось, записи актуальны.
|
||||
|
||||
### Смесь версий при замене реплик лабы 4 на лабу 5
|
||||
|
||||
`scripts/rolling-update.sh` меняет реплики по одной. Пока работает хоть
|
||||
одна реплика лабы 4, её загрузки отвечают 201 `ready`, задания не пишутся,
|
||||
вариантов у таких вложений нет (метаданные `ready` с `variants: []`,
|
||||
`?variant=thumbnail` — 404). Схема 0004 это допускает (expand), но
|
||||
клиент на время замены видит два поведения. Предложение: первый релиз
|
||||
лабы 5 выкатывать `make down` + `make up` (с простоем) или дописать
|
||||
разовую команду, которая ставит задания готовым вложениям без вариантов.
|
||||
|
||||
### JPEG без таблиц квантования проходит проверку API
|
||||
|
||||
`src/images.py:_inspect_jpeg` проверяет маркеры, кадр и скан, но не
|
||||
наличие DQT. Такой файл получает 202, а worker переводит его в `failed`
|
||||
с `invalid_image` (`student-tests/test_processing.py::
|
||||
test_undecodable_image_fails_with_safe_code`). Контракт требует 415 для
|
||||
заведомо повреждённых файлов на входе. Предложение: в `_inspect_jpeg`
|
||||
собирать номера таблиц DQT и требовать, чтобы каждая компонента кадра
|
||||
ссылалась на определённую до SOS.
|
||||
|
||||
### Эвристика потерянных сообщений видит только «ready» в очереди
|
||||
|
||||
`src/services/relay.py`: `republish_lost` срабатывает, когда в очереди нет
|
||||
сообщений, готовых к выдаче (`message_count` пассивного объявления), а
|
||||
задание опубликовано дольше `RELAY_REPUBLISH_AFTER`. Сообщения, уже
|
||||
выданные worker и ждущие во внутренней очереди процесса (prefetch больше
|
||||
concurrency), в этот счёт не входят. При очень большом prefetch и долгих
|
||||
заданиях relay опубликует их повторно: исход верный (старая попытка
|
||||
станет `stale`), но работа брокера и worker лишняя. Предложение: брать
|
||||
ещё `messages_unacknowledged` (management API) или не республиковать,
|
||||
пока у очереди есть потребители с неподтверждёнными сообщениями.
|
||||
|
||||
### Долгий отказ PostgreSQL и предел доставок quorum-очереди
|
||||
|
||||
`src/worker/main.py:_one`: PostgreSQL не ответил на захвате — сообщение
|
||||
возвращается в очередь через 1 с. У quorum-очереди RabbitMQ 4 есть
|
||||
предел повторных доставок (по умолчанию 20), после него сообщение
|
||||
отбрасывается. Задание при этом цело в PostgreSQL и вернётся через
|
||||
`republish_lost`, но не раньше `RELAY_REPUBLISH_AFTER`. Предложение:
|
||||
пауза перед возвратом с ростом или собственный `x-delivery-limit` под
|
||||
ожидаемую длину отказа.
|
||||
|
||||
### Шум aiormq в журнале при остановке брокера
|
||||
|
||||
При `docker compose stop rabbitmq` библиотека aiormq пишет `ERROR` и
|
||||
traceback `CONNECTION_FORCED` в журнал relay и worker, хотя дальше их
|
||||
код штатно переподключается (строки `broker … failed`, затем `broker
|
||||
consuming`). Предложение: поднять уровень логгера `aiormq.connection` до
|
||||
`CRITICAL` в `src/log.py` и оставить только свои строки.
|
||||
|
||||
### SAWarning в `alembic check`
|
||||
|
||||
`alembic check` (alembic 1.20.0, SQLAlchemy 2.1.1) печатает `SAWarning:
|
||||
Can't validate argument 'dialect_options'; can't locate any SQLAlchemy
|
||||
dialect named 'dialect'` из `migrations/env.py:54`, затем «No new upgrade
|
||||
operations detected» (в лабе 6 не переснято, миграция `0005` — две колонки
|
||||
`NULL`, расхождений нет). Предупреждение
|
||||
появляется при сравнении отражённых индексов, на результат проверки не
|
||||
влияет; источник не выяснен. Предложение: проверить на минимальной схеме
|
||||
с одним частичным индексом и, если это библиотека, закрепить фильтр
|
||||
`warnings` только для этой строки в `env.py` или дождаться исправления.
|
||||
|
||||
## Перенесено из лабы 3 (bench/, серии трека 1 лабы 3)
|
||||
|
||||
Профили лабы 3 в лабе 6 сохранены, но не обязательны.
|
||||
|
||||
### Возобновление прерванной серии требует доработки
|
||||
|
||||
Статический анализ `bench/run.py:run_scaling` и `scaling_cell`: ветка
|
||||
`resume` сохраняет прежний `meta.aborted`, а финальная проверка этого
|
||||
поля возвращает ошибку даже после завершения оставшихся ячеек. Повтор
|
||||
незавершённой ячейки добавляет строки с теми же номерами. Предложение:
|
||||
восстанавливать только незавершённую ячейку и снимать `aborted` после
|
||||
успешного продолжения.
|
||||
|
||||
### Подпись насыщения для A/B с одной конфигурацией
|
||||
|
||||
В `bench/plots.py:saturation` единственная точка возвращает `None`, а
|
||||
`main` трактует это как продолжающийся рост ≥ 10 %. Предложение:
|
||||
отдельно печатать «недостаточно конфигураций» при числе точек меньше
|
||||
двух.
|
||||
@@ -28,3 +28,490 @@ test-persistence:
|
||||
test-failover:
|
||||
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2)
|
||||
$(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# Собственные цели решения. Цели skeleton выше (help, check, validate, test,
|
||||
# load, test-persistence, test-failover) не менять: в следующей лабе
|
||||
# Makefile придёт новый, свои цели переносятся в него слиянием.
|
||||
# ===========================================================================
|
||||
|
||||
# .env: подстановки compose и окружение приложения на хосте. Без него —
|
||||
# значения по умолчанию ниже (пароли и ключи пустые: сначала `make env`)
|
||||
-include .env
|
||||
|
||||
IMAGE ?= mtusi-messenger-vladimirceva:lab6
|
||||
# порт HAProxy на 127.0.0.1 — единственный порт API стенда на хосте
|
||||
HOST_PORT ?= 8080
|
||||
# цели skeleton (test, load, test-persistence, ...) по умолчанию ходят на
|
||||
# 8080; если BASE_URL не задан в команде или окружении — на LB своего
|
||||
# стенда (HOST_PORT из .env), чтобы не попасть в чужой стенд на 8080
|
||||
ifeq ($(origin BASE_URL),file)
|
||||
BASE_URL = http://localhost:$(HOST_PORT)
|
||||
endif
|
||||
# лаба 6: Grafana стенда на 127.0.0.1
|
||||
GRAFANA_HOST_PORT ?= 3180
|
||||
# порт сервиса на хосте (make run): другой, чем у стенда, — оба могут
|
||||
# работать одновременно
|
||||
RUN_PORT ?= 8081
|
||||
POSTGRES_USER ?= messenger
|
||||
POSTGRES_DB ?= messenger
|
||||
POSTGRES_HOST_PORT ?= 5433
|
||||
VALKEY_HOST_PORT ?= 6380
|
||||
S3_HOST_PORT ?= 8334
|
||||
BROKER_HOST_PORT ?= 5673
|
||||
SESSION_TTL_SECONDS ?= 3600
|
||||
# реплик API за HAProxy; разово — `make replicas API_REPLICAS=3`
|
||||
API_REPLICAS ?= 2
|
||||
DC = docker compose
|
||||
UV_EXPORT = uv export --frozen --no-dev --no-emit-project --no-header --format requirements.txt
|
||||
# долгие замеры на macOS — под caffeinate: ноутбук не уснёт по простою
|
||||
CAFFEINATE := $(shell command -v caffeinate >/dev/null 2>&1 && echo caffeinate -isu)
|
||||
|
||||
# --- приложение на хосте ----------------------------------------------------
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
uv sync
|
||||
|
||||
# окружение сервиса и миграций на хосте: хранилища стенда на 127.0.0.1,
|
||||
# пароли и ключи пользователя API в S3 из .env. .env читается в рецепте, а
|
||||
# не при разборе Makefile: так первый запуск видит и файл, только что
|
||||
# созданный `make env`. Рецепт без эха — секреты не печатаются
|
||||
LOCAL_ENV = set -a; . ./.env; set +a; \
|
||||
export DB_HOST=127.0.0.1 DB_PORT="$$POSTGRES_HOST_PORT" DB_NAME="$$POSTGRES_DB" \
|
||||
DB_USER="$$POSTGRES_USER" DB_PASSWORD="$$POSTGRES_PASSWORD" CACHE_HOST=127.0.0.1 \
|
||||
CACHE_PORT="$$VALKEY_HOST_PORT" CACHE_PASSWORD="$$VALKEY_PASSWORD" \
|
||||
S3_ENDPOINT="http://127.0.0.1:$$S3_HOST_PORT" S3_ACCESS_KEY_ID="$$S3_API_ACCESS_KEY" \
|
||||
S3_SECRET_ACCESS_KEY="$$S3_API_SECRET_KEY" BROKER_HOST=127.0.0.1 \
|
||||
BROKER_PORT="$$BROKER_HOST_PORT" BROKER_PASSWORD="$$BROKER_PASSWORD" \
|
||||
OTEL_SDK_DISABLED=true
|
||||
# ↑ лаба 6: процессы на хосте без телеметрии — OTLP Collector наружу не
|
||||
# опубликован
|
||||
# worker на хосте — ключи своего пользователя S3, а не API
|
||||
WORKER_ENV = $(LOCAL_ENV); export S3_ACCESS_KEY_ID="$$S3_WORKER_ACCESS_KEY" \
|
||||
S3_SECRET_ACCESS_KEY="$$S3_WORKER_SECRET_KEY"
|
||||
|
||||
# PostgreSQL, Valkey и S3 из compose, миграции с хоста, затем один процесс
|
||||
# сервиса на 127.0.0.1:RUN_PORT без LB, текстовые логи в stdout; стоп —
|
||||
# Ctrl+C. Срок сессии — `make run SESSION_TTL_SECONDS=2`
|
||||
.PHONY: run
|
||||
run: migrate-local
|
||||
@echo "uv run python -m src # 127.0.0.1:$(RUN_PORT), SESSION_TTL_SECONDS=$(SESSION_TTL_SECONDS)"
|
||||
@$(LOCAL_ENV); APP_PORT=$(RUN_PORT) SESSION_TTL_SECONDS=$(SESSION_TTL_SECONDS) \
|
||||
uv run python -m src
|
||||
|
||||
# relay и worker на хосте рядом с `make run` (брокер и хранилища — из
|
||||
# compose); стоп — Ctrl+C. Сервисы compose relay и worker при этом лучше
|
||||
# остановить: make stop-worker, docker compose stop relay
|
||||
.PHONY: run-relay run-worker
|
||||
run-relay: migrate-local
|
||||
@$(LOCAL_ENV); uv run python -m src.relay
|
||||
|
||||
run-worker: migrate-local
|
||||
@$(WORKER_ENV); uv run python -m src.worker
|
||||
|
||||
# миграции с хоста в PostgreSQL стенда (127.0.0.1:POSTGRES_HOST_PORT)
|
||||
.PHONY: migrate-local
|
||||
migrate-local: db-up
|
||||
@echo "uv run alembic upgrade head # 127.0.0.1:$(POSTGRES_HOST_PORT)"
|
||||
@$(LOCAL_ENV); uv run alembic upgrade head
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
uv run ruff format --check .
|
||||
uv run ruff check .
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
uv run ruff format .
|
||||
uv run ruff check --fix .
|
||||
|
||||
# собственные тесты против запущенного стенда (BASE_URL, по умолчанию
|
||||
# HAProxy рабочего стенда); EXPECT_REPLICAS — сколько реплик за BASE_URL
|
||||
# (против `make run` — 1: тесты реплик пропускаются с причиной).
|
||||
# Тесты с маркером fault сюда не входят, для них есть make failure-checks
|
||||
EXPECT_REPLICAS ?= $(API_REPLICAS)
|
||||
.PHONY: student-test
|
||||
student-test:
|
||||
BASE_URL=$(BASE_URL) EXPECT_REPLICAS=$(EXPECT_REPLICAS) uv run pytest
|
||||
|
||||
# отдельный стенд из того же compose.yaml (свои PostgreSQL, Valkey, S3,
|
||||
# volume, HAProxy и две реплики, свои пароли и ключи, без .env): сборка,
|
||||
# миграции и bootstrap S3, make test и make student-test через его LB,
|
||||
# test-failover, test-persistence, затем уборка при любом исходе. Рабочий
|
||||
# стенд не трогается. $(PYTHON), а не uv run: uv повторно шлёт SIGINT, и
|
||||
# Ctrl+C обрывал бы уборку
|
||||
.PHONY: test-isolated
|
||||
test-isolated:
|
||||
$(PYTHON) student-tests/stand.py isolated
|
||||
|
||||
# pytest -m fault на ещё одном одноразовом стенде: собственные хранилища и
|
||||
# S3, уборщик с grace 25 с, несколько API с разными настройками (обычный,
|
||||
# «тесный», «узкий по загрузкам») и hook student-tests/fault_hook.py.
|
||||
# Дополнительные аргументы pytest — через FAULT_ARGS
|
||||
.PHONY: failure-checks
|
||||
failure-checks:
|
||||
$(PYTHON) student-tests/stand.py failures $(FAULT_ARGS)
|
||||
|
||||
# лаба 6: юнит-тесты модулей src (телеметрия) без стенда — секунды
|
||||
.PHONY: unit-test
|
||||
unit-test:
|
||||
uv run pytest -m unit student-tests/unit
|
||||
|
||||
# requirements.txt для образа — только из uv.lock, с хешами
|
||||
.PHONY: requirements
|
||||
requirements:
|
||||
$(UV_EXPORT) --output-file requirements.txt
|
||||
|
||||
.PHONY: requirements-check
|
||||
requirements-check:
|
||||
$(UV_EXPORT) | diff -u requirements.txt - && echo "requirements.txt matches uv.lock"
|
||||
|
||||
# --- Docker и compose ---------------------------------------------------------
|
||||
|
||||
# .env из шаблона со случайными паролями PostgreSQL и Valkey и ключами S3:
|
||||
# в шаблоне они пустые, общего пароля стенда в git нет. Существующий .env
|
||||
# не перезаписывается — дописываются только переменные шаблона, которых в
|
||||
# нём нет (секреты — случайными). Печатаются только имена
|
||||
.PHONY: env
|
||||
env:
|
||||
@$(PYTHON) scripts/lab6.py env
|
||||
|
||||
.PHONY: docker-build
|
||||
docker-build:
|
||||
docker build -t $(IMAGE) .
|
||||
|
||||
# весь стенд: сначала телеметрия (Collector, Prometheus, Loki, Tempo,
|
||||
# Grafana — первые записи процессов уже есть куда отправить), затем
|
||||
# хранилища и брокер -> migrate, s3-bootstrap -> api × API_REPLICAS,
|
||||
# relay, worker, cleaner -> haproxy; --wait ждёт healthy. Если образ
|
||||
# поменялся, compose пересоздаст все реплики сразу и API на это время
|
||||
# пропадёт; плавная замена — через make rolling-update
|
||||
TELEMETRY_SERVICES = otel-collector prometheus loki tempo grafana
|
||||
.PHONY: up
|
||||
up: env
|
||||
$(DC) up -d --wait $(TELEMETRY_SERVICES)
|
||||
$(DC) up -d --build --wait api relay worker cleaner haproxy
|
||||
|
||||
# остановить контейнеры (SIGTERM); данные и контейнеры остаются. LB
|
||||
# останавливается раньше реплик (depends_on); S3 — плавно, ~15 с
|
||||
.PHONY: stop
|
||||
stop:
|
||||
$(DC) stop
|
||||
|
||||
# удалить контейнеры; volume pgdata и s3data с данными остаются
|
||||
# (удаление — wipe)
|
||||
.PHONY: down
|
||||
down:
|
||||
$(DC) down
|
||||
|
||||
# журнал всех реплик; префикс строки — имя контейнера реплики
|
||||
.PHONY: logs
|
||||
logs:
|
||||
$(DC) logs -f api
|
||||
|
||||
# журнал фона: relay и worker
|
||||
.PHONY: logs-pipeline
|
||||
logs-pipeline:
|
||||
$(DC) logs -f relay worker
|
||||
|
||||
# хранилища стенда с ожиданием healthcheck и bootstrap S3: для make run.
|
||||
# --wait одноразовый сервис не ждёт — код bootstrap отдельно
|
||||
.PHONY: db-up
|
||||
db-up: env
|
||||
$(DC) up -d --wait postgres valkey s3 rabbitmq
|
||||
$(DC) up --no-deps --exit-code-from s3-bootstrap s3-bootstrap
|
||||
|
||||
# снести стенд вместе с volume (данные пропадут); спрашивает подтверждение yes
|
||||
.PHONY: wipe
|
||||
wipe:
|
||||
@read -p "Удалить все данные стенда (volume pgdata, s3data, rmqdata, promdata, lokidata, tempodata)? Введите yes: " answer; \
|
||||
if [ "$$answer" = "yes" ]; then \
|
||||
$(DC) down -v --remove-orphans; \
|
||||
else \
|
||||
echo "cancelled, nothing removed"; exit 1; \
|
||||
fi
|
||||
|
||||
# --- Реплики за HAProxy (лаба 3) --------------------------------------------
|
||||
|
||||
# вернуть остановленные реплики (те же контейнеры и X-Instance-Id) и
|
||||
# выставить их число API_REPLICAS; ждёт healthy
|
||||
.PHONY: replicas
|
||||
replicas:
|
||||
$(DC) up -d --no-deps --no-recreate --wait --scale api=$(API_REPLICAS) api
|
||||
|
||||
# вход одним синтетическим пользователем и серия GET /users/me с одним
|
||||
# токеном через LB: X-Instance-Id каждого ответа и итог по репликам
|
||||
.PHONY: instances
|
||||
instances:
|
||||
$(PYTHON) scripts/lab6.py instances --base-url "$(BASE_URL)"
|
||||
|
||||
# таблица слотов backend api: IP реплики, статус (во время замены бывает
|
||||
# DRAIN/MAINT) и счётчики запросов, сбоев соединения, retry и redispatch
|
||||
.PHONY: lb-stats
|
||||
lb-stats:
|
||||
$(PYTHON) scripts/lab6.py lb-stats
|
||||
|
||||
# make test-failover для каждой реплики по очереди с возвратом
|
||||
# предыдущей (make replicas): какой контейнер остановлен, строка
|
||||
# STOP_ONE_LOG и итог теста. STOP_MODE=kill — без graceful
|
||||
STOP_MODE ?= stop
|
||||
.PHONY: failover-each
|
||||
failover-each:
|
||||
$(PYTHON) scripts/lab6.py failover-each --base-url "$(BASE_URL)" \
|
||||
--replicas $(API_REPLICAS) --mode $(STOP_MODE)
|
||||
|
||||
# выкатить текущий код без простоя: собрать образ, один раз прогнать
|
||||
# миграции и менять реплики по одной, выводя старую через drain в LB
|
||||
.PHONY: rolling-update
|
||||
rolling-update:
|
||||
API_REPLICAS=$(API_REPLICAS) scripts/rolling-update.sh
|
||||
|
||||
# --- S3 и вложения (с лабы 4) -------------------------------------------------
|
||||
|
||||
# вложение через LB → остановка реплики, принявшей загрузку (stop-one.sh по
|
||||
# её X-Instance-Id) → скачивание через другую, тот же SHA-256 → 404
|
||||
# постороннему → make replicas. STOP_MODE=kill — без graceful
|
||||
.PHONY: attachment-failover
|
||||
attachment-failover:
|
||||
$(PYTHON) scripts/lab6.py attachment-failover --base-url "$(BASE_URL)" \
|
||||
--replicas $(API_REPLICAS) --mode $(STOP_MODE)
|
||||
|
||||
# приватность bucket вне API: права ключей API, worker и уборщика (bootstrap в
|
||||
# режиме check), анонимные запросы с хоста и из сети стенда, порты
|
||||
# контейнера S3; затем уборка проверочных объектов. Код 1 при нарушении
|
||||
.PHONY: s3-check
|
||||
s3-check:
|
||||
$(PYTHON) scripts/lab6.py s3-check
|
||||
|
||||
# разовый проход уборщика незавершённых загрузок: 0 — проход дошёл до
|
||||
# конца, 1 — прерван отказом, 2 — конфигурация
|
||||
.PHONY: cleanup-once
|
||||
cleanup-once:
|
||||
$(DC) run --rm --no-deps cleaner --once
|
||||
|
||||
# разовая сверка bucket и БД (трек 2) в контейнере уборщика. По умолчанию
|
||||
# dry-run; APPLY=1 — исправить безопасное; MAX_CHANGES, STRATEGY=head,
|
||||
# DEEP=1 (SHA-256 содержимого), RATE (объектов S3/с, 0 — без предела).
|
||||
# Выход 0 — всё сошлось, 3 — есть неисправленные расхождения, 1 — проход
|
||||
# не дошёл до конца, 2 — ошибка в настройках
|
||||
APPLY ?=
|
||||
MAX_CHANGES ?=
|
||||
STRATEGY ?=
|
||||
DEEP ?=
|
||||
RATE ?=
|
||||
.PHONY: reconcile
|
||||
reconcile:
|
||||
$(DC) run --rm --no-deps cleaner reconcile $(if $(APPLY),--apply,) \
|
||||
$(if $(MAX_CHANGES),--max-changes $(MAX_CHANGES),) \
|
||||
$(if $(STRATEGY),--strategy $(STRATEGY),) $(if $(DEEP),--deep,) \
|
||||
$(if $(RATE),--rate $(RATE),)
|
||||
|
||||
# --- Брокер, relay, worker (лаба 5) -------------------------------------------
|
||||
|
||||
# worker стенда: остановить (шаг 2 сценария защиты) / снова запустить
|
||||
.PHONY: stop-worker start-worker
|
||||
stop-worker:
|
||||
$(DC) stop worker
|
||||
|
||||
start-worker:
|
||||
$(DC) up -d --no-deps worker
|
||||
|
||||
# сценарий защиты, шаги 2–3, одной командой: worker стоит → 202 → сообщение
|
||||
# → 409 → scripts/restart.sh → worker → ready и thumbnail 256×160
|
||||
.PHONY: defense
|
||||
defense:
|
||||
$(PYTHON) scripts/lab6.py defense --base-url "$(BASE_URL)"
|
||||
|
||||
# задания по состояниям и очередь брокера
|
||||
.PHONY: pipeline-state
|
||||
pipeline-state:
|
||||
@$(PYTHON) scripts/lab6.py pipeline
|
||||
|
||||
# реестр failed и replay в контейнере relay. Без APPLY=1 — только показ;
|
||||
# с APPLY=1 нужен выбор (ATTACHMENT=<id> или ERROR_CODE=...) и OPERATOR,
|
||||
# REASON. Коды: 0 — готово, 3 — часть отказана, 1 — PostgreSQL, 2 — аргументы
|
||||
ATTACHMENT ?=
|
||||
ERROR_CODE ?=
|
||||
LIMIT ?= 20
|
||||
OPERATOR ?=
|
||||
REASON ?=
|
||||
.PHONY: replay
|
||||
replay:
|
||||
$(DC) run --rm --no-deps relay replay $(if $(ATTACHMENT),--attachment $(ATTACHMENT),) \
|
||||
$(if $(ERROR_CODE),--error-code $(ERROR_CODE),) --limit $(LIMIT) \
|
||||
$(if $(APPLY),--apply --operator "$(OPERATOR)" --reason "$(REASON)",)
|
||||
|
||||
# --- Наблюдаемость (лаба 6) ---------------------------------------------------
|
||||
|
||||
# адрес Grafana стенда; пароль admin — GRAFANA_ADMIN_PASSWORD в .env
|
||||
.PHONY: grafana
|
||||
grafana:
|
||||
@echo "http://127.0.0.1:$(GRAFANA_HOST_PORT)/d/messenger-lab6 (user admin, password: GRAFANA_ADMIN_PASSWORD in .env)"
|
||||
|
||||
# журнал сервисов телеметрии
|
||||
.PHONY: logs-telemetry
|
||||
logs-telemetry:
|
||||
$(DC) logs -f $(TELEMETRY_SERVICES)
|
||||
|
||||
# связь сигналов на рабочем стенде (~1–2 мин): запрос со своим X-Request-Id
|
||||
# → трасса в Tempo и запись в Loki с её trace_id; загрузка → трасса worker
|
||||
# и запись «attachment processed»; метрики API и worker в Prometheus без
|
||||
# запрещённых меток; пароля, токена, текста и имени файла нет ни в Loki, ни
|
||||
# в трассах. Хранилища — через прокси источников Grafana. Код 1 при FAIL
|
||||
.PHONY: telemetry-check
|
||||
telemetry-check:
|
||||
$(PYTHON) scripts/lab6.py telemetry-check --base-url "$(BASE_URL)"
|
||||
|
||||
# уровень 4. Сквозная трасса одной загрузки с повтором (~1 мин): попытка 1
|
||||
# падает при остановленном S3, ready — со второй; в Tempo одна трасса
|
||||
# API → relay (producer) → worker (consumer) → S3/PostgreSQL
|
||||
.PHONY: trace-chain
|
||||
trace-chain:
|
||||
$(PYTHON) scripts/lab6.py trace-chain --base-url "$(BASE_URL)"
|
||||
|
||||
PROMETHEUS_IMAGE = prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2
|
||||
|
||||
# юнит-тесты alert и recording rules без стенда: promtool из того же образа
|
||||
.PHONY: alerts-test
|
||||
alerts-test:
|
||||
docker run --rm -v "$(CURDIR)/infra/otel/prometheus:/rules:ro" -w /rules \
|
||||
--entrypoint promtool $(PROMETHEUS_IMAGE) check rules rules.yml
|
||||
docker run --rm -v "$(CURDIR)/infra/otel/prometheus:/rules:ro" -w /rules \
|
||||
--entrypoint promtool $(PROMETHEUS_IMAGE) test rules rules.test.yml
|
||||
|
||||
# alerts на рабочем стенде искусственным отказом (~8–10 мин): worker
|
||||
# остановлен → queue lag firing → resolved; таблица sessions под
|
||||
# блокировкой → error rate firing → resolved
|
||||
.PHONY: alerts-check
|
||||
alerts-check:
|
||||
$(PYTHON) scripts/lab6.py alerts-check --base-url "$(BASE_URL)"
|
||||
|
||||
# Tempo остановлен под нагрузкой на OUTAGE_SECONDS (~3–4 мин): API и
|
||||
# загрузки работают, память Collector ограничена, потери посчитаны
|
||||
OUTAGE_SECONDS ?= 120
|
||||
.PHONY: telemetry-outage
|
||||
telemetry-outage:
|
||||
$(PYTHON) scripts/lab6.py telemetry-outage --base-url "$(BASE_URL)" \
|
||||
--seconds $(OUTAGE_SECONDS)
|
||||
|
||||
# --- Нагрузочный стенд (лаба 6, трек 1 — цена наблюдаемости; профили лаб
|
||||
# 3–5 сохранены: отказ и замена под нагрузкой, память загрузок, стоимость
|
||||
# сверки, очередь под перегрузкой) --
|
||||
# Порядок работы — bench/RUNBOOK.md, правила — bench/AGENTS.md. Свой проект
|
||||
# compose vlad-bench, рабочий стенд перед замером — make stop.
|
||||
|
||||
TELEMETRY_LABEL ?= baseline
|
||||
QUEUE_LABEL ?= baseline
|
||||
FAILOVER_LABEL ?= baseline
|
||||
ROLLOUT_LABEL ?= baseline
|
||||
UPLOADS_LABEL ?= baseline
|
||||
RECONCILE_LABEL ?= baseline
|
||||
# серия трека 1 лабы 3 (сохраняется): a, b, db, ab, quick
|
||||
SERIES ?=
|
||||
SCALING_LABEL ?=
|
||||
LABELS ?=
|
||||
PLOTS ?= scaling
|
||||
BENCH = $(CAFFEINATE) uv run python bench/run.py
|
||||
|
||||
# лаба 6, трек 1: варианты телеметрии off, full, head, tail, balanced × 3
|
||||
# повтора при одной открытой нагрузке с редкими событиями (~50 мин); пишет
|
||||
# evidence/telemetry-cost/<метка>/
|
||||
.PHONY: bench-telemetry
|
||||
bench-telemetry:
|
||||
$(BENCH) telemetry --label "$(TELEMETRY_LABEL)"
|
||||
|
||||
# самопроверка профиля (~7 мин): все пять вариантов, один повтор, окна
|
||||
# 5 + 20 + 12 с; метка quick-telemetry-<UTC> в отчёт не идёт
|
||||
.PHONY: bench-telemetry-quick
|
||||
bench-telemetry-quick:
|
||||
$(BENCH) telemetry-quick
|
||||
|
||||
# лаба 5, трек 1: настройки concurrency/prefetch worker × классы изображений;
|
||||
# ёмкость, ровная нагрузка, перегрузка при пределе незавершённых и
|
||||
# восстановление; пишет evidence/queue/<метка>/
|
||||
.PHONY: bench-queue
|
||||
bench-queue:
|
||||
$(BENCH) queue --label "$(QUEUE_LABEL)"
|
||||
|
||||
# самопроверка профиля очереди (~9 мин): c1p1 и c4p4 × классы s и x, один
|
||||
# повтор, короткие окна; метка quick-queue-<UTC> в отчёт не идёт
|
||||
.PHONY: bench-queue-quick
|
||||
bench-queue-quick:
|
||||
$(BENCH) queue-quick
|
||||
|
||||
# уровень 4 лабы 3: две реплики под постоянной нагрузкой, каждая в режимах
|
||||
# stop, kill, pause с возвратом; пишет evidence/failover/<метка>/
|
||||
.PHONY: bench-failover
|
||||
bench-failover:
|
||||
$(BENCH) failover --label "$(FAILOVER_LABEL)"
|
||||
|
||||
# проверка стенда отказа (~2 мин); метка quick-failover-<UTC> в отчёт не идёт
|
||||
.PHONY: bench-failover-quick
|
||||
bench-failover-quick:
|
||||
$(BENCH) failover-quick
|
||||
|
||||
# уровень 4 лабы 3: поочерёдная замена (scripts/rolling-update.sh) под той
|
||||
# же нагрузкой, с новой expand-ревизией; пишет evidence/rollout/<метка>/
|
||||
.PHONY: bench-rollout
|
||||
bench-rollout:
|
||||
$(BENCH) rollout --label "$(ROLLOUT_LABEL)"
|
||||
|
||||
.PHONY: bench-rollout-quick
|
||||
bench-rollout-quick:
|
||||
$(BENCH) rollout-quick
|
||||
|
||||
# лаба 4, уровень 4: сколько памяти занимает реплика, когда параллельно
|
||||
# грузят 1, 10, 20 или 40 клиентов тела ~1 и ~10 MiB; сравниваются места
|
||||
# по умолчанию и режим без лимита. Результат — evidence/uploads/<метка>/
|
||||
.PHONY: bench-uploads
|
||||
bench-uploads:
|
||||
$(BENCH) uploads --label "$(UPLOADS_LABEL)"
|
||||
|
||||
# самопроверка профиля загрузок (~5 мин); метка quick-uploads-<UTC>
|
||||
.PHONY: bench-uploads-quick
|
||||
bench-uploads-quick:
|
||||
$(BENCH) uploads-quick
|
||||
|
||||
# уровень 5, трек 2: стоимость сверки bucket и БД по размеру набора,
|
||||
# стратегиям и под фоновой нагрузкой; пишет evidence/reconcile/<метка>/
|
||||
.PHONY: bench-reconcile
|
||||
bench-reconcile:
|
||||
$(BENCH) reconcile --label "$(RECONCILE_LABEL)"
|
||||
|
||||
# самопроверка профиля сверки (~6 мин); метка quick-reconcile-<UTC>
|
||||
.PHONY: bench-reconcile-quick
|
||||
bench-reconcile-quick:
|
||||
$(BENCH) reconcile-quick
|
||||
|
||||
# трек 1 лабы 3 (сохраняется для сравнения, в лабе 4 не обязателен):
|
||||
# серия конфигураций, на каждую ячейку свежий стенд, открытая модель,
|
||||
# поиск R*; пишет evidence/scaling/<метка>/. CONFIGS="4x1-pg0.5 4x1" —
|
||||
# ячейки вместо профильных; RESUME=1 — продолжить прерванную метку
|
||||
CONFIGS ?=
|
||||
.PHONY: bench-scaling
|
||||
bench-scaling:
|
||||
@test -n "$(SERIES)" || (echo "usage: make bench-scaling SERIES=a|b|db|ab [SCALING_LABEL=...] [CONFIGS=...] [RESUME=1]"; exit 2)
|
||||
$(BENCH) scaling --series "$(SERIES)" $(if $(SCALING_LABEL),--label "$(SCALING_LABEL)",) \
|
||||
$(if $(CONFIGS),--configs "$(CONFIGS)",) $(if $(RESUME),--resume,)
|
||||
|
||||
# самопроверка серий (~5 мин): 1 × 1 и 2 × 1, короткие окна
|
||||
.PHONY: bench-scaling-quick
|
||||
bench-scaling-quick:
|
||||
$(BENCH) scaling --series quick
|
||||
|
||||
# сравнение двух меток серий (по общим конфигурациям); AA — метка того же
|
||||
# кода, что BEFORE: уровень шума
|
||||
.PHONY: bench-compare
|
||||
bench-compare:
|
||||
@test -n "$(BEFORE)" -a -n "$(AFTER)" || \
|
||||
(echo "usage: make bench-compare BEFORE=<label> AFTER=<label> [AA=<label>]"; exit 2)
|
||||
uv run python bench/compare.py --before "$(BEFORE)" --after "$(AFTER)" \
|
||||
$(if $(AA),--aa "$(AA)",)
|
||||
|
||||
# графики SVG и сводка серий трека 1: evidence/plots/<PLOTS>/
|
||||
.PHONY: bench-plots
|
||||
bench-plots:
|
||||
@test -n "$(LABELS)" || (echo "usage: make bench-plots LABELS=\"scaling-a scaling-b\" [PLOTS=scaling]"; exit 2)
|
||||
uv run python bench/plots.py --out "$(PLOTS)" $(LABELS)
|
||||
|
||||
@@ -1,37 +1,706 @@
|
||||
# Отчёт — лабораторная 6
|
||||
|
||||
- Автор, группа: TODO
|
||||
- Целевая оценка; выбранный трек 5, если нужен: TODO
|
||||
- Commit/PR: TODO после публикации
|
||||
- Использованные источники, библиотеки и помощь ИИ: TODO
|
||||
- Автор, группа: Владимирцева, БВТ2301
|
||||
- Целевая оценка; выбранный трек 5, если нужен: «5», трек 1 «Цена наблюдаемости»
|
||||
- Commit/PR: [ветка решения `solution/bvt2301-vladimirceva`](https://gitea.privcloud.tech/Anastasia_Vladimirceva/mtusi2026lab6-vladimirceva/src/branch/solution/bvt2301-vladimirceva); коммит приложения `4f4e07a`, измеренный код — по `src_sha256` ниже
|
||||
- Использованные источники, библиотеки и помощь ИИ: см. последний раздел
|
||||
|
||||
## Запуск из чистого clone
|
||||
|
||||
TODO: версии runtime/образов, prerequisites, команды создания локальных secrets/.env, build, миграций, запуска, ожидания готовности, тестов и остановки. Указать необходимые действия оператора. Не вставлять секреты. Отдельно указать безопасную остановку и команду намеренного удаления учебных данных.
|
||||
Нужны Docker с Compose 5.6.1 (проверено на Docker 29.9.2 и 28.0.4), `make`, `uv`
|
||||
и Python 3.9+ на хосте для скриптов проверок. Стенд рассчитан на ВМ Docker не меньше
|
||||
10 CPU и 7,7 ГиБ для нагрузочного профиля (рекомендуется 9 ГиБ). Образ приложения — Python 3.13; сервисы закреплены по digest:
|
||||
PostgreSQL 18.6, Valkey 9.1.2, HAProxy 3.4.6, SeaweedFS 4.48, RabbitMQ 4.3.7,
|
||||
OpenTelemetry Collector contrib 0.164.0, Prometheus 3.15.1, Loki 3.7.9, Tempo 3.1.1,
|
||||
Grafana 13.3.1.
|
||||
|
||||
На машине замеров (Docker Desktop 28.0.4 / Compose 2.34.0) Docker CLI
|
||||
добавляет `docker.cli.cobra.command_path` в ресурсные атрибуты OTel
|
||||
([docker/cli#4958](https://github.com/docker/cli/issues/4958)). Перед командами ниже:
|
||||
|
||||
```sh
|
||||
sh tools/docker-compat/setup.sh # macOS arm64: Compose 5.6.1 с проверкой SHA-256
|
||||
export PATH="$PWD/tools/docker-compat:$PATH"
|
||||
```
|
||||
|
||||
Обёртка вызывает локальный Compose 5.6.1 напрямую, остальные команды — обычный Docker.
|
||||
Установка хранится в `.local-tools/`, исключённом из Git; системный Docker не меняется.
|
||||
С Compose 2.34.0 `make up --wait` также завершался ошибкой на фоновом сервисе без healthcheck.
|
||||
Она нужна только на затронутых версиях Docker Desktop для macOS; пути можно задать
|
||||
через `LAB6_DOCKER_CLI` и `LAB6_COMPOSE_CLI`. Приложение получает исходное
|
||||
`deployment.environment.name=lab`, его код и конфигурации сигналов не меняются.
|
||||
|
||||
```sh
|
||||
make install # uv-окружение и закреплённые зависимости для проверок/бенча
|
||||
make env # .env со случайными паролями и ключами (пароли в отчёт не попадают)
|
||||
make up # сборка, миграции, bootstrap S3, все сервисы; ждёт healthy
|
||||
make test # публичный smoke через LB, http://localhost:8080
|
||||
make stop # безопасная остановка: контейнеры, данные в volume остаются
|
||||
make wipe # намеренное удаление контейнеров и volume, спрашивает yes
|
||||
```
|
||||
|
||||
Дальше всё необходимое — одной командой: `make telemetry-check`, `make trace-chain`,
|
||||
`make alerts-test`, `make alerts-check`, `make telemetry-outage`; Grafana —
|
||||
`make grafana` печатает адрес dashboard (`127.0.0.1:3180`, логин `admin`, пароль
|
||||
`GRAFANA_ADMIN_PASSWORD` из `.env`). Dashboard и источники данных подключаются
|
||||
provisioning из `infra/otel/grafana/` без ручной настройки в Grafana.
|
||||
Порты чистой установки из `.env.example` (все на 127.0.0.1): LB 8080, PostgreSQL 5433, Valkey 6380, S3 8334, RabbitMQ 5673,
|
||||
Grafana 3180; Collector, Prometheus, Loki и Tempo наружу не опубликованы.
|
||||
На машине разработки использовались другие порты из локального `.env` (LB 8180);
|
||||
это окружение сохранено в шапках исходных доказательств.
|
||||
|
||||
## Архитектура и решения
|
||||
|
||||
TODO: схема процессов/хранилищ, источник истины, транзакционные границы, ограничения. Что перенесено из lab5, что изменено в этой работе. Соответствие переменных из .env.example реальной конфигурации.
|
||||
**Что взято из лабы 5** (внешнее поведение API осталось прежним): реплики API за HAProxy, PostgreSQL
|
||||
(данные, сессии, ключи идемпотентности, метаданные и задания), Valkey (кэш карточек), S3
|
||||
(staging и опубликованные файлы), RabbitMQ, relay (outbox → брокер), worker (рендер в
|
||||
отдельном процессе), cleaner. Источник истины и транзакционные границы те же: загрузка
|
||||
отвечает 202 только когда в одной транзакции записаны вложение `queued` и задание.
|
||||
|
||||
**Добавлено в лабе 6:**
|
||||
|
||||
- модуль `src/telemetry/` (SDK, ресурсные атрибуты, инструменты, журнал в OTLP); слои
|
||||
`services` и `broker` вызывают его через узкий интерфейс, отключённая телеметрия
|
||||
(`OTEL_SDK_DISABLED=true`) ничего не делает;
|
||||
- миграция `0005` (expand): `attachment_jobs.traceparent` и `tracestate`, чтобы контекст
|
||||
запроса пережил outbox и рестарты;
|
||||
- Collector, Prometheus, Loki, Tempo, Grafana — в том же `compose.yaml`, конфиги в
|
||||
`infra/otel/`;
|
||||
- SLO-правила и alerts, runbooks, скрипты проверок `scripts/lab6.py`.
|
||||
|
||||
**Хранилища.** Collector принимает OTLP (HTTP 4318) от api, relay и worker, ограничивает
|
||||
память, пакует и раздаёт по сигналам. Prometheus — метрики (Collector отдаёт их на 8889,
|
||||
Prometheus забирает; хранение 7 суток или 1 ГБ), он же считает recording-правила и alerts.
|
||||
Loki — структурные журналы, получает по OTLP, хранение 168 ч. Tempo — трассы, 168 ч. Grafana
|
||||
сама ничего не хранит, а показывает три источника с переходом «журнал → трасса» по `trace_id`.
|
||||
|
||||
**Соответствие `.env.example` реальной конфигурации.** Настройки читает
|
||||
`Settings.from_env()` в `src/config.py`; Compose передаёт их через environment.
|
||||
В репозитории `.env` создаётся локально со случайными секретами и не попадает в Git.
|
||||
Файлы `/run/secrets/*` из логических подсказок skeleton приложение не читает.
|
||||
|
||||
| Имена из шаблона / окружения | Реальная настройка решения |
|
||||
| --- | --- |
|
||||
| `DATABASE_URL_FILE` | не используется; Compose передаёт `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER`, `DB_PASSWORD` из `POSTGRES_*` |
|
||||
| `CACHE_URL_FILE`, `SESSION_STORE` | файл и переключатель не используются; `CACHE_*` — Valkey для карточек чатов, сессии всегда в PostgreSQL |
|
||||
| `BROKER_URL_FILE` | не используется; `BROKER_HOST`, `BROKER_PORT`, `BROKER_USER`, `BROKER_PASSWORD` передаются только relay и worker |
|
||||
| `S3_ACCESS_KEY_ID_FILE`, `S3_SECRET_ACCESS_KEY_FILE` | не используются; Compose передаёт `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY` из своей пары `S3_API_*`, `S3_WORKER_*`, `S3_CLEANER_*` для каждой роли |
|
||||
| `S3_ENDPOINT`, `S3_REGION`, `S3_BUCKET` | Compose фиксирует endpoint `http://s3:8333`, передаёт bucket из `.env`; регион в контейнере — умолчание `us-east-1`. При прямом запуске ObjectStorage читает все три переменные; `make run` подставляет loopback и `S3_HOST_PORT` |
|
||||
| `MAX_UPLOAD_BYTES`, `MAX_IMAGE_PIXELS` | логические подсказки; пределы контракта зафиксированы в `src/constants.py`: 10 MiB и 40 млн пикселей |
|
||||
| `APP_ENV`, `OTEL_SERVICE_NAME` | не задают ресурс SDK: среда берётся из `OTEL_RESOURCE_ATTRIBUTES`, service.name фиксирован точками входа (`messenger-api`, `messenger-worker`, `messenger-relay`) |
|
||||
| `OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_EXPORTER_OTLP_PROTOCOL` | читаются Telemetry.from_env; Compose фиксирует `http://otel-collector:4318` и `http/protobuf` |
|
||||
| `OTEL_RESOURCE_ATTRIBUTES`, `OTEL_SDK_DISABLED`, `OTEL_TRACES_SAMPLER_ARG`, `OTEL_METRIC_EXPORT_INTERVAL`, `TELEMETRY_HISTOGRAM_BUCKETS` | поддерживаемые настройки ресурса, выключения SDK, head sampling, периода метрик и границ histogram; значения валидируются до запуска |
|
||||
| `WORKER_*`, `JOB_*`, `STAGING_RETENTION_SECONDS`, `API_REPLICAS` | параметры фонового конвейера, уборки и числа реплик; распределяются Compose по ролям |
|
||||
| `GRAFANA_*`, `*_HOST_PORT` | настройки Compose и операторских команд, а не Settings приложения |
|
||||
|
||||
**Лимиты рабочего стенда.** Сумма лимитов всех сервисов — 11 CPU и 7360 МиБ (Tempo 512 МиБ,
|
||||
Collector 256 МиБ с `memory_limiter` 180/36 МиБ). Стенд замеров (`bench/`) меньше по CPU, но
|
||||
Tempo там 768 МиБ.
|
||||
|
||||
## Наблюдаемость
|
||||
|
||||
### Уровень 3
|
||||
|
||||
**Сигналы и имена в Prometheus** (точки в OTel превращаются в подчёркивания, к единице
|
||||
добавляется суффикс):
|
||||
|
||||
| Сигнал | Имя в Prometheus | Единица |
|
||||
| --- | --- | --- |
|
||||
| число ответов API по методу, шаблону маршрута и классу статуса | `http_server_request_duration_seconds_count` | запросы (counter гистограммы) |
|
||||
| длительность запроса API | `http_server_request_duration_seconds_{bucket,count,sum}` | секунды |
|
||||
| число обработок заданий по типу и исходу | `messenger_job_duration_seconds_count`, `messenger_job_type`, `messenger_job_outcome` | обработки (counter гистограммы, включая retry) |
|
||||
| длительность и исход доставки задания | `messenger_job_duration_seconds_*`, метка `messenger_job_outcome` | секунды |
|
||||
| действия relay | `messenger_relay_jobs_total` | штуки |
|
||||
| время до ready | `messenger_attachment_time_to_ready_seconds_*` | секунды |
|
||||
| очередь | `messenger_job_queue_depth`, `messenger_job_queue_oldest_age_seconds` | задания, секунды |
|
||||
| пул БД | `db_client_connection_count`, `_pending_requests`, `_max` | соединения |
|
||||
| worker | `messenger_worker_busy`, `messenger_worker_capacity` | слоты |
|
||||
| процесс | `process_cpu_time_seconds_total`, `process_memory_usage_bytes` | секунды CPU, байты |
|
||||
|
||||
Метки низкой кардинальности: метод, шаблон маршрута (`/api/v1/chats/{chat_id}/…`, не сырой URL),
|
||||
класс и код ответа, тип и исход задания. Идентификаторов пользователей, чатов, сообщений,
|
||||
имён файлов и request id в метках нет (`telemetry-check` проверил 35 рядов).
|
||||
|
||||
**Ресурсные атрибуты:** `service.name`, `service.version` (0.6.0), `service.instance.id`,
|
||||
`deployment.environment.name`; в Prometheus они попадают через `target_info` (проверка видит
|
||||
`messenger-api`, `-relay`, `-worker` версии 0.6.0, среда `lab`).
|
||||
|
||||
**Логи.** Строка stdout остаётся текстом `key=value`; та же запись уходит в Loki по OTLP, и
|
||||
у записи в контексте запроса или задания есть `trace_id` и `span_id`. `telemetry-check` нашёл
|
||||
запись контрольного запроса в Loki, в stdout и в Tempo с одним `trace_id`, а у загрузки — строку
|
||||
worker `attachment processed` с `trace_id` задания.
|
||||
Технические ID учебных запросов, вложений и заданий в логах/трассах нужны, чтобы связать
|
||||
приём 202 с публикацией, попытками worker и результатом; они не используются как labels метрик.
|
||||
|
||||
**Что не экспортируется:** тела и тексты сообщений, имена файлов (только длина), пароли,
|
||||
токены, `Authorization`, `Idempotency-Key`, параметры SQL, байты изображений; пробы
|
||||
здоровья не пишутся ни в метрики, ни в трассы; собственных span у FastAPI нет, server span
|
||||
один и создаётся вручную с шаблоном маршрута. В 84 записях журнала и 63 821 байте трасс
|
||||
проверка не нашла секретов и текстов.
|
||||
|
||||
### Уровень 4
|
||||
|
||||
**Сквозная трасса.** API кладёт `traceparent` (и `tracestate`) своего server span в строку
|
||||
задания в той же транзакции, что и вложение. Relay читает строку и создаёт producer span
|
||||
`publish <очередь>` с родителем из строки; его контекст он пишет в заголовки AMQP сообщения,
|
||||
не в тело. Worker достаёт заголовки и открывает consumer span с родителем producer span.
|
||||
Повторная доставка публикуется заново с тем же сохранённым контекстом, поэтому все попытки
|
||||
оказываются в одной трассе. Relay без сохранённого контекста новую трассу не начинает.
|
||||
|
||||
**Почему parent, а не link.** Одно сообщение — одно задание и вызвано одним запросом; обработка
|
||||
является продолжением запроса, а не независимой работой по нескольким источникам. Link
|
||||
нужен, когда у consumer несколько причин (пакетная обработка) или трассы должны быть
|
||||
раздельными. Здесь parent даёт одну трассу целиком: `trace-chain` нашёл server span API,
|
||||
два producer span relay и два consumer span worker (попытка 1 — `retry` с ошибкой S3, попытка 2 —
|
||||
`ready`) со span `S3 get_object`/`put_object`, `postgresql transaction` и рендером.
|
||||
|
||||
**Очередь, пул и готовность.** Глубину очереди по состояниям (`outbox`, `published`,
|
||||
`processing`) и возраст старейшего задания считает relay раз в 5 с из PostgreSQL по частичным
|
||||
индексам: задание ждёт и в outbox, и в брокере, и в аренде, и счёт брокера этого не видит.
|
||||
Пул — число занятых и свободных соединений, ожидающие (счётчик в `src/db.py`) и предел.
|
||||
Насыщение worker — `busy` против `capacity`; плюс CPU процесса (с дочерними процессами
|
||||
рендера) и RSS. Time to ready — гистограмма от записи задания до `ready`.
|
||||
|
||||
**Панели и их запросы.** Dashboard лежит в `infra/otel/grafana/dashboards/messenger-lab6.json`;
|
||||
запрос и единицу каждой панели повторяет её `description`.
|
||||
|
||||
| Панель | PromQL | Единица |
|
||||
| --- | --- | --- |
|
||||
| p50/p95/p99 запроса | `histogram_quantile(q, sum by (le) (rate(http_server_request_duration_seconds_bucket{job="messenger-api"}[5m])))` | с |
|
||||
| доля 5xx | `sum(rate(…_count{http_response_status_class="5xx"}[5m])) / sum(rate(…_count[5m]))` | доля |
|
||||
| глубина очереди | `sum by (messenger_job_state) (messenger_job_queue_depth)` | задания |
|
||||
| возраст старейшего | `max by (messaging_destination_name) (messenger_job_queue_oldest_age_seconds)` | с |
|
||||
| time to ready p50/p95/p99 | `histogram_quantile(q, sum by (le) (rate(messenger_attachment_time_to_ready_seconds_bucket[5m])))` | с |
|
||||
| пул БД | `sum by (job) (db_client_connection_count{db_client_connection_state="used"})`, `…pending_requests`, `…max` | соединения |
|
||||
| насыщение worker | `sum(messenger_worker_busy)` и `sum(messenger_worker_capacity)` | слоты |
|
||||
| CPU, RSS | `sum by (job, instance) (rate(process_cpu_time_seconds_total[…]))`, `process_memory_usage_bytes` | ядра, байты |
|
||||
|
||||
Квантили считаются из bucket-рядов, суммированных по репликам до `histogram_quantile`:
|
||||
усреднение готовых p99 реплик не используется.
|
||||
|
||||
**SLI/SLO (окно 7 суток).** API: ≥ 99,5 % учтённых репликами бизнес-ответов без 5xx
|
||||
(4xx — не отказ, health исключён). Числитель доступности — все ответы минус 5xx,
|
||||
знаменатель — все ответы API. Для времени до ready: ≥ 95 % наблюдаемых успешных
|
||||
переходов в `ready` укладываются в 30 с от durable acceptance. Здесь числитель —
|
||||
`increase(..._bucket{le="30.0"}[7d])`, знаменатель — `increase(..._count[7d])`
|
||||
гистограммы `messenger_attachment_time_to_ready_seconds`, суммированные по процессам.
|
||||
Это условный SLI задержки успешных вложений: failed и ещё ожидающие задания
|
||||
в его знаменатель не входят; их исходы и backlog контролируются отдельно.
|
||||
Он не доказывает долю всех принятых 202, ставших ready за 30 с. Recording-правила —
|
||||
`messenger:http_availability:ratio_7d` и `messenger:attachment_ready_30s:ratio_7d`, на dashboard
|
||||
есть панель SLO. Сами правила записаны в `infra/otel/prometheus/rules.yml`, а проверяет
|
||||
их promtool по `rules.test.yml`.
|
||||
|
||||
| Alert | Условие | for | Runbook |
|
||||
| --- | --- | --- | --- |
|
||||
| `MessengerHighErrorRate` | доля 5xx за 2 мин > 0,05 при трафике > 0,05 запроса/с | 1 мин | `infra/otel/runbooks/high-error-rate.md` |
|
||||
| `MessengerQueueLagGrowing` | возраст старейшего задания очереди > 60 с | 1 мин | `infra/otel/runbooks/queue-lag.md` |
|
||||
| `MessengerTelemetryTargetDown` | `up{job=~"messenger\|otel-collector"} == 0` | 1 мин | `infra/otel/runbooks/telemetry-down.md` |
|
||||
|
||||
**Collector при недоступном backend.** `memory_limiter` (180 МиБ, запас 36), затем `batch`.
|
||||
Очередь экспорта каждого backend — 20 000 элементов, при переполнении новое отбрасывается
|
||||
(`block_on_overflow: false`), повторы с паузой 2–10 с до 60 с. Память растёт до лимита очереди,
|
||||
а не бесконечно; потери считает сам Collector (`otelcol_exporter_send_failed_*`,
|
||||
`enqueue_failed_*`). API ждать Collector не обязан: SDK экспортирует в фоне через собственную
|
||||
очередь. Это подтверждает сценарий с остановленным Tempo ниже.
|
||||
|
||||
## Разбор двух инцидентов
|
||||
|
||||
Повторено на машине замеров 20 ноября 2026 командой
|
||||
`python3 tools/audit_incidents.py` после `make up`. Сценарий выполняет alerts-check
|
||||
и сохраняет реальные снимки Tempo и связанные строки Loki в момент отказа и восстановления.
|
||||
[Вывод команд и деревья трасс](evidence/telemetry/submission-review-20261120.txt):
|
||||
alerts-check **6/6**, дополнительные проверки диагностики **7/7**.
|
||||
Исторические тайминги серии 15 ноября сохранены в исходных файлах evidence отдельно.
|
||||
|
||||
**Инцидент 1. Остановлен worker.** Три загрузки приняты с 202, задания остаются в очереди.
|
||||
|
||||
- Метрики: `MessengerQueueLagGrowing` pending на 90 с, firing на 150 с;
|
||||
backlog 3, старейшее задание 144 с. После запуска worker очередь 3 → 0,
|
||||
через 25 с alert inactive (resolved).
|
||||
- Трасса `5abc3f9fb065793d443f35331bf823b7`: во время отказа server span загрузки
|
||||
длится 13,6 мс, есть producer relay `publish messenger.attachment-jobs`, consumer отсутствует.
|
||||
Значит запрос принят и опубликован; обработка потребителем ещё не началась.
|
||||
- Лог Loki с тем же trace_id: `POST …/attachments -> 202 (13.5 ms)` и
|
||||
`attachment accepted`. После восстановления в той же трассе появился consumer
|
||||
worker с outcome=ready (130,3 мс), а в Loki — `attachment processed`, attempt=1,
|
||||
variants=3. Наблюдения связывают приём, ожидание и обработку одного задания.
|
||||
|
||||
**Инцидент 2. Блокировка таблицы sessions.** Четыре клиента запрашивают users/me;
|
||||
запросы ждут в БД и завершаются 503 по statement_timeout.
|
||||
|
||||
- Метрики: `MessengerHighErrorRate` pending на 80 с, firing на 140 с;
|
||||
доля 5xx 1,00, статусы 503 × 104 и 200 × 4, пул — 4 занятых соединения,
|
||||
ожидающих 0. Это не исчерпание пула.
|
||||
- Трасса `5390f80c0e4a6a0c82ef45412f1ecb43`: server span
|
||||
`GET /api/v1/users/me` — 5006,6 мс, дочерний `postgresql read` — 5005,3 мс;
|
||||
оба ERROR. Почти всё серверное время занято операцией PostgreSQL, что позволяет
|
||||
отличить медленную БД от вычислений в HTTP handler.
|
||||
- Лог с этим trace_id: `GET /api/v1/users/me -> 503 (5006.3 ms)` и
|
||||
`database unavailable … canceling statement due to statement timeout`.
|
||||
SQL-параметры и токен в записи не выводятся.
|
||||
- Восстановление: после снятия блокировки через 70 с alert inactive;
|
||||
в последнем окне наблюдения 1324 ответа 200, ответов 503 нет.
|
||||
|
||||
**Инцидент 3. Недоступен Tempo.** Повторено `make telemetry-outage` на том же стенде:
|
||||
за 120 с без Tempo API дал 1230 ответов 200, 11 из 11 загрузок дошли до ready.
|
||||
Пик Collector — 64 МиБ из 256, пик очереди экспорта — 2110 из 20000 элементов;
|
||||
сумма счётчиков send_failed + enqueue_failed — 152 span. После возврата Tempo
|
||||
экспорт возобновился, очередь уменьшилась до 0. Проверка **5/5**, полный вывод —
|
||||
в [свежем доказательстве](evidence/telemetry/submission-review-20261120.txt).
|
||||
Это показатели Collector; отдельного счётчика потерь до него в SDK нет.
|
||||
|
||||
## Доказательства критериев
|
||||
|
||||
Базовые проверки сняты 15 ноября 2026 на машине разработки; нагрузка — 16 ноября
|
||||
на машине замеров, проверка перед сдачей — 20 ноября. Код `src_sha256 81c47ffc…`
|
||||
одинаков; шапка каждого файла содержит дату, окружение и команду повторения.
|
||||
|
||||
| Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства |
|
||||
| --- | --- | --- | --- |
|
||||
| Публичный smoke | make test | TODO | TODO |
|
||||
| Остальные пункты уровня 3 | TODO | TODO | TODO |
|
||||
| Все пункты уровня 4, если заявлен | TODO | TODO | TODO |
|
||||
| Выбранный трек 5, если заявлен | TODO | TODO | TODO |
|
||||
|
||||
TODO: добавить отдельную строку для каждого заявленного критерия. PASS без команды и наблюдения не является доказательством. Проверка инфраструктурного hook требует подтверждения, какие реальные процессы/хранилища перезапущены.
|
||||
| Публичный smoke | `make test` | PASS (2 с) | `evidence/tests/test.txt` |
|
||||
| Минимум лабы 5 на чистом стенде | `make test-isolated` | 178 passed, failover, attachment-failover, persistence, `results` все 0 | `evidence/tests/test-isolated.txt` |
|
||||
| Стенд: роли, loopback, лимиты, digest | `docker compose ps`, `docker inspect` | образ приложения один у api ×2, relay, worker, cleaner; лимиты у всех; наружу только 6 портов 127.0.0.1 | `evidence/stand/stand.txt` |
|
||||
| Приватность S3, ключи по ролям | `make s3-check` | 79 проверок, 0 расхождений | `evidence/s3/privacy.txt` |
|
||||
| Шаги защиты 2–3 лабы 5: задание переживает рестарт | `make defense` | PASS, 31 с, `queued` → `ready` после worker, thumbnail 256×160 | `evidence/attachments/defense.txt` |
|
||||
| Сигналы, трасса ↔ лог, без секретов, без ids в метках | `make telemetry-check` | 22/22: пары запрос → трасса → лог и загрузка → worker; 35 рядов без ids | `evidence/telemetry/check.txt` |
|
||||
| Dashboard и источники — provisioning | `make up`, `make grafana` | три источника и dashboard подключены из `infra/otel/grafana/` без ручного ввода | `infra/otel/grafana/`, `evidence/telemetry/check.txt` |
|
||||
| 4: перенос контекста, retry | `make trace-chain` | 9/9: одна трасса, 2 producer, 2 consumer (retry, ready), S3 и PostgreSQL | `evidence/telemetry/trace-chain.txt` |
|
||||
| 4: правила и SLO | `make alerts-test` | 7 правил, тесты promtool SUCCESS | `evidence/alerts/promtool.txt` |
|
||||
| 4: alerts на реальном отказе | `make alerts-check` | 6/6: lag firing 151 с и resolved 25 с; error rate firing 126 с и resolved 65 с | `evidence/alerts/alerts-check.txt` |
|
||||
| 4: backend недоступен | `make telemetry-outage` | 5/5: 1178 × 200, 11/11 ready, Collector 63 МиБ, 128 span потеряно | `evidence/telemetry/outage.txt` |
|
||||
| 4: отказы хранилищ и pipeline с телеметрией | `make failure-checks FAULT_ARGS=-rP` | 34 passed, `results` fault 0 | `evidence/tests/failure-checks.txt` |
|
||||
| Трек 1 «Цена наблюдаемости» | `make bench-telemetry TELEMETRY_LABEL=baseline-after-restart` | 15/15; T1, T3 опровергнуты; T2, T4–T7 подтверждены; S1–S5 выполнены; потерь и host_warnings нет | [summary.md](evidence/telemetry-cost/baseline-after-restart/summary.md), [meta.json](evidence/telemetry-cost/baseline-after-restart/meta.json) |
|
||||
| Перепроверка на машине замеров | unit-test, 5 selftest, test, telemetry-check, test-isolated, failure-checks | 38 unit; 178 isolated, все resilience 0; 34 fault; 22/22 telemetry | [подготовка](evidence/tests/host-preflight-20261116.txt), [стенды](evidence/tests/host-stand-20261116.txt) |
|
||||
| Финальные проверки | `make lint`, `make check`, `make test-isolated`, `make stop` | PASS, 178 passed, все resilience 0; своих работающих контейнеров нет | [final-check-20261116.txt](evidence/tests/final-check-20261116.txt) |
|
||||
| Аудит перед сдачей, 20 ноября | smoke, telemetry-check, promtool, audit_incidents, trace-chain, telemetry-outage | PASS; 22/22, 7 правил SUCCESS, alerts 6/6, диагностика 7/7, retry 9/9, отказ Tempo 5/5 | [submission-review-20261120.txt](evidence/telemetry/submission-review-20261120.txt) |
|
||||
|
||||
## Эксперименты и отказы
|
||||
|
||||
TODO: гипотеза, hardware/лимиты, версии, объём данных, профиль нагрузки, concurrency/arrival rate, длительность/прогрев, повторы, успешные RPS, ошибки, p50/p95/p99, CPU/RAM. Сохранить raw summary без tokens и объяснить ограничения измерения.
|
||||
Цену телеметрии меряет трек 1 (раздел ниже: методика, гипотезы, критерии записаны до
|
||||
замеров). Таблица ниже — историческая серия 15 ноября; свежий повтор 20 ноября
|
||||
описан выше и сохранён отдельным файлом. Сценарии отказов используют свой
|
||||
контролируемый трафик и выполняются отдельно от исследовательского профиля:
|
||||
|
||||
| Воздействие | Что ожидаем | Что наблюдали | Время восстановления / потеря данных |
|
||||
| --- | --- | --- | --- |
|
||||
| TODO | TODO | TODO | TODO |
|
||||
| Остановлен worker | задания ждут, alert lag | pending 90 с, firing 151 с, backlog 3, старейшее 129 с | resolved 25 с после старта, 3 → 0, потерь нет |
|
||||
| Блокировка `sessions` | 503 по таймауту, alert error rate | 503 × 96, доля 0,43, firing 126 с | resolved 65 с после снятия, 200 × 1220 |
|
||||
| Tempo остановлен 120 с | API и загрузки живы, память Collector ограничена | 1178 × 200, 11/11 ready, пик 63 МиБ, очередь 2060 | потеряно 128 span (счёт Collector), после возврата очередь 37 |
|
||||
| PostgreSQL остановлен / заморожен | 503 без зависания | 503 за 0,01 с / 4,01 с | данные целы |
|
||||
| S3 остановлен / заморожен | 503 | 0,05 с / 5,02 с | данные целы |
|
||||
| Valkey остановлен | чтение в обход кэша | 200 | потерь нет |
|
||||
| Крах worker до коммита / после коммита до ack | повтор / без дубля | ready со 2-й попытки за 12,9 с (аренда) / повторная доставка без дубля | потерь нет; исчерпание — `failed`, `retry_exhausted` после 3 попыток |
|
||||
| Отказ одной реплики API | запросы идут через вторую | 128 успешных записей, 0 неудачных | первое восстановление 1,3 с |
|
||||
|
||||
## Трек 1. Цена наблюдаемости
|
||||
|
||||
Записано **до замеров** (машина разработки, 2026-11-16): методика, варианты, нагрузка,
|
||||
гипотезы T1–T7 с порогами, критерии S1–S5 для сбалансированной конфигурации, правило шума и
|
||||
что делать, если `balanced` не прошёл. Пороги — константы `bench/telemetry.py`; менять их
|
||||
после метки — смена методики, а не уточнение вывода. Результаты и итоговые вердикты приведены ниже.
|
||||
|
||||
### Как меряем
|
||||
|
||||
Повторить с новой меткой, сохранив существующие результаты:
|
||||
|
||||
```sh
|
||||
make stop
|
||||
make bench-telemetry TELEMETRY_LABEL="repeat-$(date -u +%Y%m%dT%H%M%SZ)"
|
||||
```
|
||||
|
||||
Выбранная завершённая метка — `evidence/telemetry-cost/baseline-after-restart/`;
|
||||
первая `baseline/` прервана и сохранена отдельно. Самопроверка —
|
||||
`make bench-telemetry-quick` (`quick-*` в отчёт не идёт).
|
||||
Порядок для машины замеров — `bench/RUNBOOK.md`.
|
||||
|
||||
- **Стенд** — свой проект compose `vlad-bench` (`compose.yaml` + `bench/bench.compose.yml`):
|
||||
HAProxy 0,5 CPU / 256 МиБ, две реплики API по 1 CPU / 512 МиБ, PostgreSQL 1 CPU / 768 МиБ,
|
||||
Valkey 0,5 CPU / 128 МиБ, S3 1 CPU / 512 МиБ, RabbitMQ 1 CPU / 512 МиБ,
|
||||
relay 0,25 CPU / 192 МиБ и worker 1 CPU / 768 МиБ; в вариантах с телеметрией — Collector,
|
||||
Prometheus, Loki и Tempo с образами, конфигурациями и лимитами рабочего стенда (`infra/otel/`,
|
||||
0,5 + 0,25 + 0,25 + 0,25 CPU), кроме памяти Tempo: 768 МиБ вместо 512 (пик 405 МиБ уже за 20 с
|
||||
быстрого профиля, полный идёт 140 с), Grafana не запускается. Сумма лимитов — 9,75 CPU /
|
||||
6,13 ГиБ (бюджет ВМ 10 CPU / 7,7 ГиБ с запасом 1,5 ГиБ). Генератор (`bench/loadgen.py mix`, 1 CPU) и
|
||||
сэмплер cgroup — в сети стенда, запросы только через LB.
|
||||
- **Адаптация до замеров (2026-11-16)** — на машине доступны 10 CPU. С согласия
|
||||
пользователя лимит PostgreSQL профиля `telemetry` и его самопроверки снижен с 2 до
|
||||
1 CPU. Нагрузка, окна, лимиты остальных процессов, варианты телеметрии и пороги
|
||||
T1–T7/S1–S5 сохранены. Все варианты сравниваются в этой конфигурации; результаты
|
||||
относятся к ней, а не к первоначальному бюджету 10,75 CPU.
|
||||
- **Прогон** — один вариант. Стенд новый на повтор; на прогон — сервисы телеметрии с пустыми
|
||||
volume и новые api × 2, relay и worker с окружением варианта. Перед нагрузкой проверяется,
|
||||
что вариант применён: строка старта каждого процесса (`telemetry=off` или `telemetry=on
|
||||
sample_ratio=… buckets=… metric_interval=…ms`) совпадает с вариантом, а после нагрузки — у
|
||||
Collector есть метрики `tail_sampling` ровно у вариантов со слоем и у Prometheus отбор рядов
|
||||
ровно у `balanced`. Иначе прогон — отказ.
|
||||
- **Окна** одного запуска генератора: разогрев 20 с, **чистое окно 90 с (по нему цена)**, окно
|
||||
отказов 30 с: на 5, 15 и 25 с таблица `messages` блокируется `LOCK TABLE … IN SHARE MODE` на
|
||||
0,6 с в своей сессии PostgreSQL — запись ждёт, чтение идёт. Затем ожидание пустой очереди
|
||||
заданий и 15 с на решения выборки и приём Tempo. План — 5 вариантов × 3 повтора кругами с
|
||||
перестановкой от зерна (вариант не повторяется на стыке кругов).
|
||||
- **Начальный набор и зерно** — поля профиля из `meta.json`: 4 синтетических
|
||||
пользователя, 200 сообщений для чтения и 3 прогревочные загрузки; нагрузочные
|
||||
PNG 480 × 320 пикселей, seed `20261116`. Параметры тел и их SHA-256 записаны
|
||||
в паспорте метки; прогревочные запросы не входят в чистое окно измерения цены.
|
||||
|
||||
### Варианты
|
||||
|
||||
Меняется только телеметрия, остальной стенд одинаков. На рабочем стенде выборки нет: там
|
||||
сохраняется каждая трасса и каждый ряд.
|
||||
|
||||
| Вариант | Настройка процессов api / worker / relay | Слой Collector | Конфигурация Prometheus |
|
||||
| --- | --- | --- | --- |
|
||||
| `off` | `OTEL_SDK_DISABLED=true`, сервисов телеметрии нет | — | — |
|
||||
| `full` | все трассы, метрики раз в 15 с, границы `default` | `infra/otel/collector.yaml` | `infra/otel/prometheus/prometheus.yml` |
|
||||
| `head` | `OTEL_TRACES_SAMPLER_ARG=0.1` | как `full` | как `full` |
|
||||
| `tail` | без изменений против `full` | добавлен `bench/otel/tail-typical.yaml`: ошибки, трасса ≥ 500 мс, 10 % остальных, ожидание 10 с | как `full` |
|
||||
| `balanced` | все трассы, `OTEL_METRIC_EXPORT_INTERVAL=30000`, `TELEMETRY_HISTOGRAM_BUCKETS=coarse` | + `bench/otel/tail-balanced.yaml` | `bench/otel/prometheus-lean.yml` |
|
||||
|
||||
`balanced` — предлагаемая сбалансированная конфигурация: Collector держит трассу 8 с и сохраняет
|
||||
трассы со span `ERROR` (5xx, отказ хранилища), трассы с неуспешным исходом задания на consumer span
|
||||
(`failed`, `retry`, `error` … — у `failed` статуса ошибки нет), трассы с server span ≥ 250 мс
|
||||
(порог по запросу, а не по длине трассы: асинхронная загрузка всегда длиннее) и 5 % остальных.
|
||||
Метрики — раз в 30 с и грубые границы (4–6 корзин, границы SLO 30 с у времени до `ready`
|
||||
сохранены). Собственные метрики Loki, Tempo и самого Prometheus урезаны отбором до трёх видов:
|
||||
сколько принято, сколько отклонено и какой объём занят.
|
||||
Журнал не выбирается.
|
||||
|
||||
### Нагрузка
|
||||
|
||||
Открытая модель, одинаковая во всех вариантах, ответ не повторяется; калибровка на машине
|
||||
разработки (`quick`) — ниже насыщения: реплика занята меньше 60 % CPU, worker и Collector —
|
||||
меньше 70 %, недосланных запросов нет.
|
||||
|
||||
| Класс | Запрос | В секунду | За прогон |
|
||||
| --- | --- | --- | --- |
|
||||
| `read` | первая страница истории (50) | 100 | 14 000 |
|
||||
| `write` | сообщение с новым `Idempotency-Key` | 30 | 4 200 |
|
||||
| `me` | `GET /users/me` | 40 | 5 600 |
|
||||
| `chat` | карточка чата (Valkey) | 30 | 4 200 |
|
||||
| `download` | оригинал готового вложения | 8 | 1 120 |
|
||||
| `upload` | PNG 480 × 320 из шума → `ready` | 0,5 | 70 |
|
||||
| `bad` | JPEG без таблиц DQT: 202, затем `failed` `invalid_image` | 0,1 | 14 |
|
||||
| `broken` | оригинал строки `ready` без объекта в S3 — 500 | 0,2 | 28 |
|
||||
|
||||
Калибровка 16 ноября (`quick`, 140 запросов/с): реплика занята ~18 % CPU, генератор — 3 %
|
||||
своего ядра, недосланных нет; поэтому лёгкие классы подняты в 1,45 раза — к ~20–30 % CPU
|
||||
реплики, ближе к рабочей нагрузке и с большим сигналом цены против шума.
|
||||
|
||||
Редкие события и их известный счёт: `broken` (строка вложения без объекта вносится SQL на свежем
|
||||
стенде), `bad` (неудачное задание без статуса ошибки span), **медленные записи** — `write` под
|
||||
блокировкой; медленной считается запись с длительностью ≥ 250 мс **на сервере** (из записи
|
||||
доступа API в Loki, её же видит server span), кандидаты — записи с задержкой клиента ≥ 200 мс.
|
||||
Отдельно — записи 250–500 мс: их типовое правило «трасса ≥ 500 мс» сохраняет только по жребию.
|
||||
|
||||
### Что меряем
|
||||
|
||||
- задержки p50/p95/p99 по классам — журнал генератора, от момента по расписанию; «лёгкие» —
|
||||
`read`, `write`, `me`, `chat` чистого окна;
|
||||
- CPU реплик на запрос — CPU обеих реплик за чистое окно (сэмплер cgroup) / все ответы окна;
|
||||
CPU worker, relay и каждого сервиса телеметрии; пик памяти — `memory.peak` контейнеров
|
||||
прогона;
|
||||
- приём — собственные метрики Collector (span, записи журнала, точки метрик), Tempo и Loki
|
||||
(span, строки, байты), Prometheus (ряды головы, отсчёты/с) по краям чистого окна; сутки —
|
||||
пересчёт байт × 86 400 (без сжатия);
|
||||
- потери — отказ приёма и ошибки очереди экспорта Collector, `dropped_too_early` выборки,
|
||||
строки логгера `opentelemetry` уровня WARNING+ в журналах процессов (SDK своих потерь метрикой
|
||||
не считает, `KNOWN_ISSUES.md`), расхождение span Collector → Tempo за прогон;
|
||||
- что теряет выборка — для каждого 500, медленной записи, неудачной и обычной загрузки и выборки
|
||||
60 `me`: запись доступа в Loki по `X-Request-Id`, её `trace_id` → трасса в Tempo (у загрузки —
|
||||
с consumer span задания); это же — переход «журнал → трасса». Отброшенное выборкой — не потеря.
|
||||
|
||||
### Правило шума
|
||||
|
||||
Шум величины — размах трёх повторов `full`. **Эффектом** разницу двух вариантов считаем при двух
|
||||
условиях: диапазоны min–max их повторов не перекрываются, а медианы расходятся сильнее шума. Порог гипотезы проверяется только у
|
||||
эффекта, иначе «в пределах шума». Доли редких событий — по сумме трёх повторов, интервал Уилсона
|
||||
95 %. Итоги — «подтверждена», «опровергнута», «нет данных».
|
||||
|
||||
### Гипотезы
|
||||
|
||||
| | Утверждение | «Подтверждена», если |
|
||||
| --- | --- | --- |
|
||||
| T1 | полная телеметрия заметно дорожает в процессах приложения и хвосте задержки | `full` против `off`: CPU реплик на запрос +15 % и больше (эффект); p99 лёгких +3 мс и больше (эффект); p50 — не больше +2 мс |
|
||||
| T2 | выбор в голове снимает большую часть цены, но теряет ошибки вслепую | `head`: надбавка CPU на запрос к `off` ≤ 60 % надбавки `full`; span в Tempo ≤ 20 % `full`; доли трасс 500, медленных записей и цепочек `failed` — в интервале около 0,1; записи журнала — 100 % |
|
||||
| T3 | типовой tail экономит хранилище, но не приложение, платит памятью Collector и теряет медленные запросы короче своего порога | `tail`: CPU реплик на запрос — без эффекта против `full`; span в Tempo ≤ 35 % `full`; пик Collector ≥ `full` + 10 МиБ; трассы 500 и цепочки `failed` — 100 %; медленные записи 250–500 мс сохранены **не все**, ≥ 500 мс — все |
|
||||
| T4 | агрегация режет ряды и отсчёты, а не CPU | `balanced`: рядов Prometheus и отсчётов/с ≤ 50 % `full` |
|
||||
| T5 | из записи журнала нельзя попасть в трассу, которую выборка не сохранила | из записей редких классов в Loki доля тех, чью трассу Tempo находит по `trace_id`: `full` — 100 %, `head` — в интервале около 0,1, `balanced` — 100 % |
|
||||
| T6 | на такой нагрузке конвейер ничего не теряет сверх того, что отбросила выборка | у каждого варианта с телеметрией нулевые: отказы Collector, `dropped_too_early`, WARNING SDK о потерях; число span на выходе Collector и в Tempo расходится не больше чем на 1 % |
|
||||
| T7 | дороже всех хранилищ — Tempo | у `full` CPU Tempo больше, чем Loki и Prometheus вместе, и приём байт Tempo больше Loki |
|
||||
|
||||
### Критерии `balanced`
|
||||
|
||||
| | Критерий |
|
||||
| --- | --- |
|
||||
| S1 | сохранены трассы всех 500, всех медленных по серверу записей (≥ 250 мс) и цепочки всех неудачных загрузок |
|
||||
| S2 | span в Tempo ≤ 20 % `full` и меньше, чем у `tail`; рядов Prometheus ≤ 50 % `full` |
|
||||
| S3 | потерь нет, до решения ничего не отброшено, пик Collector ≤ 154 МиБ (60 % лимита 256) |
|
||||
| S4 | CPU реплик на запрос не выше `full` с эффектом, CPU Collector — не больше `full` + 0,05 ядра (надбавку к `off` сводка называет отдельно) |
|
||||
| S5 | для классов, которые правила должны сохранять, нет ни одной записи Loki, чей `trace_id` Tempo не находит |
|
||||
|
||||
**Если `balanced` не прошёл** — одна правка на нарушение, затем новая метка того же профиля
|
||||
целиком (`make bench-telemetry TELEMETRY_LABEL=baseline-b2`), первая остаётся записью: S1 — `decision_wait` 15 с; S2 — доля остальных 2 %; S3 — `num_traces` 2500 и
|
||||
`decision_wait` 5 с. S4 правилами Collector не лечится: SDK всё равно создаёт и отправляет все
|
||||
span. Тогда отчёт называет цену `balanced` в приложении равной `full` и рекомендует для большей
|
||||
нагрузки выбор в голове с долей из данных `head` — без пересъёмки. S5 следует из S1.
|
||||
|
||||
### Результаты
|
||||
|
||||
Метка — [`baseline-after-restart`](evidence/telemetry-cost/baseline-after-restart/summary.md),
|
||||
[паспорт](evidence/telemetry-cost/baseline-after-restart/meta.json),
|
||||
[прогоны](evidence/telemetry-cost/baseline-after-restart/runs.csv),
|
||||
[классы запросов](evidence/telemetry-cost/baseline-after-restart/classes.csv).
|
||||
Снято 16 ноября 2026, 10:51:36–11:40:27 UTC; длительность 2932,2 с (48,9 мин).
|
||||
Выполнены 15/15 прогонов, по три каждого варианта; aborted отсутствует, все flags пусты,
|
||||
host_warnings пуст. CPU каждой реплики full — около 0,205–0,207 ядра, ниже насыщения.
|
||||
|
||||
Код образа: `src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a`.
|
||||
База Git — `470d9d6f1e4fe4f594e37c2ba59550ee5ca54fc1`, `git_dirty=true`;
|
||||
приложение идентифицируется хешем, замороженный бизнес-код не менялся.
|
||||
|
||||
Окружение из meta.json: Apple M4, 10 CPU, 16 ГиБ RAM, macOS 26.6.2 arm64;
|
||||
Docker Desktop Engine 28.0.4, Compose 5.6.1, Linux 6.10.14-linuxkit aarch64, cgroup v2.
|
||||
ВМ — 10 CPU и 8218034176 байт RAM (7,65 ГиБ); сумма лимитов 9,75 CPU и
|
||||
точно 6,125 ГиБ, с запасом 1,5 ГиБ нужно 7,625 ГиБ — проверка бюджета прошла.
|
||||
Python приложения в образе — 3.13.15; Python бенча и pytest на хосте — 3.13.7.
|
||||
Питание от сети, чужих работающих контейнеров нет; сон 0 с, swapouts 2950029 → 2950029.
|
||||
До старта в swap уже находилось 5846,94 МиБ; новых страниц за выбранную метку не выгружалось.
|
||||
|
||||
Перед этой меткой Docker Desktop перезапущен после тяжёлых подготовительных проверок.
|
||||
Первая полная метка [`baseline`](evidence/telemetry-cost/baseline/meta.json) прервана после
|
||||
обнаружения роста host swap; она сохранена и исключена из итогов. После перезапуска
|
||||
самопроверка quick-telemetry-20261116T104351Z прошла 5/5 без flags, host_warnings и swapouts.
|
||||
Самопроверки не используются как результаты исследования и не включаются в Git.
|
||||
|
||||
Таблицы ниже перенесены из summary.md без изменения чисел. Значения — медиана (min–max)
|
||||
трёх повторов; доли сохранённых событий — сумма повторов.
|
||||
|
||||
#### Фактически выполненная нагрузка
|
||||
|
||||
Источник — `runs.csv` выбранной метки; RPS — медиана (min–max) трёх повторов.
|
||||
Лёгкие классы — read/write/me/chat, ожидаемые статусы 200/201. Все их ответы
|
||||
в чистом окне были успешными. `broken` намеренно возвращает 500 и в этот RPS не входит.
|
||||
Колонка «недослано» относится ко всем классам всего прогона.
|
||||
|
||||
| Вариант | Успешный RPS лёгких классов | Неожиданные ответы лёгких классов (сумма) | Недослано (сумма) |
|
||||
|---|---:|---:|---:|
|
||||
| `off` | 200.0 (200.0–200.0) | 0 | 0 |
|
||||
| `full` | 200.0 (200.0–200.0) | 0 | 0 |
|
||||
| `head` | 200.0 (200.0–200.0) | 0 | 0 |
|
||||
| `tail` | 200.0 (200.0–200.0) | 0 | 0 |
|
||||
| `balanced` | 200.0 (200.0–200.0) | 0 | 0 |
|
||||
|
||||
#### Задержки и CPU (чистое окно)
|
||||
|
||||
| Вариант | p50 лёгких, мс | p95, мс | p99, мс | CPU реплик, ядер | CPU на запрос, мс | к off | worker, ядер | телеметрия, ядер | пик Collector, МиБ | пик Tempo, МиБ | пик реплики, МиБ |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `off` | 3.60 (3.40–3.60) | 7.20 (7.00–7.30) | 8.90 (8.50–8.90) | 0.377 (0.371–0.379) | 1.805 (1.778–1.813) | +0% | 0.090 (0.089–0.090) | 0.000 (0.000–0.000) | — | — | 162 (162–162) |
|
||||
| `full` | 3.30 (3.30–3.40) | 7.00 (6.70–7.00) | 9.10 (8.50–9.10) | 0.413 (0.410–0.414) | 1.978 (1.963–1.982) | +10% | 0.089 (0.089–0.090) | 0.026 (0.026–0.026) | 71 (70–73) | 474 (464–487) | 168 (168–168) |
|
||||
| `head` | 3.40 (3.20–3.40) | 6.80 (6.30–6.80) | 8.40 (8.00–8.50) | 0.395 (0.389–0.399) | 1.891 (1.861–1.912) | +5% | 0.089 (0.089–0.089) | 0.016 (0.016–0.017) | 63 (62–64) | 318 (310–336) | 168 (167–168) |
|
||||
| `tail` | 3.40 (3.40–3.50) | 7.00 (6.80–7.10) | 8.90 (8.70–9.10) | 0.414 (0.414–0.415) | 1.983 (1.981–1.990) | +10% | 0.089 (0.089–0.090) | 0.018 (0.017–0.018) | 79 (78–82) | 311 (308–367) | 168 (167–168) |
|
||||
| `balanced` | 3.30 (3.00–3.30) | 6.80 (5.80–6.90) | 8.70 (7.20–9.10) | 0.411 (0.398–0.411) | 1.967 (1.907–1.967) | +9% | 0.089 (0.088–0.090) | 0.018 (0.017–0.018) | 79 (78–82) | 372 (354–378) | 168 (168–169) |
|
||||
|
||||
#### p95 по классам, мс (чистое окно; `write` — и окно отказов)
|
||||
|
||||
| Вариант | read | write | me | chat | download | upload | bad | broken | write (отказы) |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `off` | 7.5 | 8.0 | 3.5 | 5.4 | 9.3 | 22.0 | 11.7 | 6.7 | 110.0 |
|
||||
| `full` | 7.2 | 7.8 | 3.7 | 5.1 | 9.2 | 21.5 | 12.0 | 7.8 | 108.1 |
|
||||
| `head` | 7.0 | 7.6 | 3.3 | 5.2 | 9.0 | 22.8 | 12.5 | 6.8 | 105.3 |
|
||||
| `tail` | 7.2 | 7.9 | 3.5 | 5.1 | 9.5 | 22.0 | 11.7 | 6.7 | 113.9 |
|
||||
| `balanced` | 6.9 | 7.8 | 3.3 | 5.0 | 9.0 | 21.7 | 12.7 | 7.6 | 102.0 |
|
||||
|
||||
#### Приём (чистое окно) и пересчёт на сутки
|
||||
|
||||
| Вариант | span в Collector, /с | span в Tempo, /с | Tempo, КиБ/с | Tempo, ГиБ/сутки | строк Loki, /с | Loki, КиБ/с | Loki, ГиБ/сутки | точек метрик в Collector, /с | рядов Prometheus | отсчётов/с |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `full` | 575.2 (568.8–575.5) | 575.2 (568.8–575.5) | 107.6 (106.2–107.7) | 8.87 (8.75–8.87) | 241.7 (241.7–242.1) | 64.8 (64.6–65.0) | 5.34 (5.32–5.35) | 3.5 (3.5–3.5) | 3413 (3413–3759) | 227.4 (225.9–247.6) |
|
||||
| `head` | 57.2 (56.4–57.8) | 57.1 (56.7–58.2) | 11.0 (10.9–11.2) | 0.90 (0.90–0.92) | 240.4 (239.0–241.7) | 64.5 (63.9–64.6) | 5.31 (5.26–5.32) | 3.5 (3.5–3.5) | 3412 (3411–3584) | 224.5 (224.4–238.6) |
|
||||
| `tail` | 575.3 (575.3–575.3) | 59.7 (59.6–64.8) | 14.7 (14.6–15.9) | 1.21 (1.21–1.31) | 241.8 (239.2–241.9) | 64.7 (63.9–64.9) | 5.33 (5.27–5.35) | 3.5 (3.5–3.5) | 3820 (3645–3822) | 251.7 (239.8–251.8) |
|
||||
| `balanced` | 569.1 (568.5–572.2) | 29.5 (28.2–31.2) | 7.3 (7.0–7.7) | 0.60 (0.57–0.63) | 240.7 (240.4–241.6) | 64.6 (64.3–64.6) | 5.32 (5.29–5.32) | 1.7 (1.7–1.7) | 345 (344–691) | 22.7 (22.5–44.2) |
|
||||
|
||||
#### Что сохраняет вариант (сумма повторов) и потери
|
||||
|
||||
| Вариант | 500: трасс | медленные записи (≥ 250 мс на сервере) | из них 250–500 мс | failed: цепочек | загрузки: цепочек | `me`: трасс | записи журнала | запись → трасса (редкие) | потери Collector / до решения / SDK | Collector → Tempo, расхождение |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `full` | 84/84 | 99/99 | 68/68 | 42/42 | 210/210 | 180/180 | 100% | 225/225 | 0 / 0 / 0 | 0.00 % |
|
||||
| `head` | 13/84 | 9/97 | 5/66 | 4/42 | 27/210 | 21/180 | 100% | 26/223 | 0 / 0 / 0 | 0.00 % |
|
||||
| `tail` | 84/84 | 38/100 | 5/67 | 42/42 | 75/210 | 14/180 | 100% | 164/226 | 0 / 0 / 0 | 0.00 % |
|
||||
| `balanced` | 84/84 | 99/99 | 71/71 | 42/42 | 16/210 | 8/180 | 100% | 225/225 | 0 / 0 / 0 | 0.00 % |
|
||||
|
||||
#### Загрузки
|
||||
|
||||
| Вариант | ready | failed (`bad`) | время до ready p50 / p95, с |
|
||||
|---|---:|---:|---:|
|
||||
| `off` | 210 | 42 | 0.41 (0.40–0.44) / 0.64 (0.64–0.65) |
|
||||
| `full` | 210 | 42 | 0.39 (0.38–0.42) / 0.64 (0.63–0.65) |
|
||||
| `head` | 210 | 42 | 0.41 (0.37–0.41) / 0.64 (0.64–0.65) |
|
||||
| `tail` | 210 | 42 | 0.39 (0.37–0.42) / 0.64 (0.64–0.66) |
|
||||
| `balanced` | 210 | 42 | 0.39 (0.39–0.40) / 0.65 (0.64–0.65) |
|
||||
|
||||
#### Итоги гипотез и критериев
|
||||
|
||||
#### T1 — опровергнута
|
||||
|
||||
CPU реплик на запрос 1.805 → 1.978 мс (+10%, эффект: True); p99 лёгких 8.90 → 9.10 мс (эффект: False); p50 3.60 → 3.30 мс
|
||||
|
||||
Цена SDK в приложении обнаружена, но она ниже заданных +15 %. Прирост p99 не вышел за шум и не достиг +3 мс; p50 не вырос. Поэтому составная гипотеза опровергнута, хотя полная телеметрия требует дополнительного CPU.
|
||||
|
||||
#### T2 — подтверждена
|
||||
|
||||
надбавка head 50% надбавки full; span Tempo 9.9% full; трассы 500 13/84, медленных 9/97, цепочек failed 4/42 (интервал около 0,1: [True, True, True]); записи журнала 100%
|
||||
|
||||
Выбор в голове отбрасывает большинство трасс до их записи и экспорта в процессе приложения: надбавка CPU уменьшилась вдвое. Он заранее не знает исход запроса, поэтому теряет и ошибки, и медленные запросы, и неудачные задания. Наблюдаемые доли совместимы с вероятностью 0,1 по заданной проверке; журнал сохраняется полностью.
|
||||
|
||||
#### T3 — опровергнута
|
||||
|
||||
CPU реплик против full — эффект: False; span Tempo 10.4% full; пик Collector 70.6 → 79.4 МиБ; трассы 500 84/84, цепочки failed 42/42; медленные 250–500 мс 5/67, ≥ 500 мс 33/33
|
||||
|
||||
Типовой tail сократил приём Tempo и сохранил ошибки, но SDK по-прежнему создаёт и отправляет все span. Среди медленных записей 250–500 мс сохранились только 5 из 67. Гипотеза целиком опровергнута из-за памяти: медианный пик Collector вырос на 8,8 МиБ, меньше заранее заданных 10 МиБ. Качественные эффекты sampling при этом наблюдаются.
|
||||
|
||||
#### T4 — подтверждена
|
||||
|
||||
рядов 345 из 3413 (10%), отсчётов/с 22.7 из 227.4 (10%)
|
||||
|
||||
Более редкий экспорт, грубые границы histogram и отбор рядов хранилищ уменьшили и число рядов, и скорость поступления отсчётов до 10 % full. Это экономия метрик и их хранения; отдельная проверка S4 показывает, что CPU приложения остаётся близок к full.
|
||||
|
||||
#### T5 — подтверждена
|
||||
|
||||
запись → трасса у редких классов: full 225/225, head 26/223 (интервал около 0,1: True), balanced 225/225
|
||||
|
||||
Журнал экспортируется независимо от решения о трассе, а trace_id в записи остаётся и после её отбрасывания. Поэтому head даёт записи, из которых уже нельзя открыть трассу. У balanced проверенные редкие классы попадают под сохраняющие правила, и переход сработал для всех 225 записей.
|
||||
|
||||
#### T6 — подтверждена
|
||||
|
||||
потери Collector 0, отброшено до решения 0, строк SDK о потерях 0; Collector → Tempo наибольшее расхождение 0.00 %
|
||||
|
||||
В этой серии не обнаружены отказы Collector, отбрасывание до решения или предупреждения SDK о потерях. Число экспортированных Collector span согласуется с приёмом Tempo. Ожидаемый отбор sampling учтён отдельно; вывод ограничен данной нагрузкой и доступными счётчиками SDK.
|
||||
|
||||
#### T7 — подтверждена
|
||||
|
||||
CPU Tempo 0.012 против Loki + Prometheus 0.009 ядра; приём Tempo 107.6 против Loki 64.8 КиБ/с
|
||||
|
||||
В полном профиле Tempo потреблял больше CPU, чем Loki и Prometheus вместе, и принимал больше байт, чем Loki. Гипотеза подтверждена именно для этой нагрузки и длительности окна; стоимость хранилищ зависит от состава сигналов и настроек хранения.
|
||||
|
||||
#### S1 — выполнен
|
||||
|
||||
трассы 500 84/84, медленных записей 99/99, цепочки failed 42/42
|
||||
|
||||
Все три нужных класса сохранены за три повтора. Правила balanced учитывают статус ошибки, исход задания и длительность server span, поэтому сохраняются также неудачные задания без статуса ERROR и медленные записи короче типового порога 500 мс.
|
||||
|
||||
#### S2 — выполнен
|
||||
|
||||
span Tempo 29.5/с — 5.1% full, tail 59.7/с; рядов 10% full
|
||||
|
||||
Balanced сохраняет меньше span, чем типовой tail, и укладывается в предел 20 % full; метрики проходят предел 50 % рядов. Объём обычных трасс при этом ограничен: сохранены 16/210 цепочек обычных загрузок и 8/180 запросов me.
|
||||
|
||||
#### S3 — выполнен
|
||||
|
||||
потерь 0; пик Collector 82.1 МиБ (предел 154 из 256)
|
||||
|
||||
Максимальный, а не медианный, пик Collector составил 82,1 МиБ. Он ниже предела 154 МиБ; потерь и раннего отбрасывания нет. Буферизация до решения sampling вместилась в заданные 256 МиБ на этой интенсивности.
|
||||
|
||||
#### S4 — выполнен
|
||||
|
||||
CPU реплик на запрос 1.967 против full 1.978 мс (к off +9%); выше full с эффектом: False; Collector 0.005 против 0.005 ядра
|
||||
|
||||
CPU приложения у balanced близок к full, а надбавка к off остаётся +9 %. Tail-решение принимается после работы SDK, поэтому оно экономит хранилище и не снимает основную цену создания, сериализации и экспорта span. Дополнительная цена Collector укладывается в критерий.
|
||||
|
||||
#### S5 — выполнен
|
||||
|
||||
запись журнала → трасса у 500, медленных и failed: 225/225
|
||||
|
||||
Для всех записей проверенных редких классов трасса найдена по trace_id. Такая гарантия относится к классам, которые сохраняют правила; журнал обычного запроса может ссылаться на отброшенную трассу.
|
||||
|
||||
#### Рекомендация и границы применимости
|
||||
|
||||
Для стенда с приоритетом диагностики редких инцидентов и ограничения хранения рекомендую
|
||||
balanced: S1–S5 выполнены, Tempo принимает 29,5 span/с против 575,2 у full, Prometheus хранит
|
||||
345 рядов против 3413. Все проверенные 500, медленные записи и неудачные загрузки сохранены.
|
||||
Цена в приложении остаётся близкой к full: 1,967 против 1,978 мс CPU на запрос,
|
||||
надбавка к off — +9 %. Журнал почти не дешевеет: 64,6 против 64,8 КиБ/с у full.
|
||||
Рабочий Compose продолжает использовать full; исследование не переключает его автоматически.
|
||||
|
||||
Когда ограничивает CPU приложения, полезен head с проверенной долей 0,1: CPU на запрос
|
||||
1,891 мс, надбавка вдвое меньше full. Цена — потеря большинства редких трасс:
|
||||
13/84 ошибок 500, 9/97 медленных записей и 4/42 цепочек failed сохранились;
|
||||
из журнала удаётся открыть 26/223 редких трасс. Такой режим требует принять этот риск
|
||||
или отдельно обеспечить диагностику критических операций.
|
||||
|
||||
Full подходит для отладки и случаев, когда нужна полная история обычных запросов и заданий:
|
||||
сохранены 210/210 обычных загрузок и 180/180 me. Типовой tail сохраняет ошибки, но для
|
||||
данного запроса с порогом 250 мс слабее balanced: 38/100 медленных записей и 5/67 в диапазоне
|
||||
250–500 мс; CPU приложения близок к full. Balanced сохраняет 16/210 обычных загрузок и
|
||||
8/180 me: воспроизвести любой успешный запрос по одной записи журнала нельзя.
|
||||
|
||||
Ограничения: один Mac и одна интенсивность, генератор в той же Docker VM; PostgreSQL
|
||||
адаптирован до 1 CPU до начала измерений. Чистое окно 90 с, нагрузка одного запуска 140 с,
|
||||
всего три повтора; суточные объёмы являются пересчётом ingest, а не суточным хранением на диске.
|
||||
Проверенные классы и количество событий конечны, а не гарантия для всех будущих отказов.
|
||||
Длительная работа, более высокая нагрузка, другая машина и настройки retention требуют новых
|
||||
замеров. Начальные помехи host swap устранены перезапуском Docker и отражены в сохранённой
|
||||
прерванной метке; выводы сделаны по полной метке с нулевым приростом swap.
|
||||
|
||||
## Ответы на вопросы защиты
|
||||
|
||||
**Чем лог, метрика и трасса отвечают на разные вопросы об одном инциденте?** Метрика говорит,
|
||||
что что-то не так и насколько (доля 5xx 0,43, возраст очереди 129 с), но не про какой запрос.
|
||||
Трасса показывает, где именно ушло время у конкретного запроса или задания (долгий SQL-span,
|
||||
отсутствие consumer span). Лог с `trace_id` объясняет, что в этот момент решил код (исход,
|
||||
код ошибки); к нему идём от трассы. Порядок диагностики: метрика → трасса → лог.
|
||||
|
||||
**Почему `chat_id` в метках исчерпает хранилище?** Каждое значение метки — отдельный временной
|
||||
ряд, а у гистограммы ещё и по ряду на корзину. Чатов неограниченно много, число рядов растёт
|
||||
вместе с ними: память и индекс Prometheus, объём блоков и скорость запросов. Поэтому в метках
|
||||
только шаблон маршрута, класс ответа, тип и исход задания; идентификаторы живут в трассах и
|
||||
журнале, где запись — одна на событие.
|
||||
|
||||
**Как очередь переносит причинную связь?** Контекст идёт не через процесс, а через данные:
|
||||
`traceparent` записывается в строку задания в PostgreSQL, relay копирует его в заголовки AMQP
|
||||
(не в тело, схема сообщения не меняется), worker берёт его и открывает consumer span с родителем
|
||||
producer span. Повторная публикация использует сохранённый контекст, потому попытки лежат в
|
||||
одной трассе.
|
||||
|
||||
**Почему среднее не заменяет p99 и p99 реплик нельзя усреднять?** Среднее прячет хвост: 1 %
|
||||
медленных запросов почти не двигает его, а пользователи страдают именно от хвоста. Квантиль не
|
||||
аддитивен: среднее двух p99 не равно p99 объединённого потока (при разном трафике реплик оно
|
||||
может быть и ниже, и выше истинного). Правильно — суммировать bucket-счётчики реплик и только
|
||||
после этого вызывать `histogram_quantile`, как в запросах панелей.
|
||||
|
||||
## Ограничения и следующие шаги
|
||||
|
||||
TODO: какие отказы выдерживаются и какие нет; что не реализовано; где учебное упрощение; какое улучшение подтверждено, а какое пока гипотеза.
|
||||
Полный список — `KNOWN_ISSUES.md`. Главное:
|
||||
|
||||
- Потери SDK при недоступном Collector не считаются метрикой (в SDK 1.x нет счётчика); видны
|
||||
только потери на стороне Collector и строка `Failed to export` не чаще раза в минуту.
|
||||
- Снимок очереди делает relay: если он остановлен, ряды исчезают через 3 минуты и
|
||||
`MessengerQueueLagGrowing` перестаёт срабатывать. Нужен alert на `absent(...)`.
|
||||
- Ожидающие пула считаются только внутри `Db`; точного времени ожидания нет.
|
||||
- SLI ready/30 с условен по уже успешным вложениям, а не по всем принятым 202;
|
||||
для полного SLO успеха нужен учёт failed и просроченных незавершённых заданий.
|
||||
API SLI считает ответы реплик и не охватывает отказы до входа в приложение.
|
||||
- У Collector, Loki и Tempo нет healthcheck (в образах нет оболочки): `make up --wait` ждёт
|
||||
только `running`, живость видна по `up`.
|
||||
- Tempo на выбранной метке: максимальный пик 487 МиБ при лимите 768 МиБ, OOM/storage_down нет; более длительная нагрузка не проверялась.
|
||||
- Доставка alerts наружу не делалась (по заданию достаточно состояния firing/resolved); burn-rate
|
||||
alerts по нескольким окнам — задача трека 2, не реализованы.
|
||||
- Результаты трека 1 относятся к одной машине и нагрузке; CPU и задержки оценены по трём повторам с заранее заданным правилом шума.
|
||||
- Остаются ограничения лабы 5 (смесь версий при замене реплик, JPEG без DQT, шум aiormq и другое)
|
||||
— в `KNOWN_ISSUES.md`.
|
||||
|
||||
## Источники, библиотеки и использование ИИ
|
||||
|
||||
- Источники: [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/configuration/),
|
||||
[propagation](https://opentelemetry.io/docs/concepts/context-propagation/),
|
||||
[W3C Trace Context](https://www.w3.org/TR/trace-context/),
|
||||
[Prometheus histograms](https://prometheus.io/docs/practices/histograms/),
|
||||
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/),
|
||||
документация Loki/Tempo и материалы курса из `README.md`, `contracts/observability.md`.
|
||||
- Библиотеки: `opentelemetry-api`, `opentelemetry-sdk`, `opentelemetry-exporter-otlp-proto-http`
|
||||
(1.45.2), транзитивный `opentelemetry-semantic-conventions` 0.66b2 и прежние зависимости лабы 5 из `uv.lock`.
|
||||
Новые прямые зависимости — три пакета OpenTelemetry; их транзитивные зависимости
|
||||
также закреплены в `uv.lock` и `requirements.txt`. Образы — список в разделе запуска.
|
||||
- ИИ: Claude Code и Codex помогали писать код, конфиги, тесты и черновики текста; решения,
|
||||
числа и выводы проверены запуском команд, результаты в `evidence/` — реальный вывод,
|
||||
код после проверок не менялся.
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# Миграции alembic; правила — migrations/AGENTS.md.
|
||||
# URL подключения migrations/env.py собирает из тех же переменных DB_*,
|
||||
# что и приложение (src/config.py), поэтому sqlalchemy.url здесь нет.
|
||||
# Секций logging тоже нет: журнал идёт текстовым форматом src/log.py.
|
||||
|
||||
[alembic]
|
||||
script_location = %(here)s/migrations
|
||||
# имя ревизии: <номер>_<slug>.py, номер задаётся при создании (--rev-id)
|
||||
file_template = %%(rev)s_%%(slug)s
|
||||
truncate_slug_length = 40
|
||||
# импорт src из корня репозитория и из /app в образе
|
||||
prepend_sys_path = .
|
||||
path_separator = os
|
||||
+300
@@ -0,0 +1,300 @@
|
||||
# bench/ — нагрузочный стенд лаб 3–6
|
||||
|
||||
В лабе 6 стенд даёт результат трека 1 «Цена наблюдаемости»
|
||||
(`README.md`, «Оценка 5»): telemetry off/on и настройки sampling и
|
||||
aggregation при одной нагрузке — latency, CPU/RAM, объём ingest, потери
|
||||
span, что теряет выборка, проверка сбалансированной конфигурации —
|
||||
профиль `telemetry`.
|
||||
|
||||
Профиль лабы 5 (`queue`), лабы 4 (`uploads`, `reconcile`) и лабы 3
|
||||
(`failover`, `rollout`, серии `scaling`) сохранены и работают на коде
|
||||
лабы 6 с выключенной телеметрией (`OTEL_SDK_DISABLED=true` в `bench.env`,
|
||||
сервисы телеметрии не запускаются), но в лабе 6 не обязательны: их метки
|
||||
и числа остались в репозиториях прошлых лаб.
|
||||
|
||||
Порядок работы по шагам — `bench/RUNBOOK.md`. Здесь — правила, которые
|
||||
действуют на каждом шаге.
|
||||
|
||||
## Что есть
|
||||
|
||||
| Файл | Команда | Что делает |
|
||||
|---|---|---|
|
||||
| `run.py` | `make bench-telemetry`, `bench-telemetry-quick`; лаба 5 — `bench-queue`, `bench-queue-quick`; лаба 4 — `bench-uploads`, `bench-reconcile`, `*-quick`; лаба 3 — `bench-failover`, `bench-rollout`, `bench-scaling` | оркестратор: стенд, профили, файлы метки; у `queue` — поток шкалы (SELECT состояния заданий раз в секунду); у `telemetry` — проверка слоёв до стенда, телеметрия и процессы приложения на прогон, проверка применения варианта, окна и блокировки |
|
||||
| `telemetry.py` | `uv run python bench/telemetry.py --selftest` | профиль `telemetry` без docker: варианты (`VARIANTS`: окружение SDK, слой Collector, копия Prometheus) и override прогона, сверка копии Prometheus, план кругами, разбор журнала `mix`, окна, CPU по сэмплеру, приём и потери по снимкам, доли сохранённых трасс, строки `runs.csv` и `classes.csv`, вердикты T1–T7 и критерии S1–S5, сводка |
|
||||
| `lookup.py` | — (`docker exec` в `vlad-bench-gen`, подключённом к сети `vlad-bench_telemetry`) | только чтение хранилищ телеметрии по HTTP: `ready`, `snap` (собственные метрики Collector, Tempo, Loki, Prometheus — сумма по меткам; применён ли отбор рядов), `find` (запись доступа в Loki по `X-Request-Id` → её trace_id → трасса в Tempo, consumer span задания) |
|
||||
| `otel/` | — | слои вариантов профиля `telemetry`: `tail-typical.yaml`, `tail-balanced.yaml` — второй `--config` Collector (только pipeline трасс); `prometheus-lean.yml` — копия `infra/otel/prometheus/prometheus.yml` с блоками отбора рядов между `# >>> lean` и `# <<< lean`. **Правка `prometheus.yml` — та же правка копии**, иначе профиль — код 2 |
|
||||
| `common.py` | — | docker, стенд compose `vlad-bench` (с лабы 4 — S3, bootstrap, уборщик; с лабы 5 — брокер, relay, worker), паспорт, хост, бюджет, сэмплер `peak`, чтение файла cgroup через сэмплер |
|
||||
| `queue.py` | `uv run python bench/queue.py --selftest` | профиль `queue` без docker: план ячеек кругами, разбор журнала worker, журнала генератора и строк SQL, строки `cells.csv`, `timeline.csv`, `jobs.csv.gz`, вердикты Q1–Q5, рекомендация, сводка. Имя заслоняет stdlib `queue` внутри bench/: модули стенда его не импортируют |
|
||||
| `uploads.py` | `uv run python bench/uploads.py --selftest` | профиль `uploads` без docker: план кругами, разбор сэмплера `peak`, строка `runs.csv`, сводка, вердикты U1–U4 |
|
||||
| `reconcile.py` | `uv run python bench/reconcile.py --selftest` | профиль `reconcile` без docker: модель набора (id, содержимое и класс по номеру и зерну), строки `COPY`, план, разбор итога уборщика, сверка с моделью, окна фоновой нагрузки, вердикты H1–H5, сводка |
|
||||
| `fill_objects.py` | — (контейнер `vlad-bench-fill`) | PUT объектов набора мимо API: botocore образа стенда, ключи пользователя API из окружения контейнера |
|
||||
| `analysis.py` | `uv run python bench/analysis.py --selftest` | разбор без docker: журналы запросов, события Docker, журнал HAProxy, агрегаты сэмплера, признаки узкого места, поиск R* |
|
||||
| `loadgen.py` | — (`docker exec` в `vlad-bench-gen`) | генератор на stdlib: `setup`, `step`, `constant` (с лабы 4 — скачивания вложений и `--stop-file`), `retry`, `body` (PNG из шума; с лабы 5 — `--width`/`--height` и одноцветный `--flat`), `uploads` (закрытая модель загрузок, принято — 201 или 202), `queue` (лаба 5: открытая модель загрузок без повторов, `--count`, журнал с id принятых), `mix` (лаба 6: восемь классов по своим сеткам с известным счётом, свой `X-Request-Id` `<tag>-<класс>-<номер>` на запрос, строка журнала на запрос) |
|
||||
| `sampler.py` | — (контейнер `vlad-bench-sampler`) | `list`/`scan` — CPU и память cgroup раз в интервал (`scan` — и у `queue`: worker пересоздаётся на ячейку); `peak` (лаба 4) — сброс `memory.peak` своим дескриптором, выборки `current`/`anon`/`sock`/`oom_kill` раз в 0,2 с |
|
||||
| `compare.py`, `plots.py` | `make bench-compare`, `make bench-plots` | лаба 3: «до/после» серий и графики SVG |
|
||||
| `bench.compose.yml`, `bench.env` | — | override стенда: имена, лимиты `BENCH_*`, без портов и swap; S3 и уборщик с лимитами рабочего стенда; брокер (`BENCH_MQ_*`), relay (0,25 / 192 МБ), worker (`BENCH_WORKER_*`: лимиты, concurrency, prefetch, `RENDER_MEMORY_MB`); `UPLOAD_MAX_UNFINISHED` реплик — `BENCH_UPLOAD_MAX_UNFINISHED`, по умолчанию 0 (без предела); лаба 6 — Collector, Prometheus, Loki, Tempo (`vlad-bench-otel`, `-prom`, `-loki`, `-tempo`, `restart: "no"`, образы, конфигурации и лимиты основного файла), Grafana без порта и не запускается; `OTEL_SDK_DISABLED=true` в `bench.env` — профиль `telemetry` переопределяет окружением вызова compose |
|
||||
|
||||
Профили (поля — `TelemetryProfile`, `QueueProfile`, `UploadsProfile`,
|
||||
`ReconcileProfile` в `run.py`, целиком в `meta.json`):
|
||||
|
||||
| Профиль | Что | Время |
|
||||
|---|---|---|
|
||||
| `telemetry` | LB 0,5 / 256 МиБ, две реплики 1 CPU / 512 МиБ, PostgreSQL 1 / 768 МиБ, Valkey, S3, брокер, relay, worker 1 / 768 МиБ; в вариантах с телеметрией — сервисы телеметрии рабочего стенда, кроме памяти Tempo — 768 МиБ вместо 512 (override `bench.compose.yml`; пик 405 МиБ уже за 20 с быстрого профиля); сумма лимитов 9,75 CPU / 6,13 ГиБ (ВМ — не меньше 10 CPU / 7,7 ГиБ с запасом 1,5 ГиБ; PostgreSQL 2 → 1 CPU согласовано пользователем 16 ноября до замеров). Варианты `off`, `full`, `head`, `tail`, `balanced` × 3 повтора кругами; стенд новый на повтор, на прогон — телеметрия с пустыми volume и новые api, relay, worker. Окна: разогрев 20 с, чистое 90 с, отказы 30 с; нагрузка read 100, write 30, me 40, chat 30, download 8, upload 0,5, bad 0,1, broken 0,2 запроса/с (блокировка `messages` на 0,6 с в 5, 15, 25 с); затем пустая очередь и 15 с на решения выборки, поиск | ~50 мин |
|
||||
| `telemetry-quick` | все пять вариантов, один повтор, окна 5 + 20 + 12 с (блокировки в 3 и 8 с) | ~7 мин |
|
||||
| `queue` | LB, две реплики 1 CPU / 512 МБ, PostgreSQL, Valkey, S3, брокер 1 / 512 МБ, relay, один worker 2 CPU / 1536 МБ на все настройки, генератор 1 / 512 МБ; `UPLOAD_MAX_UNFINISHED=60`. Настройки c1p1, c2p2, c4p4, c2p32 (concurrency/prefetch) × классы `s` (шум 320 × 200), `l` (шум 1800 × 1800, ~9,7 МБ), `x` (один цвет 6000 × 6000) × 2 повтора, ячейки кругами; стенд новый на повтор, worker — на ячейку. Фазы ячейки: ёмкость (worker стоит, N = 50 / 40 / 20 тел — меньше предела, старт worker, ready/с), ровная 0,6 ёмкости 40 с, `fixed` — общая на класс интенсивность (s 2,5, l 0,8, x 0,5 загрузки/с) 40 с, перегрузка 2 ёмкости в окне `min(150 с, max(40 с, 1,5 × 60 / ёмкость))`, восстановление (до пустой очереди, затем 0,6 ёмкости 20 с) | ~1,5 ч (оценка по `queue-quick`: ~3–4,5 мин на ячейку, дольше всех `x` c1p1) |
|
||||
| `queue-quick` | c1p1 и c4p4 × `s` и `x`, один повтор, окно 15 с (с `l` вышло бы ~14 мин) | ~9 мин |
|
||||
| `uploads` | LB, одна реплика 1 CPU / 512 МБ без swap, S3 1 CPU / 512 МБ; варианты «с лимитом» (места по умолчанию: 4 + очередь 16) и «без лимита» (`UPLOAD_MAX_CONCURRENT=1000`, `UPLOAD_MAX_WAITING=0`) × тела ~1 и ~10 MiB × 1/10/20/40 клиентов × 3 повтора = 48 прогонов | ~45 мин |
|
||||
| `uploads-quick` | оба варианта, 10 MiB, 1/10/40 клиентов, один повтор, окно 10 с | ~5 мин |
|
||||
| `reconcile` | LB, две реплики, S3; этапы: A — 1 000 × 1 MiB (`batch`, `deep`, `deep-fast`); B — 10 000 × 4 KiB (`batch`, `head`, `deep`); C — тот же стенд +20 000 (`batch`, `head`); D — +70 000 (`batch` и четыре ячейки под фоновой нагрузкой); E — свежий, 10 000 согласованных + 1 000 строк без объекта (`batch`, `refuse`); 3 повтора кругами | ~45 мин |
|
||||
| `reconcile-quick` | 2 000 × 4 KiB (`batch`, `head`, `deep`, `load-stand`, `load-fast`) и 500 + 100 (`batch`, `refuse`), один повтор | ~6 мин |
|
||||
|
||||
Ячейки сверки (`reconcile.CELLS`): `batch` — выборка строк на страницу
|
||||
списка; `head` — выборка на объект и HEAD на строку; `deep` — SHA-256
|
||||
содержимого; `-fast` — уборщик 1 CPU вместо 0,25; `load-*` — проход под
|
||||
фоновой нагрузкой (скачивания 200/с, запись 50/с, чтение 50/с через LB):
|
||||
`load-stand` — предел скорости по умолчанию (`RECONCILE_RATE`, 2000
|
||||
объектов/с) и 0,25 CPU, `load-unlimited` — без предела, `load-fast` —
|
||||
без предела и 1 CPU, `load-fast-limited` — с пределом и 1 CPU; `refuse` —
|
||||
`--apply --max-changes 100` (быстрый — 10) при большем числе кандидатов.
|
||||
Все прочие ячейки — dry-run.
|
||||
|
||||
Стенд — свой проект compose `vlad-bench`: тот же `compose.yaml` с
|
||||
override `bench.compose.yml` и подстановками `bench.env`, а не `.env`
|
||||
рабочего стенда. Контейнеры: `vlad-bench-postgres`, `vlad-bench-valkey`,
|
||||
`vlad-bench-s3`, `vlad-bench-lb`, реплики `vlad-bench-api-N`, генератор
|
||||
`vlad-bench-gen`, сэмплер `vlad-bench-sampler`, загрузчик
|
||||
`vlad-bench-fill`, разовые проходы `vlad-bench-reconcile-<n>`; с лабы 5 —
|
||||
`vlad-bench-mq`, `vlad-bench-relay`, `vlad-bench-worker`; сеть
|
||||
`vlad-bench-net`, volume `vlad-bench_pgdata`, `vlad-bench_s3data`,
|
||||
`vlad-bench_rmqdata`. Генератор ходит только через LB
|
||||
(`http://haproxy:8080`).
|
||||
|
||||
Метрики профиля `queue` (часы ВМ Docker у всех источников):
|
||||
|
||||
- пропускная — ready/с фазы ёмкости: N тел ждут в брокере, отсчёт от
|
||||
строки `broker consuming` после старта worker до последнего `ready`
|
||||
(старт процесса — отдельно, `startup_s`);
|
||||
- время до ready — `attachment_jobs.updated_at − attachments.created_at`
|
||||
(SQL); queue lag — `waited` строки `attachment processed` журнала
|
||||
worker (приём → захват);
|
||||
- незавершённых — точный счёт по созданию и завершению заданий ячейки;
|
||||
шкала раз в секунду (`unfinished`, outbox, в брокере, `processing`,
|
||||
возраст старейшего) — для графика;
|
||||
- p95 фазы `fixed` — та же метрика при одной интенсивности на класс для
|
||||
всех настроек: по ней Q2 (задержка) и рекомендация; p95 фазы `steady`
|
||||
(0,6 своей ёмкости) — для Q5;
|
||||
- окно перегрузки — `min(150 с, max(окно, 1,5 × предел / ёмкость))`,
|
||||
факт — `window_s` строки `overload`;
|
||||
- 429 — доля за всё окно перегрузки и после первого отказа с
|
||||
`Retry-After: 5` (предел работы достигнут); Q4 проверяет вторую;
|
||||
- восстановление — от конца окна перегрузки до последнего `ready`;
|
||||
- пик worker — `memory.peak` cgroup контейнера в конце ячейки через
|
||||
сэмплер (контейнер новый на ячейку, перезапуск в фазе ёмкости заводит
|
||||
cgroup заново); пик рендера — наибольший `render_peak_kib`;
|
||||
- рекомендация на класс — наименьший p95 фазы `fixed` среди настроек с
|
||||
пиком worker ≤ 80 % лимита; p95 в пределах 10 % от лучшего равны, из
|
||||
них — меньший пик.
|
||||
|
||||
Метрики профиля `telemetry` (часы ВМ Docker у всех источников):
|
||||
|
||||
- задержки p50/p95/p99 — журнал `mix` генератора, от момента по
|
||||
расписанию; «лёгкие» — `read`, `write`, `me`, `chat` чистого окна;
|
||||
- CPU реплик на запрос — ядра обеих реплик за чистое окно (сэмплер
|
||||
`scan`, первый и последний тик окна) / все ответы окна; так же CPU
|
||||
worker, relay и каждого сервиса телеметрии; пик — `memory.peak`
|
||||
контейнера прогона (контейнеры новые на прогон);
|
||||
- приём — снимки `lookup.py snap` в начале и в конце чистого окна:
|
||||
span, записи журнала и точки метрик Collector, span/строки/байты Tempo и
|
||||
Loki, ряды головы и отсчёты Prometheus; ряда счётчика нет до первого
|
||||
события — это 0;
|
||||
- потери — снимок после нагрузки: отказ приёма, ошибки и переполнение
|
||||
очереди экспорта Collector, `dropped_too_early`; строки логгера
|
||||
`opentelemetry` уровня WARNING+ в журналах api, worker, relay (SDK
|
||||
своих потерь метрикой не считает); span Collector → Tempo за прогон;
|
||||
- что сохранено — `lookup.py find` по id: все 500 (`broken`), записи с
|
||||
задержкой клиента ≥ 200 мс (медленная — ≥ 250 мс на сервере по записи
|
||||
доступа в Loki), неудачные и обычные загрузки (трасса с consumer span),
|
||||
60 `me` чистого окна; доля «запись журнала → трасса» — у 500,
|
||||
медленных и `failed`;
|
||||
- вариант применён — строки старта api, worker, relay совпадают с
|
||||
`Variant.startup()`, у Collector есть ряды `tail_sampling` ровно у
|
||||
вариантов со слоем, у Prometheus отбор рядов ровно у `balanced`; иначе —
|
||||
отказ прогона.
|
||||
|
||||
Файлы меток:
|
||||
|
||||
- `evidence/telemetry-cost/<метка>/`: `summary.md` (задержки и CPU, p95 по
|
||||
классам, приём и пересчёт на сутки, что сохраняет вариант и потери,
|
||||
загрузки, вердикты T1–T7 и S1–S5), `runs.csv` (строка на прогон),
|
||||
`classes.csv` (прогон × окно × класс), `meta.json` (профиль, план,
|
||||
варианты с окружением, проверенные конфигурации с SHA-256, паспорт,
|
||||
тела, по прогону — окна, моменты блокировок, строки старта, `app_env`,
|
||||
длительности подготовки и прогона), `raw/` (`<прогон>-mix.csv.gz` —
|
||||
журнал генератора, `<прогон>-snaps.json`, `<прогон>-find.json` — id и
|
||||
trace_id синтетические, `sampler-r<N>.jsonl.gz`);
|
||||
- `evidence/queue/<метка>/`: `summary.md` (таблица на класс: настройки ×
|
||||
пропускная, p95 до ready, lag, доли 429, максимум незавершённых,
|
||||
восстановление, пики; вердикты Q1–Q5 и рекомендация), `cells.csv`
|
||||
(строка на ячейку × фазу), `timeline.csv` (раз в секунду: состояние
|
||||
заданий, CPU и память worker, ответы генератора), `jobs.csv.gz`
|
||||
(задание: фаза, приём, ready, попытка, `waited`, `took`), `meta.json`
|
||||
(профиль, план, тела с SHA-256, паспорт, `app_env` worker по
|
||||
настройкам, отметки фаз ячеек), `raw/` (итоги и журналы генератора по
|
||||
фазам, журнал worker ячейки, строки сэмплера повтора `.jsonl.gz`);
|
||||
|
||||
- `evidence/uploads/<метка>/`: `summary.md` (ячейки — медиана и min–max
|
||||
повторов, вердикты U1–U4), `runs.csv` (строка на прогон: память до
|
||||
окна, пик окна, пик старта, `anon`, `sock`, OOM, ответы по кодам,
|
||||
загрузок/с, p50/p95/p99, пики S3 и LB, пометки), `meta.json` (профиль,
|
||||
план, тела с SHA-256, паспорт стенда, `app_env` по вариантам), `raw/`
|
||||
(`<прогон>-gen.json` — итог генератора, `<прогон>-peak.jsonl` — строки
|
||||
сэмплера);
|
||||
- `evidence/reconcile/<метка>/`: `summary.md` (проходы, фоновая нагрузка,
|
||||
вердикты H1–H5), `passes.csv` (строка на проход: найдено по классам,
|
||||
стоимость — вызовы S3 по операциям, ключи списка, прочитанные байты,
|
||||
запросы к БД, длительность шагов, CPU и пик RSS уборщика, CPU S3,
|
||||
PostgreSQL и реплик за окно прохода), `windows.csv` (окно × вид
|
||||
запроса фоновой нагрузки), `meta.json` (план, модели наборов,
|
||||
наполнение), `raw/` (журнал каждого прохода, журнал запросов фоновой
|
||||
нагрузки `.csv.gz`).
|
||||
|
||||
Хеш кода `src_sha256` (по `src/` и `migrations/` **внутри образа**),
|
||||
версии пакетов и значения по умолчанию (`app_defaults`: пул, мест
|
||||
загрузок, сверки, `MALLOC_MMAP_THRESHOLD_`) — в паспорте метки. Образ
|
||||
метки `mtusi-messenger-vladimirceva:bench-<метка>` остаётся в docker;
|
||||
образы `quick-*` стенд удаляет.
|
||||
|
||||
## Методика не меняется между метками
|
||||
|
||||
Не меняются (поменял — новая методика, метки переснимаются, в
|
||||
`REPORT.md` — что и почему):
|
||||
|
||||
- **машина и сессия**: метки одного профиля — на одной машине, рабочий
|
||||
стенд остановлен (`make stop`), посторонних контейнеров нет;
|
||||
- **профиль** (`run.py`): лимиты (реплика 1 CPU / 512 МиБ без swap,
|
||||
PostgreSQL 2 / 1 ГиБ, Valkey 0,5 / 128 МиБ, HAProxy 1 / 256 МиБ, S3 1 /
|
||||
512 МиБ, уборщик 0,25 / 256 МиБ, генератор 2 / 1 ГиБ — у `queue` 1 /
|
||||
512 МиБ, сэмплер 0,25 / 256 МиБ, брокер 1 / 512 МиБ, relay 0,25 / 192
|
||||
МиБ, worker 2 / 1536 МиБ), тела и их зерно, клиенты, окна, наборы,
|
||||
классы и их доли (0,25 % на класс), этапы и ячейки, фоновая нагрузка,
|
||||
настройки worker, доли ёмкости, интенсивности `fixed`, правило окна
|
||||
перегрузки, предел незавершённых, повторы, зерно
|
||||
порядка. Новый параметр — поле профиля, а не константа в коде;
|
||||
- **хранилища, S3 и LB**: те же пины образов и аргументы, что у рабочего
|
||||
стенда (`compose.yaml`), тот же `haproxy.cfg`, `valkey.conf`,
|
||||
`infra/s3/bootstrap.sh`; bucket `bench` (`bench.env`);
|
||||
- **приложение**: значения по умолчанию `src/config.py`; окружение
|
||||
стенда — срок сессии, `UPLOAD_MAX_UNFINISHED` (0, у `queue` — поле
|
||||
профиля), у варианта «без лимита» — два `UPLOAD_*` (override
|
||||
`variant-unlimited.compose.yml` во временном каталоге), у проходов
|
||||
сверки — `CLEANER_GRACE=30`, у worker профиля `queue` —
|
||||
`WORKER_CONCURRENCY`, `WORKER_PREFETCH` ячейки и `RENDER_MEMORY_MB`;
|
||||
- **пороги вердиктов** (`U*` в `uploads.py`, `H*_` в `reconcile.py`,
|
||||
`Q*_` в `queue.py`, `T*_` и `S*_` в `telemetry.py`) записаны до замеров
|
||||
вместе с гипотезами в `REPORT.md`. Их изменение — смена методики, а не
|
||||
подгонка вывода;
|
||||
- **профиль `telemetry`**: варианты и их слои (`telemetry.VARIANTS`,
|
||||
`bench/otel/`), интенсивности классов, окна и блокировки, лимиты
|
||||
`TelemetryProfile`, сервисы телеметрии с конфигурациями рабочего стенда
|
||||
(`infra/otel/`). Правка `infra/otel/collector.yaml` или
|
||||
`prometheus.yml` меняет и `full`, и слои — новая метка.
|
||||
|
||||
## Честность результатов
|
||||
|
||||
- В `evidence/queue/<метка>/`, `evidence/uploads/<метка>/` и
|
||||
`evidence/reconcile/<метка>/` пишет только `run.py`. Руками эти файлы
|
||||
не править и не пересобирать.
|
||||
- Каталог метки не перезаписывается. Неудачная метка (`aborted`,
|
||||
предупреждения о хосте, пометки) не удаляется молча и не выдаётся за
|
||||
результат: сними новую метку и скажи пользователю, почему старая не
|
||||
годится. Удалять каталог метки — только с согласия пользователя.
|
||||
- Числа в `REPORT.md` переносятся из `summary.md` и `*.csv` как есть.
|
||||
- Гипотезы Q1–Q5 (U1–U4 и H1–H5 прошлой лабы) записываются в
|
||||
`REPORT.md` **до** замеров и после них не переписываются; итог —
|
||||
отдельным абзацем ниже. Опровергнутая гипотеза — тоже результат.
|
||||
- Проект подключён к Git; измеренный код называет `src_sha256` в паспорте.
|
||||
Коммиты и публикация — только по явной просьбе пользователя.
|
||||
|
||||
## Как устроен стенд (не ломать)
|
||||
|
||||
- Чёрный ящик: `run.py` не импортирует `src`; запросы к API — только
|
||||
генератор по HTTP через LB.
|
||||
- Исключения, только на стенде `vlad-bench`:
|
||||
- PostgreSQL стенда — `docker exec … psql` от пользователя контейнера,
|
||||
SQL через stdin: `VACUUM (ANALYZE)`, `CHECKPOINT`, число строк,
|
||||
ревизия; у профиля `reconcile` — ещё `COPY attachments FROM STDIN`
|
||||
(метаданные набора; схему не трогает, файла CSV нет — строки
|
||||
генерирует `reconcile.rows_csv`);
|
||||
- объекты набора `reconcile` — `fill_objects.py` в `vlad-bench-fill`
|
||||
(ключи S3 API передаются как `docker run -e <имя>`, значения в argv нет);
|
||||
- S3 профиля `uploads` — перед каждым прогоном удаляется вместе с
|
||||
volume и поднимается заново с bootstrap; к bucket оркестратор не
|
||||
обращается;
|
||||
- сэмплер `peak` — `--user 0`, cgroupfs на запись, без сети: запись
|
||||
`reset` в `memory.peak` своим дескриптором — управление счётчиком
|
||||
ядра, а не приложением;
|
||||
- проход сверки — процесс уборщика из образа (`docker compose run
|
||||
cleaner reconcile …`), результат — его итоговая строка `reconcile
|
||||
pass finished` (`raw/<проход>-cleaner.log`);
|
||||
- профиль `queue`: SELECT состояния `attachment_jobs` и вложений
|
||||
ячейки (без записи); worker пересоздаётся на ячейку (`docker compose
|
||||
up --no-deps --force-recreate worker` с `BENCH_WORKER_*`), в фазе
|
||||
ёмкости — `docker stop`/`docker start`; журнал worker (`docker
|
||||
logs`) — источник `waited`, `took`, `render_peak_kib` и начала
|
||||
потребления; `memory.peak` читает сэмплер `scan` (cgroupfs хоста).
|
||||
- Найденное каждым проходом сверяется с моделью набора
|
||||
(`reconcile.found_problems`): расхождение — отказ профиля с проходом,
|
||||
классом и обоими числами. Это проверка корректности сверки, а не
|
||||
пометка.
|
||||
- Все вызовы compose — с `-p vlad-bench`, обоими `-f` (у варианта —
|
||||
третьим) и `--env-file bench/bench.env`. Пароли хранилищ и брокера и
|
||||
девять секретов S3 (с лабы 5 — и ключи worker) — новые на прогон,
|
||||
никуда не пишутся; compose требует их и у профилей, которые S3 и
|
||||
брокер не запускают.
|
||||
- Пароли и токены пользователей стенда живут только в генераторе; в
|
||||
stdout, результаты и паспорт не попадают. В паспорт окружения реплик не
|
||||
попадают имена с `PASSWORD`, `SECRET`, `ACCESS_KEY`.
|
||||
- Все отметки времени — часы ВМ Docker: генератор, сэмплер, журнал
|
||||
уборщика (`src/log.py`, UTC с мс).
|
||||
- Только стандартная библиотека Python на хосте и в генераторе.
|
||||
- Один прогон за раз: блокировка `bench/.bench.lock`. Остатки
|
||||
оборванного прогона `run.py` сам не чистит, а выводит команды уборки.
|
||||
- Чужие контейнеры не останавливать и не удалять.
|
||||
- Столбцы `cells.csv`, `timeline.csv`, `jobs.csv.gz`, `runs.csv`,
|
||||
`passes.csv`, `windows.csv` не переименовывать и не удалять. Новая
|
||||
метрика — новый столбец в конце.
|
||||
|
||||
## Пометки и что с ними делать
|
||||
|
||||
| Где | Пометка | Значит | Действие |
|
||||
|---|---|---|---|
|
||||
| `meta.json` | `aborted` | прогон прерван | новая метка после разбора `app-tail.log` |
|
||||
| `meta.json` | `host_warnings` | батарея, давление на память, посторонние контейнеры, выгрузка страниц, сон | устранить и переснять |
|
||||
| `runs.csv` | `oom` | реплику завершило ядро по памяти | это результат варианта (ожидаем у «без лимита»), не сбой |
|
||||
| `runs.csv` | `peak_sampled` | `memory.peak` не сброшен (ядро < 6.12) | пик — по выборкам раз в 0,2 с: сказать в отчёте |
|
||||
| `runs.csv` | `host_swap` | хост выгружал страницы во время прогона | переснять метку |
|
||||
| `passes.csv` | `cpu_limit` | лимит CPU прохода не тот, что у ячейки | дефект стенда: разобраться, не переносить в отчёт |
|
||||
| `passes.csv` | `exit` | код уборщика не 3 | набор с расхождениями даёт 3: смотреть `raw/<проход>-cleaner.log` |
|
||||
| `passes.csv` | `bg_dropped` | генератор фоновой нагрузки не отправил часть запросов по расписанию | H4 по такой метке не подтверждается: сказать пользователю, переснять на тихом хосте |
|
||||
| профиль падает | `found differs from the model` | сверка нашла не то, что внесено | дефект сверки или стенда: остановиться, сказать пользователю |
|
||||
| `cells.csv` | `drain_rejected` | не все N тел фазы ёмкости получили 202 | пропускная по принятым; повторилось — разобрать `raw/<ячейка>-drain-gen.csv` |
|
||||
| `cells.csv` | `failed`, `missing` | принятая загрузка стала `failed` или не дошла до `ready` | Q5 опровергнута по ячейке: смотреть `raw/<ячейка>-worker.log` (OOM рендера, `error_code`) |
|
||||
| `cells.csv` | `5xx` | ответы 5xx в фазе | Q4 опровергнута: найти причину (`raw/<ячейка>-<фаза>-gen.csv`, X-Instance-Id), прежде чем переносить в отчёт |
|
||||
| `cells.csv` | `gen_dropped` | генератор не отправил часть загрузок по расписанию | интенсивность фазы не та: переснять на тихом хосте |
|
||||
| `runs.csv` (telemetry) | `gen_dropped` | генератор не отправил часть запросов `mix` | нагрузка не та: переснять на тихом хосте |
|
||||
| `runs.csv` (telemetry) | `errors` | у лёгких классов чистого окна ответ не тот (не 200/201) | разобрать `classes.csv` и `raw/<прогон>-mix.csv.gz` до переноса в отчёт |
|
||||
| `runs.csv` (telemetry) | `telemetry_loss` | потери Collector, отброшенное до решения или строки SDK о потерях | результат варианта (T6, S3), не переснимать |
|
||||
| профиль падает | `variant is not applied`, `variant layers are not applied` | процесс или Collector/Prometheus поднялись не с тем вариантом | дефект стенда: остановиться, сказать пользователю |
|
||||
|
||||
## Проверка правок стенда
|
||||
|
||||
`make fmt && make lint`; `uv run python bench/telemetry.py --selftest`,
|
||||
затем `make bench-telemetry-quick` (лаба 6); `uv run python bench/queue.py --selftest`,
|
||||
`uv run python bench/analysis.py --selftest`, `uv run python
|
||||
bench/uploads.py --selftest`, `uv run python bench/reconcile.py
|
||||
--selftest`; затем `make bench-queue-quick` (лаба 5), при правке общего —
|
||||
ещё `make bench-uploads-quick` и `make bench-reconcile-quick`: прогоны
|
||||
доходят до конца, `aborted` нет.
|
||||
Правка общего (`common.py`, `loadgen.py`, `sampler.py`) — ещё
|
||||
`make bench-failover-quick`. Docker недоступен из sandbox — попросить
|
||||
пользователя запустить команду и прислать вывод.
|
||||
@@ -0,0 +1,206 @@
|
||||
# Лаба 6: замеры трека 1 «Цена наблюдаемости» — порядок работы
|
||||
|
||||
Для того, кто снимает замеры на машине прогонов, — человека или Codex.
|
||||
Правила стенда — `bench/AGENTS.md`, общие — корневой `AGENTS.md`.
|
||||
Прочитать целиком до первого `make bench-*`.
|
||||
|
||||
**Цель — «5»** (`README.md`, «Оценка 5», трек 1): сравнить telemetry
|
||||
off/on и не меньше двух настроек sampling/aggregation при одинаковой
|
||||
нагрузке; latency, CPU/RAM, объём ingest, потери spans; какие ошибки и
|
||||
редкие медленные запросы теряются; предложить и проверить сбалансированную
|
||||
конфигурацию. Уровни 3 и 4, их проверки и `make failure-checks` готовы на
|
||||
машине разработки. Здесь — один профиль под нагрузкой, его итоги и отчёт.
|
||||
**Код приложения, профиль и пороги не меняются**: замер проверяет
|
||||
записанные гипотезы T1–T7 и критерии S1–S5 (`REPORT.md`, «Трек 1. Цена
|
||||
наблюдаемости»).
|
||||
|
||||
## Словарь
|
||||
|
||||
- **Метка** — один прогон профиля; каталог
|
||||
`evidence/telemetry-cost/<метка>/` не перезаписывается.
|
||||
- **Вариант** — что включено из телеметрии: `off` (SDK выключен, сервисов
|
||||
телеметрии нет), `full` (как рабочий стенд), `head` (доля трасс 0,1 в
|
||||
SDK), `tail` (типовой tail sampling в Collector), `balanced`
|
||||
(предлагаемая: свои правила tail sampling, метрики раз в 30 с, грубые
|
||||
границы histogram, меньше рядов Prometheus). Таблица — `REPORT.md` и
|
||||
`bench/telemetry.py` (`VARIANTS`), слои — `bench/otel/`.
|
||||
- **Прогон** — вариант × повтор. Стенд новый на повтор; сервисы
|
||||
телеметрии с пустыми volume и процессы api, relay, worker — новые на
|
||||
прогон.
|
||||
- **Окна** одного прогона: разогрев 20 с, чистое 90 с (по нему цена),
|
||||
отказы 30 с (три блокировки таблицы `messages` по 0,6 с — медленные
|
||||
записи).
|
||||
- **Редкие события** с известным счётом: `broken` — 500 на скачивании
|
||||
строки без объекта, `bad` — неудачная загрузка (`failed`), медленные
|
||||
записи (≥ 250 мс на сервере).
|
||||
|
||||
## Сколько это занимает
|
||||
|
||||
| Шаг | Что | Время |
|
||||
|---|---|---|
|
||||
| 0 | подготовка, проверки (`failure-checks` ~7 мин), самопроверка `bench-telemetry-quick` (~7 мин) | 30–40 мин |
|
||||
| 1 | `make bench-telemetry`: 15 прогонов по 2,5–3 мин + 3 стенда | ~50 мин + 30 мин отчёт |
|
||||
| 2 | финальные проверки | 20 мин |
|
||||
|
||||
Расчёт шага 1 — из самопроверки на машине разработки (16 ноября, метка
|
||||
`quick-telemetry-20261115T220924Z`, 6,8 мин; `meta.json` →
|
||||
`runs.*.prepare_s`, `run_s`). Подготовка прогона с телеметрией (сервисы
|
||||
телеметрии с пустыми volume, пересоздание api/relay/worker, строки старта)
|
||||
— 23–27 с, без телеметрии — 10 с; хвост после нагрузки (пустая очередь,
|
||||
ожидание решений выборки, поиск в Loki и Tempo, разбор) — ~15 с при
|
||||
ожидании 12 с, в полном профиле ожидание 15 с — ~21 с. Нагрузка полного
|
||||
профиля — 20 + 90 + 30 = 140 с. Прогон с телеметрией ≈ 24 + 140 + 21 =
|
||||
185 с, `off` ≈ 10 + 140 + 2 = 152 с; 12 × 185 + 3 × 152 = 2 676 с ≈ 45 мин.
|
||||
Плюс три подъёма стенда с данными (~26 с), две остановки между повторами
|
||||
(~20 с), проверка слоёв и сборка образа (на машине разработки из кэша
|
||||
— секунды, с нуля — 1–3 мин): **~47–50 мин**.
|
||||
|
||||
Шаг 1 — в одной сессии устройства, без перезагрузки и сна; устройством
|
||||
не пользоваться. Долгое — в фоне с журналом:
|
||||
|
||||
```sh
|
||||
nohup make bench-telemetry > /tmp/bench-telemetry.log 2>&1 &
|
||||
tail -n 20 /tmp/bench-telemetry.log # раз в несколько минут
|
||||
```
|
||||
|
||||
**Точки остановки.** После шагов 0 и 1 — короткий отчёт пользователю
|
||||
(что снято, пометки, главные числа) и ожидание «продолжай». Что-то не по
|
||||
плану (`aborted`, `host_warnings`, упавшие проверки) — остановиться сразу,
|
||||
не переснимать молча.
|
||||
|
||||
---
|
||||
|
||||
## Шаг 0. Подготовка
|
||||
|
||||
- [ ] Docker доступен (`docker version`; из sandbox — запуск вне него с
|
||||
одобрения пользователя). Ресурсы ВМ: `docker info --format
|
||||
'{{.NCPU}} CPU, {{.MemTotal}} bytes {{.KernelVersion}}'` — нужно **не
|
||||
меньше 10 CPU и 7,7 ГиБ** (лимиты профиля — 9,75 CPU и 6,13 ГиБ плюс
|
||||
запас 1,5 ГиБ проверки бюджета; Tempo — 768 МиБ вместо 512 рабочего
|
||||
стенда: пик 405 МиБ за 20 с быстрого профиля, полный идёт 140 с). Меньше — Settings → Resources Docker
|
||||
Desktop, перезапуск Docker; не помещается — сказать пользователю,
|
||||
лимиты профиля не уменьшать без согласования. До замеров 16 ноября пользователь
|
||||
согласовал PostgreSQL 2 → 1 CPU для машины с 10 CPU; остальные параметры сохранены,
|
||||
изменение методики записано в `REPORT.md`.
|
||||
- [ ] `make install`, `make lint`, самопроверки разбора:
|
||||
|
||||
```sh
|
||||
uv run python bench/telemetry.py --selftest
|
||||
uv run python bench/queue.py --selftest
|
||||
uv run python bench/analysis.py --selftest
|
||||
uv run python bench/uploads.py --selftest
|
||||
uv run python bench/reconcile.py --selftest
|
||||
```
|
||||
|
||||
- [ ] `make env` (если `.env` нет), `make up`, `make test`, `make
|
||||
telemetry-check` (PASS), `make test-isolated` (в `results` все 0),
|
||||
`make failure-checks` (все passed). Красное — разобраться (корневой
|
||||
`AGENTS.md`, раздел 9), замеры не начинать.
|
||||
- [ ] Рабочий стенд остановлен: `make stop`; `docker ps` — пусто, чужие
|
||||
контейнеры не трогать (если есть — спросить пользователя: они дают
|
||||
`host_warnings`).
|
||||
- [ ] Питание от сети, тяжёлые программы закрыты.
|
||||
- [ ] Самопроверка (~7 мин; метка `quick-telemetry-*` в отчёт не идёт):
|
||||
|
||||
```sh
|
||||
make bench-telemetry-quick
|
||||
```
|
||||
|
||||
В `summary.md` метки: нет `aborted`, пять вариантов с числами во
|
||||
всех таблицах, у вариантов с
|
||||
телеметрией строки «Что сохраняет вариант» не пусты (500 и `failed`
|
||||
есть), пометок `not_applied`, `layer`, `gen_dropped`, `errors` нет;
|
||||
загрузки: `ready` и `failed` у каждого варианта. Порядок чисел на
|
||||
машине разработки — в разделе «Ориентиры» ниже.
|
||||
- [ ] Гипотезы T1–T7 и критерии S1–S5 уже записаны в `REPORT.md` **до**
|
||||
замеров — не переписывать; итоги — отдельными абзацами.
|
||||
- [ ] Проект не под git: измеренный код называет `src_sha256` в
|
||||
паспорте метки. Если пользователь сделал git-репозиторий — коммит
|
||||
перед замером только с его согласия.
|
||||
|
||||
**Остановка:** отчёт пользователю — ресурсы ВМ, результаты проверок,
|
||||
числа самопроверки (p95/p99 лёгких и CPU на запрос по вариантам,
|
||||
сохранённые трассы 500 / медленных / `failed`).
|
||||
|
||||
## Шаг 1. Профиль `telemetry`
|
||||
|
||||
```sh
|
||||
nohup make bench-telemetry > /tmp/bench-telemetry.log 2>&1 &
|
||||
```
|
||||
|
||||
Метка `baseline` (`evidence/telemetry-cost/baseline/`).
|
||||
|
||||
Проверь `summary.md`:
|
||||
- [ ] `aborted` нет, раздел «Предупреждения о хосте» пуст (иначе — новая
|
||||
метка на тихом хосте, `TELEMETRY_LABEL=baseline2`);
|
||||
- [ ] 15 прогонов из 15: 5 вариантов × 3 повтора;
|
||||
- [ ] пометок `not_applied`, `layer`, `gen_dropped` нет (это отказ стенда,
|
||||
а не результат); `errors` у лёгких классов — разобрать по
|
||||
`classes.csv` и `raw/<прогон>-mix.csv.gz` до переноса в отчёт;
|
||||
- [ ] `telemetry_loss` — результат варианта (T6), не переснимать;
|
||||
- [ ] у `full` CPU реплики (ядер / 2) — 0,2–0,6 ядра на реплику: нагрузка
|
||||
ниже насыщения; иначе сказать пользователю.
|
||||
|
||||
В `REPORT.md`, раздел «Трек 1. Цена наблюдаемости», «Результаты» (строки
|
||||
`TODO (Codex)`):
|
||||
- метка, `src_sha256`, длительность, хост и Docker из `meta.json`;
|
||||
- таблицы из `summary.md` как есть, со ссылкой на метку;
|
||||
- итог каждой гипотезы T1–T7 и критерия S1–S5 — строка вердикта из
|
||||
`summary.md` с числами, затем абзац объяснения. Опора объяснения: SDK
|
||||
создаёт и экспортирует каждый span в процессе реплики (batch-процессор,
|
||||
сериализация protobuf, HTTP в Collector) — эта цена не зависит от
|
||||
решений Collector, её снимает только выбор в голове; tail sampling
|
||||
держит трассы в памяти Collector до решения; правило «трасса ≥ 500 мс»
|
||||
видит длину всей трассы, а не запроса; журнал не выбирается, поэтому
|
||||
`trace_id` в записи остаётся и при выброшенной трассе;
|
||||
- если `balanced` не прошёл — правило из `REPORT.md` («Если `balanced` не
|
||||
прошёл»): одна правка на нарушение и новая метка **только с согласия
|
||||
пользователя**; S4 не лечится — без пересъёмки;
|
||||
- рекомендация с условиями и ограничения метки (один хост, генератор в
|
||||
той же ВМ, одна интенсивность, прогон 140 с — сутки только пересчётом).
|
||||
|
||||
**Остановка:** отчёт пользователю — по вариантам p95/p99 лёгких, CPU
|
||||
реплик на запрос и надбавка к `off`, span Tempo/с, ряды Prometheus,
|
||||
сохранённые трассы редких событий, итоги T1–T7 и S1–S5.
|
||||
|
||||
## Шаг 2. Финальные проверки
|
||||
|
||||
- [ ] `REPORT.md`: в разделе трека 1 строк `TODO (Codex)` не осталось,
|
||||
гипотезы и пороги не переписаны.
|
||||
- [ ] Корневой `AGENTS.md`: абзац «Состояние» — что снято, где.
|
||||
- [ ] `make lint`, `make check`, `make test-isolated` — после правок.
|
||||
- [ ] Остановить всё своё: `docker ps -a | grep vlad-bench` — пусто;
|
||||
рабочий стенд — как был до тебя.
|
||||
- [ ] Отчёт пользователю (корневой `AGENTS.md`, раздел 11).
|
||||
|
||||
## Ориентиры (машина разработки, самопроверка)
|
||||
|
||||
Метка `quick-telemetry-20261115T220924Z` (ВМ 12 CPU / 11,6 ГиБ, один
|
||||
повтор, чистое окно 20 с — шума не видно, вердикты по эффекту — «нет
|
||||
данных»):
|
||||
|
||||
| Вариант | p50 / p95 / p99 лёгких, мс | CPU реплик на запрос, мс | span Tempo, /с | рядов Prometheus | 500 / медленные / `failed` сохранены |
|
||||
|---|---|---:|---:|---:|---|
|
||||
| `off` | 3,3 / 5,5 / 6,6 | 2,05 | — | — | — |
|
||||
| `full` | 3,3 / 5,7 / 9,1 | 2,35 (+15 %) | 575 | 3 371 | 8/8, 22/22, 4/4 |
|
||||
| `head` | 3,3 / 5,7 / 9,4 | 2,20 (+8 %) | 56 | 3 540 | 1/8, 1/27, 1/4 |
|
||||
| `tail` | 3,4 / 5,8 / 9,3 | 2,34 (+15 %) | 45 | 3 776 | 8/8, 10/25 (250–500 мс: 2/17), 4/4 |
|
||||
| `balanced` | 3,3 / 5,6 / 9,5 | 2,32 (+13 %) | 25 | 340 | 8/8, 26/26, 4/4 |
|
||||
|
||||
CPU реплики у `full` — ~0,25 ядра; потерь нет ни в одном варианте; все
|
||||
загрузки `ready`, все `bad` — `failed`. Порядок должен быть похожим;
|
||||
иное — не повод менять профиль, но повод сказать пользователю до шага 1.
|
||||
|
||||
## Если что-то пошло не так
|
||||
|
||||
| Симптом | Что делать |
|
||||
|---|---|
|
||||
| `leftovers of an interrupted bench run` | выполнить напечатанные команды уборки (только `vlad-bench*`) и повторить |
|
||||
| `another bench run holds bench/.bench.lock` | идёт другой прогон: дождаться |
|
||||
| `limits need N CPU, docker VM has M` | ресурсы ВМ (шаг 0); лимиты профиля не уменьшать |
|
||||
| код 2 до стенда: `collector layer … is invalid`, `… differs from prometheus.yml`, `promtool rejects` | слой или копия разошлись с `infra/otel/`: правка — забота разработчика, сказать пользователю |
|
||||
| `variant is not applied` | строка старта процесса не совпала с вариантом: `app-tail.log` метки, сказать пользователю |
|
||||
| `variant layers are not applied` | Collector или Prometheus поднялись без слоя варианта: `app-tail.log`, сказать пользователю |
|
||||
| `telemetry is not ready` | сервис телеметрии не поднялся за 90 с: `app-tail.log`; повтор один раз |
|
||||
| `aborted` | новая метка после разбора `app-tail.log` и `raw/` |
|
||||
| `host_warnings` | устранить причину и переснять под новым именем |
|
||||
@@ -0,0 +1,546 @@
|
||||
"""Разбор результатов стенда без docker: журналы, окна, признаки, поиск R*.
|
||||
|
||||
Чистые функции над строками журналов генератора, событиями Docker,
|
||||
журналом HAProxy и тиками сэмплера. Их зовёт `run.py`; самопроверка —
|
||||
`uv run python bench/analysis.py --selftest`. Только stdlib.
|
||||
|
||||
Все отметки времени — часы ВМ Docker в миллисекундах эпохи: генератор
|
||||
(`time.time()` в контейнере), события Docker (`timeNano`), журнал HAProxy
|
||||
(`docker logs -t`), сэмплер. Часы хоста с ними не сравниваются.
|
||||
"""
|
||||
|
||||
import dataclasses
|
||||
import datetime
|
||||
import json
|
||||
import math
|
||||
import re
|
||||
import sys
|
||||
|
||||
# --- журнал запросов генератора (профили failover и rollout) ----------------
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Request:
|
||||
scheduled: float
|
||||
sent: float | None
|
||||
done: float | None
|
||||
kind: str
|
||||
status: int
|
||||
instance: str
|
||||
key: str
|
||||
error: str
|
||||
|
||||
@property
|
||||
def ok(self) -> bool:
|
||||
return self.status == (201 if self.kind == "write" else 200)
|
||||
|
||||
@property
|
||||
def latency(self) -> float | None:
|
||||
"""Задержка от момента по расписанию до ответа, мс."""
|
||||
return None if self.done is None else self.done - self.scheduled
|
||||
|
||||
|
||||
def parse_requests(text: str) -> list[Request]:
|
||||
out = []
|
||||
for line in text.splitlines():
|
||||
parts = line.split(",")
|
||||
if len(parts) != 9 or parts[0] != "fo":
|
||||
continue
|
||||
out.append(
|
||||
Request(
|
||||
scheduled=float(parts[1]),
|
||||
sent=float(parts[2]) if parts[2] else None,
|
||||
done=float(parts[3]) if parts[3] else None,
|
||||
kind=parts[4],
|
||||
status=int(parts[5]),
|
||||
instance=parts[6],
|
||||
key=parts[7],
|
||||
error=parts[8],
|
||||
),
|
||||
)
|
||||
out.sort(key=lambda r: r.scheduled)
|
||||
return out
|
||||
|
||||
|
||||
def percentile(values: list[float], fraction: float) -> float | None:
|
||||
if not values:
|
||||
return None
|
||||
ordered = sorted(values)
|
||||
return ordered[max(1, math.ceil(fraction * len(ordered))) - 1]
|
||||
|
||||
|
||||
def error_label(request: Request) -> str:
|
||||
return request.error or str(request.status)
|
||||
|
||||
|
||||
def window_stats(requests: list[Request], start: float, end: float) -> dict:
|
||||
"""Запросы окна [start, end) по моменту расписания."""
|
||||
inside = [r for r in requests if start <= r.scheduled < end]
|
||||
seconds = max((end - start) / 1000, 1e-9)
|
||||
ok = [r for r in inside if r.ok]
|
||||
errors: dict[str, int] = {}
|
||||
for request in inside:
|
||||
if not request.ok:
|
||||
errors[error_label(request)] = errors.get(error_label(request), 0) + 1
|
||||
latencies = [r.latency for r in ok if r.latency is not None]
|
||||
return {
|
||||
"seconds": round(seconds, 2),
|
||||
"requests": len(inside),
|
||||
"ok": len(ok),
|
||||
"ok_rps": round(len(ok) / seconds, 1),
|
||||
"ok_write_rps": round(sum(r.kind == "write" for r in ok) / seconds, 1),
|
||||
"ok_read_rps": round(sum(r.kind == "read" for r in ok) / seconds, 1),
|
||||
"errors": sum(errors.values()),
|
||||
"error_kinds": errors,
|
||||
"p50_ms": _r(percentile(latencies, 0.5)),
|
||||
"p95_ms": _r(percentile(latencies, 0.95)),
|
||||
"p99_ms": _r(percentile(latencies, 0.99)),
|
||||
"max_ms": _r(max(latencies) if latencies else None),
|
||||
}
|
||||
|
||||
|
||||
def _r(value: float | None, digits: int = 1) -> float | None:
|
||||
return None if value is None else round(value, digits)
|
||||
|
||||
|
||||
def timeline(
|
||||
requests: list[Request],
|
||||
origin: float,
|
||||
start: float,
|
||||
end: float,
|
||||
groups: dict[str, set[str]] | None = None,
|
||||
) -> list[dict]:
|
||||
"""Посекундная шкала от `origin`: успешные по видам, ошибки, реплики.
|
||||
|
||||
`groups` — именованные наборы X-Instance-Id (цель и остальные, старые
|
||||
и новые): у каждого — число успешных ответов в секунду.
|
||||
"""
|
||||
first = math.floor((start - origin) / 1000)
|
||||
last = math.ceil((end - origin) / 1000)
|
||||
rows = []
|
||||
for second in range(first, last):
|
||||
lo, hi = origin + second * 1000, origin + (second + 1) * 1000
|
||||
inside = [r for r in requests if lo <= r.scheduled < hi]
|
||||
ok = [r for r in inside if r.ok]
|
||||
errors: dict[str, int] = {}
|
||||
for request in inside:
|
||||
if not request.ok:
|
||||
errors[error_label(request)] = errors.get(error_label(request), 0) + 1
|
||||
latencies = [r.latency for r in ok if r.latency is not None]
|
||||
row = {
|
||||
"second": second,
|
||||
"sent": len(inside),
|
||||
"ok_write": sum(r.kind == "write" for r in ok),
|
||||
"ok_read": sum(r.kind == "read" for r in ok),
|
||||
"errors": sum(errors.values()),
|
||||
"error_kinds": ";".join(f"{k}:{v}" for k, v in sorted(errors.items())),
|
||||
"p95_ms": _r(percentile(latencies, 0.95)),
|
||||
"max_ms": _r(max(latencies) if latencies else None),
|
||||
}
|
||||
for name, ids in (groups or {}).items():
|
||||
row[f"ok_{name}"] = sum(r.instance in ids for r in ok)
|
||||
rows.append(row)
|
||||
return rows
|
||||
|
||||
|
||||
def recovery_seconds(
|
||||
requests: list[Request],
|
||||
action: float,
|
||||
end: float,
|
||||
offered_per_s: float,
|
||||
) -> float | None:
|
||||
"""Время восстановления, с: от действия до начала первой секунды, после
|
||||
которой до `end` нет ни одной ошибки и успешных не меньше 90 % от
|
||||
поданной нагрузки в каждой секунде. None — не восстановилось."""
|
||||
rows = timeline(requests, action, action, end)
|
||||
good = [
|
||||
row["errors"] == 0 and row["ok_write"] + row["ok_read"] >= 0.9 * offered_per_s
|
||||
for row in rows
|
||||
]
|
||||
for index in range(len(good)):
|
||||
if all(good[index:]):
|
||||
return float(rows[index]["second"])
|
||||
return None
|
||||
|
||||
|
||||
# --- события Docker и журнал HAProxy ------------------------------------------------
|
||||
|
||||
|
||||
def parse_events(text: str) -> list[tuple[float, str, str]]:
|
||||
"""`docker events --format '{{json .}}'`: (мс, действие, id контейнера)."""
|
||||
events = []
|
||||
for line in text.splitlines():
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
data = json.loads(line)
|
||||
action = data.get("Action") or data.get("status") or ""
|
||||
actor = (data.get("Actor") or {}).get("ID") or data.get("id") or ""
|
||||
events.append((int(data["timeNano"]) / 1e6, action.split(":")[0], actor))
|
||||
events.sort()
|
||||
return events
|
||||
|
||||
|
||||
_LB_STATE = re.compile(
|
||||
r"Server api/(?P<slot>api-\d+)\b.*?(?P<state>is DOWN|is UP|is going DOWN"
|
||||
r"|enters drain|enters maintenance|is leaving forced drain|is leaving maintenance"
|
||||
r"|administratively READY)",
|
||||
)
|
||||
|
||||
|
||||
def parse_docker_time(stamp: str) -> float:
|
||||
"""RFC 3339 с наносекундами из `docker logs -t` → мс эпохи."""
|
||||
stamp = stamp.rstrip("Z")
|
||||
main, _, fraction = stamp.partition(".")
|
||||
base = datetime.datetime.fromisoformat(main).replace(tzinfo=datetime.UTC)
|
||||
return base.timestamp() * 1000 + float(f"0.{fraction or 0}") * 1000
|
||||
|
||||
|
||||
def parse_lb_log(text: str) -> list[tuple[float, str, str]]:
|
||||
"""Смены состояния слотов: (мс, слот, состояние). Дубли строк HAProxy
|
||||
(мастер и воркер пишут одну и ту же) схлопываются."""
|
||||
seen = set()
|
||||
out = []
|
||||
for line in text.splitlines():
|
||||
stamp, _, message = line.partition(" ")
|
||||
match = _LB_STATE.search(message)
|
||||
if not match:
|
||||
continue
|
||||
when = parse_docker_time(stamp)
|
||||
item = (round(when / 50), match.group("slot"), match.group("state"))
|
||||
if item in seen:
|
||||
continue
|
||||
seen.add(item)
|
||||
out.append((when, match.group("slot"), match.group("state")))
|
||||
out.sort()
|
||||
return out
|
||||
|
||||
|
||||
def lb_http_errors(text: str) -> dict[str, int]:
|
||||
"""Ответы с ошибкой в журнале HAProxy (option dontlog-normal пишет
|
||||
только их): статус → число."""
|
||||
counts: dict[str, int] = {}
|
||||
for line in text.splitlines():
|
||||
match = re.search(r'\s(\d{3}) \d+ - - (\S{4}) .*"(GET|POST) ', line)
|
||||
if match and match.group(1)[0] in "45":
|
||||
counts[match.group(1)] = counts.get(match.group(1), 0) + 1
|
||||
return counts
|
||||
|
||||
|
||||
# --- сэмплер ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
def window_ticks(ticks: list[dict], start: float, end: float) -> list[dict]:
|
||||
"""Тики окна [start, end] (секунды эпохи) плюс по одному снаружи:
|
||||
приращения считаются по краям окна."""
|
||||
inside = [t for t in ticks if start <= t["ts"] <= end]
|
||||
before = [t for t in ticks if t["ts"] < start]
|
||||
after = [t for t in ticks if t["ts"] > end]
|
||||
return ([before[-1]] if before else []) + inside + ([after[0]] if after else [])
|
||||
|
||||
|
||||
def cgroup_usage(ticks: list[dict], container: str) -> dict | None:
|
||||
"""CPU (ядер), доля троттлинга и память контейнера по тикам окна.
|
||||
|
||||
Каждый соседний интервал считается отдельно: новая cgroup (контейнер
|
||||
перезапущен) даёт отрицательное приращение — такой интервал
|
||||
пропускается, а не обнуляет окно.
|
||||
"""
|
||||
points = [(t["ts"], t["cg"].get(container[:12])) for t in ticks]
|
||||
points = [(ts, line) for ts, line in points if line]
|
||||
if len(points) < 2:
|
||||
return None
|
||||
cpu_us = seconds = periods = throttled = 0.0
|
||||
memory = 0
|
||||
for (t0, a), (t1, b) in zip(points, points[1:], strict=False):
|
||||
if b[0] < a[0]:
|
||||
continue
|
||||
cpu_us += b[0] - a[0]
|
||||
seconds += t1 - t0
|
||||
periods += b[1] - a[1]
|
||||
throttled += b[2] - a[2]
|
||||
memory = max(memory, a[4], b[4])
|
||||
if seconds <= 0:
|
||||
return None
|
||||
return {
|
||||
"cpu_cores": round(cpu_us / seconds / 1e6, 3),
|
||||
"throttled_share": round(throttled / periods, 4) if periods else 0.0,
|
||||
"memory_mib": round(memory / 2**20, 1),
|
||||
}
|
||||
|
||||
|
||||
def vm_busy(ticks: list[dict]) -> float | None:
|
||||
if len(ticks) < 2:
|
||||
return None
|
||||
busy = ticks[-1]["vm"][0] - ticks[0]["vm"][0]
|
||||
total = ticks[-1]["vm"][1] - ticks[0]["vm"][1]
|
||||
return round(busy / total, 4) if total else None
|
||||
|
||||
|
||||
def lb_delta(ticks: list[dict], field: str) -> int | None:
|
||||
"""Приращение счётчика HAProxy по всем слотам за окно."""
|
||||
with_lb = [t for t in ticks if t.get("lb")]
|
||||
if len(with_lb) < 2:
|
||||
return None
|
||||
|
||||
def total(tick: dict) -> int:
|
||||
return sum(
|
||||
row.get(field, 0) for name, row in tick["lb"].items() if name != "FRONTEND"
|
||||
)
|
||||
|
||||
return total(with_lb[-1]) - total(with_lb[0])
|
||||
|
||||
|
||||
def pg_stats(ticks: list[dict], replica_addrs: set[str]) -> dict:
|
||||
"""Соединения приложения и счётчики базы за окно."""
|
||||
with_pg = [t for t in ticks if t.get("pg")]
|
||||
if not with_pg:
|
||||
return {}
|
||||
per_tick_total, per_replica_max, active, lock_waits = [], 0, [], []
|
||||
for tick in with_pg:
|
||||
by_addr: dict[str, int] = {}
|
||||
busy = waiting = 0
|
||||
for addr, state, wait, count in tick["pg"]["conn"]:
|
||||
by_addr[addr] = by_addr.get(addr, 0) + count
|
||||
if state == "active":
|
||||
busy += count
|
||||
if wait == "Lock":
|
||||
waiting += count
|
||||
per_tick_total.append(sum(by_addr.values()))
|
||||
known = [
|
||||
n for a, n in by_addr.items() if not replica_addrs or a in replica_addrs
|
||||
]
|
||||
per_replica_max = max([per_replica_max, *known])
|
||||
active.append(busy)
|
||||
lock_waits.append(waiting)
|
||||
first, last = with_pg[0]["pg"]["db"], with_pg[-1]["pg"]["db"]
|
||||
seconds = max(with_pg[-1]["ts"] - with_pg[0]["ts"], 1e-9)
|
||||
return {
|
||||
"pg_conn_max": max(per_tick_total),
|
||||
"pg_conn_replica_max": per_replica_max,
|
||||
"pg_active_mean": round(sum(active) / len(active), 2),
|
||||
"pg_lock_wait_mean": round(sum(lock_waits) / len(lock_waits), 2),
|
||||
"pg_new_sessions": last["sessions"] - first["sessions"],
|
||||
"pg_commits_per_s": round(
|
||||
(last["xact_commit"] - first["xact_commit"]) / seconds, 1
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
# --- признаки узкого места (серии трека 1) ------------------------------------------
|
||||
|
||||
# Пороги заданы до прогонов (REPORT.md, гипотезы трека 1). Сработавший
|
||||
# признак на первой нарушившей ступени называет, во что упёрлась система
|
||||
THRESHOLDS = {
|
||||
# реплика: доля своего лимита CPU или заметный троттлинг CFS
|
||||
"app_cpu_share": 0.85,
|
||||
"app_throttled_share": 0.20,
|
||||
# PostgreSQL: доля лимита CPU, средние ожидания блокировок
|
||||
"db_cpu_share": 0.85,
|
||||
"db_lock_wait_mean": 1.0,
|
||||
# пул: соединений одной реплики не меньше доли её предела (размер + переполнение)
|
||||
"pool_share": 0.90,
|
||||
# переоткрытие соединений: новых сессий PostgreSQL за окно ступени
|
||||
"churn_sessions": 20,
|
||||
# LB: доля его лимита CPU
|
||||
"lb_cpu_share": 0.85,
|
||||
# ВМ Docker занята почти целиком: реплики ждут CPU хоста
|
||||
"host_busy_share": 0.90,
|
||||
# генератор: доля лимита CPU или отставание от расписания
|
||||
"gen_cpu_share": 0.90,
|
||||
"gen_lag_p99_ms": 50.0,
|
||||
}
|
||||
|
||||
|
||||
def signals(row: dict, limits: dict, pool_cap: int) -> list[str]:
|
||||
"""Признаки узкого места ступени по агрегатам `row` (см. run.py)."""
|
||||
found = []
|
||||
if (row.get("api_cpu_max") or 0) >= THRESHOLDS["app_cpu_share"] * limits[
|
||||
"api_cpus"
|
||||
] or (row.get("api_throttled_max") or 0) >= THRESHOLDS["app_throttled_share"]:
|
||||
found.append("app")
|
||||
if (row.get("db_cpu_cores") or 0) >= THRESHOLDS["db_cpu_share"] * limits["db_cpus"]:
|
||||
found.append("db_cpu")
|
||||
if (row.get("pg_lock_wait_mean") or 0) >= THRESHOLDS["db_lock_wait_mean"]:
|
||||
found.append("db_lock")
|
||||
if (
|
||||
pool_cap
|
||||
and (row.get("pg_conn_replica_max") or 0) >= THRESHOLDS["pool_share"] * pool_cap
|
||||
):
|
||||
found.append("pool")
|
||||
if (row.get("pg_new_sessions") or 0) >= THRESHOLDS["churn_sessions"]:
|
||||
found.append("churn")
|
||||
if (row.get("lb_cpu_cores") or 0) >= THRESHOLDS["lb_cpu_share"] * limits["lb_cpus"]:
|
||||
found.append("lb")
|
||||
if (row.get("vm_busy_share") or 0) >= THRESHOLDS["host_busy_share"]:
|
||||
found.append("host")
|
||||
if (
|
||||
(row.get("gen_cpu_cores") or 0)
|
||||
>= THRESHOLDS["gen_cpu_share"] * limits["gen_cpus"]
|
||||
or (row.get("lag_p99_ms") or 0) >= THRESHOLDS["gen_lag_p99_ms"]
|
||||
or (row.get("dropped") or 0) > 0
|
||||
):
|
||||
found.append("generator")
|
||||
return found
|
||||
|
||||
|
||||
# --- поиск R* ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class Search:
|
||||
"""Автомат поиска R*: наибольшей интенсивности, на которой ступень
|
||||
выдерживает SLO.
|
||||
|
||||
Сначала фиксированные уровни (сравнение конфигураций на одной
|
||||
нагрузке), затем лестница `base × factor^i`: начало — первая ступенька
|
||||
не ниже `start`, подъём до первой нарушившей (если нарушена первая —
|
||||
спуск до первой прошедшей), затем `bisections` делений интервала
|
||||
«прошла — нарушила» по среднему геометрическому, с округлением до
|
||||
целого. R* — наибольшая прошедшая ступень поиска.
|
||||
"""
|
||||
|
||||
fixed: tuple[float, ...]
|
||||
base: float
|
||||
factor: float
|
||||
start: float
|
||||
bisections: int
|
||||
cap: float
|
||||
floor: float = 25.0
|
||||
results: list[tuple[float, bool, str]] = dataclasses.field(default_factory=list)
|
||||
|
||||
def ladder(self, rate: float) -> float:
|
||||
steps = math.ceil(math.log(rate / self.base, self.factor) - 1e-9)
|
||||
return round(self.base * self.factor ** max(steps, 0))
|
||||
|
||||
def record(self, rate: float, passed: bool, phase: str) -> None:
|
||||
self.results.append((rate, passed, phase))
|
||||
|
||||
def next_rate(self) -> tuple[float, str] | None:
|
||||
done_fixed = [r for r in self.results if r[2] == "fixed"]
|
||||
if len(done_fixed) < len(self.fixed):
|
||||
return self.fixed[len(done_fixed)], "fixed"
|
||||
search = [r for r in self.results if r[2] != "fixed"]
|
||||
passed = [rate for rate, ok, _ in search if ok]
|
||||
failed = [rate for rate, ok, _ in search if not ok]
|
||||
if not search:
|
||||
fixed_pass = [rate for rate, ok, _ in done_fixed if ok]
|
||||
start = max([self.start, *fixed_pass])
|
||||
return min(self.ladder(start), self.cap), "ladder"
|
||||
phase = search[-1][2]
|
||||
if phase == "ladder":
|
||||
last_rate, last_ok, _ = search[-1]
|
||||
if last_ok and not failed:
|
||||
if last_rate >= self.cap:
|
||||
return None
|
||||
return min(round(last_rate * self.factor), self.cap), "ladder"
|
||||
if not last_ok and not passed:
|
||||
lower = round(last_rate / self.factor)
|
||||
return (lower, "ladder") if lower >= self.floor else None
|
||||
# интервал найден: деления
|
||||
if not passed or not failed:
|
||||
return None
|
||||
bisections = sum(1 for r in search if r[2] == "bisect")
|
||||
if bisections >= self.bisections:
|
||||
return None
|
||||
lo = max(passed)
|
||||
hi = (
|
||||
min(rate for rate in failed if rate > lo)
|
||||
if any(r > lo for r in failed)
|
||||
else None
|
||||
)
|
||||
if hi is None:
|
||||
return None
|
||||
middle = round(math.sqrt(lo * hi))
|
||||
if middle <= lo or middle >= hi:
|
||||
return None
|
||||
return middle, "bisect"
|
||||
|
||||
def r_star(self) -> float | None:
|
||||
passed = [rate for rate, ok, phase in self.results if ok and phase != "fixed"]
|
||||
return max(passed) if passed else None
|
||||
|
||||
def first_fail(self) -> float | None:
|
||||
r_star = self.r_star() or 0
|
||||
failed = [
|
||||
rate for rate, ok, phase in self.results if not ok and phase != "fixed"
|
||||
]
|
||||
above = [rate for rate in failed if rate > r_star]
|
||||
return min(above) if above else None
|
||||
|
||||
|
||||
# --- --selftest: разбор на синтетических данных ---------------------------------------
|
||||
|
||||
|
||||
def _selftest() -> None:
|
||||
# поиск: подъём, нарушение, два деления
|
||||
search = Search(
|
||||
fixed=(250, 500), base=100, factor=1.25, start=600, bisections=2, cap=8000
|
||||
)
|
||||
capacity = 1000
|
||||
plan = []
|
||||
while (step := search.next_rate()) is not None:
|
||||
rate, phase = step
|
||||
plan.append((rate, phase))
|
||||
search.record(rate, rate <= capacity, phase)
|
||||
assert plan[:2] == [(250, "fixed"), (500, "fixed")], plan
|
||||
# лестница 100 × 1,25^i: первая ступенька не ниже 600 — 745
|
||||
assert plan[2] == (745, "ladder"), plan
|
||||
assert search.r_star() is not None, plan
|
||||
assert search.r_star() <= capacity, plan
|
||||
assert search.first_fail() > capacity, plan
|
||||
assert sum(phase == "bisect" for _, phase in plan) == 2, plan
|
||||
# первая ступень поиска нарушена — спуск
|
||||
search = Search(fixed=(), base=100, factor=1.25, start=300, bisections=1, cap=8000)
|
||||
plan = []
|
||||
while (step := search.next_rate()) is not None:
|
||||
plan.append(step)
|
||||
search.record(step[0], step[0] <= 200, step[1])
|
||||
assert plan[0] == (305, "ladder"), plan
|
||||
assert plan[1] == (244, "ladder"), plan
|
||||
assert search.r_star() <= 200, plan
|
||||
|
||||
# окно и время восстановления
|
||||
reqs = [
|
||||
Request(
|
||||
1000 + i * 10, 1000 + i * 10, 1005 + i * 10, "write", 201, "a", f"k{i}", ""
|
||||
)
|
||||
for i in range(500)
|
||||
]
|
||||
reqs[200] = dataclasses.replace(reqs[200], status=502)
|
||||
stats = window_stats(reqs, 1000, 6000)
|
||||
assert stats["errors"] == 1, stats
|
||||
assert stats["ok"] == 499, stats
|
||||
assert recovery_seconds(reqs, 1000, 6000, 100) == 3.0
|
||||
rows = timeline(reqs, 1000, 1000, 6000, {"a": {"a"}})
|
||||
assert rows[2]["errors"] == 1, rows[:3]
|
||||
assert rows[0]["ok_a"] == 100, rows[:3]
|
||||
|
||||
# сэмплер: приращения, перезапуск контейнера
|
||||
ticks = [
|
||||
{"ts": 0.0, "cg": {"abc": [0, 0, 0, 0, 100]}, "vm": [0, 100]},
|
||||
{"ts": 1.0, "cg": {"abc": [500_000, 10, 1, 0, 200]}, "vm": [50, 200]},
|
||||
{"ts": 2.0, "cg": {"abc": [100_000, 2, 0, 0, 50]}, "vm": [60, 300]},
|
||||
{"ts": 3.0, "cg": {"abc": [600_000, 12, 0, 0, 80]}, "vm": [160, 400]},
|
||||
]
|
||||
usage = cgroup_usage(ticks, "abc")
|
||||
assert usage["cpu_cores"] == 0.5, usage
|
||||
assert vm_busy(ticks) == 0.5333, vm_busy(ticks)
|
||||
|
||||
# журнал LB: дубли схлопываются
|
||||
log = (
|
||||
"2026-10-14T10:00:00.100000000Z Server api/api-1 is DOWN, reason: x\n"
|
||||
"2026-10-14T10:00:00.101000000Z [WARNING] (8) : Server api/api-1 is DOWN, reason: x\n"
|
||||
"2026-10-14T10:00:03.000000000Z Server api/api-1 is UP, reason: y\n"
|
||||
)
|
||||
parsed = parse_lb_log(log)
|
||||
assert [p[2] for p in parsed] == ["is DOWN", "is UP"], parsed
|
||||
print("analysis selftest: ok")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if sys.argv[1:] == ["--selftest"]:
|
||||
_selftest()
|
||||
else:
|
||||
print("usage: python bench/analysis.py --selftest", file=sys.stderr)
|
||||
sys.exit(2)
|
||||
@@ -0,0 +1,188 @@
|
||||
# Override нагрузочного стенда (bench/run.py): тот же compose.yaml под
|
||||
# проектом vlad-bench, со своими volume, сетью, именами и лимитами. Пины
|
||||
# хранилищ и LB, healthcheck хранилищ, valkey.conf, haproxy.cfg и
|
||||
# миграции — из основного файла. Подстановки — bench/bench.env, а не .env
|
||||
# рабочего стенда; пароли, образ и BENCH_* передаёт run.py (поля профиля),
|
||||
# без них стенд не поднимается. Что не меняется между метками —
|
||||
# bench/AGENTS.md.
|
||||
#
|
||||
# Лимиты — в той же форме deploy.resources.limits, что у основного файла:
|
||||
# cpus / mem_limit рядом с ними compose не принимает. Swap выключен
|
||||
# (memswap_limit = memory). Портов на хост нет: генератор и сэмплер ходят
|
||||
# внутри сети vlad-bench-net.
|
||||
#
|
||||
# S3, s3-bootstrap и уборщик (лаба 4) запускают только профили uploads и
|
||||
# reconcile: остальные поднимают сервисы списком и реплики с --no-deps, их
|
||||
# методика не меняется. Секреты S3 compose требует при разборе файла (:?),
|
||||
# поэтому run.py генерирует их на каждый прогон любого профиля.
|
||||
#
|
||||
# Лаба 5: брокер, relay и worker поднимает только профиль queue. Пароль
|
||||
# брокера, ключи worker в S3 и BENCH_MQ_*, BENCH_WORKER_* run.py тоже
|
||||
# передаёт всем профилям: файл разбирается целиком. Предел незавершённых
|
||||
# заданий у реплик по умолчанию снят (0): профили лабы 4 мерят загрузку,
|
||||
# а не очередь.
|
||||
services:
|
||||
postgres:
|
||||
container_name: vlad-bench-postgres
|
||||
# без автоперезапуска: если база упадёт, run.py поставит прогону stand_down
|
||||
restart: "no"
|
||||
command: ["postgres", "-c", "max_connections=${BENCH_DB_MAX_CONNECTIONS:?run make bench-*}"]
|
||||
ports: !reset []
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${BENCH_DB_CPUS:?run make bench-*}
|
||||
memory: ${BENCH_DB_MEMORY:?run make bench-*}
|
||||
memswap_limit: ${BENCH_DB_MEMORY:?run make bench-*}
|
||||
|
||||
valkey:
|
||||
container_name: vlad-bench-valkey
|
||||
restart: "no"
|
||||
ports: !reset []
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${BENCH_CACHE_CPUS:?run make bench-*}
|
||||
memory: ${BENCH_CACHE_MEMORY:?run make bench-*}
|
||||
memswap_limit: ${BENCH_CACHE_MEMORY:?run make bench-*}
|
||||
|
||||
# образ, аргументы, healthcheck и GOMEMLIMIT — из основного файла;
|
||||
# volume — свой у проекта (vlad-bench_s3data), профиль uploads заводит
|
||||
# новый на каждый прогон
|
||||
s3:
|
||||
container_name: vlad-bench-s3
|
||||
restart: "no"
|
||||
ports: !reset []
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${BENCH_S3_CPUS:?run make bench-*}
|
||||
memory: ${BENCH_S3_MEMORY:?run make bench-*}
|
||||
memswap_limit: ${BENCH_S3_MEMORY:?run make bench-*}
|
||||
|
||||
migrate:
|
||||
image: ${BENCH_IMAGE:?run make bench-*}
|
||||
|
||||
# только разовые проходы профиля reconcile (docker compose run): лимит CPU
|
||||
# прохода — BENCH_CLEANER_CPUS вызова
|
||||
cleaner:
|
||||
image: ${BENCH_IMAGE:?run make bench-*}
|
||||
restart: "no"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${BENCH_CLEANER_CPUS:?run make bench-*}
|
||||
memory: ${BENCH_CLEANER_MEMORY:?run make bench-*}
|
||||
memswap_limit: ${BENCH_CLEANER_MEMORY:?run make bench-*}
|
||||
|
||||
# реплики без container_name: их число — BENCH_API_REPLICAS (--scale)
|
||||
api:
|
||||
image: ${BENCH_IMAGE:?run make bench-*}
|
||||
restart: "no"
|
||||
# проверка образа — второй процесс Python раз в несколько секунд в квоте
|
||||
# CPU реплики; готовность и так проверяет LB раз в секунду
|
||||
healthcheck:
|
||||
disable: true
|
||||
environment:
|
||||
SESSION_TTL_SECONDS: ${BENCH_SESSION_TTL:?run make bench-*}
|
||||
UPLOAD_MAX_UNFINISHED: ${BENCH_UPLOAD_MAX_UNFINISHED:-0}
|
||||
deploy:
|
||||
replicas: ${BENCH_API_REPLICAS:?run make bench-*}
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${BENCH_API_CPUS:?run make bench-*}
|
||||
memory: ${BENCH_API_MEMORY:?run make bench-*}
|
||||
memswap_limit: ${BENCH_API_MEMORY:?run make bench-*}
|
||||
|
||||
haproxy:
|
||||
container_name: vlad-bench-lb
|
||||
restart: "no"
|
||||
ports: !reset []
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${BENCH_LB_CPUS:?run make bench-*}
|
||||
memory: ${BENCH_LB_MEMORY:?run make bench-*}
|
||||
memswap_limit: ${BENCH_LB_MEMORY:?run make bench-*}
|
||||
|
||||
# брокер: образ, healthcheck, rabbitmq.conf и hostname — из основного
|
||||
# файла; volume свой у проекта (vlad-bench_rmqdata), down -v его удаляет
|
||||
rabbitmq:
|
||||
container_name: vlad-bench-mq
|
||||
restart: "no"
|
||||
ports: !reset []
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${BENCH_MQ_CPUS:?run make bench-*}
|
||||
memory: ${BENCH_MQ_MEMORY:?run make bench-*}
|
||||
memswap_limit: ${BENCH_MQ_MEMORY:?run make bench-*}
|
||||
|
||||
# relay — лимиты рабочего стенда, в профиле queue не меняются
|
||||
relay:
|
||||
container_name: vlad-bench-relay
|
||||
image: ${BENCH_IMAGE:?run make bench-*}
|
||||
restart: "no"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.25"
|
||||
memory: 192m
|
||||
memswap_limit: 192m
|
||||
|
||||
# worker: лимиты одни на все настройки профиля queue, меняются только
|
||||
# concurrency и prefetch (пересоздание сервиса на ячейку)
|
||||
worker:
|
||||
container_name: vlad-bench-worker
|
||||
image: ${BENCH_IMAGE:?run make bench-*}
|
||||
restart: "no"
|
||||
environment:
|
||||
WORKER_CONCURRENCY: ${BENCH_WORKER_CONCURRENCY:?run make bench-*}
|
||||
WORKER_PREFETCH: ${BENCH_WORKER_PREFETCH:?run make bench-*}
|
||||
RENDER_MEMORY_MB: ${BENCH_WORKER_RENDER_MEMORY_MB:?run make bench-*}
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${BENCH_WORKER_CPUS:?run make bench-*}
|
||||
memory: ${BENCH_WORKER_MEMORY:?run make bench-*}
|
||||
memswap_limit: ${BENCH_WORKER_MEMORY:?run make bench-*}
|
||||
|
||||
# Лаба 6, трек 1: сервисы телеметрии поднимает только профиль telemetry
|
||||
# (bench/run.py), прочие профили их не запускают и идут с
|
||||
# OTEL_SDK_DISABLED=true (bench.env). Образы, конфигурации и лимиты — из
|
||||
# основного файла, как у рабочего стенда; здесь — имена и отказ от
|
||||
# автоперезапуска: гибель Collector или хранилища видна прогону, а не
|
||||
# прячется за рестартом. Слои вариантов (bench/otel/) подключает
|
||||
# override прогона во временном каталоге, volume — свои у проекта.
|
||||
otel-collector:
|
||||
container_name: vlad-bench-otel
|
||||
restart: "no"
|
||||
|
||||
prometheus:
|
||||
container_name: vlad-bench-prom
|
||||
restart: "no"
|
||||
|
||||
loki:
|
||||
container_name: vlad-bench-loki
|
||||
restart: "no"
|
||||
|
||||
tempo:
|
||||
container_name: vlad-bench-tempo
|
||||
restart: "no"
|
||||
# единственное отличие от рабочего стенда (512M): за окна быстрого
|
||||
# профиля пик 405 МиБ, а полный идёт 140 с; конфигурация Tempo та же
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 768m
|
||||
|
||||
# Grafana не входит в путь данных и не запускается; порт сброшен на
|
||||
# случай ручного up
|
||||
grafana:
|
||||
restart: "no"
|
||||
ports: !reset []
|
||||
|
||||
networks:
|
||||
default:
|
||||
# генератор и сэмплер подключаются к сети стенда по имени
|
||||
name: vlad-bench-net
|
||||
@@ -0,0 +1,11 @@
|
||||
# Подстановки compose для нагрузочного стенда вместо .env рабочего стенда
|
||||
# (docker compose --env-file bench/bench.env). Только несекретные имена:
|
||||
# пароли и ключи S3 генерирует bench/run.py на каждый прогон, лимиты, образ,
|
||||
# число реплик и срок сессии приходят из профиля (BENCH_*).
|
||||
POSTGRES_USER=bench
|
||||
POSTGRES_DB=bench
|
||||
LOG_LEVEL=INFO
|
||||
S3_BUCKET=bench
|
||||
# лаба 6: профили лаб 3–5 идут без телеметрии (Collector на стенде нет);
|
||||
# трек 1 лабы 6 переопределяет это своим окружением
|
||||
OTEL_SDK_DISABLED=true
|
||||
+1168
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,248 @@
|
||||
"""Сравнение двух меток серий трека 1: «до» и «после» одного изменения.
|
||||
|
||||
uv run python bench/compare.py --before scaling-ab-before \\
|
||||
--after scaling-ab-after [--aa scaling-ab-aa]
|
||||
→ evidence/compare/<до>__<после>.md
|
||||
|
||||
По общим конфигурациям: R* (медиана, min–max, Δ), задержки на
|
||||
фиксированных уровнях, CPU на запрос реплик и PostgreSQL, новые сессии
|
||||
PostgreSQL и соединения на ступени R* и на первой нарушившей. С `--aa`
|
||||
(метка того же кода, что «до») — уровень шума: наибольшее |Δ медианы R*|
|
||||
между «до» и A/A по общим конфигурациям.
|
||||
|
||||
Изменение R* — эффект, только если: разбросы повторов не пересекаются,
|
||||
|Δ медианы| больше шума A/A и не меньше двух ступеней сетки поиска
|
||||
(R* после / R* до ≥ √factor ≈ 1,118 при factor 1,25: шаг сетки после двух
|
||||
делений — factor^¼, одна ступень — в пределах разрешения поиска). Иначе
|
||||
— «шум» или «в пределах разрешения».
|
||||
|
||||
Методика меток должна совпадать: профиль (кроме списка ячеек серии ab),
|
||||
лимиты, образы хранилищ, хост. Различаться может только код приложения
|
||||
(`src_sha256`). Иначе — отказ.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import csv
|
||||
import json
|
||||
import math
|
||||
import statistics
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SCALING = ROOT / "evidence" / "scaling"
|
||||
OUT = ROOT / "evidence" / "compare"
|
||||
|
||||
|
||||
def read_csv(path: Path) -> list[dict]:
|
||||
with path.open(encoding="utf-8") as handle:
|
||||
return list(csv.DictReader(handle))
|
||||
|
||||
|
||||
def num(value) -> float | None:
|
||||
try:
|
||||
return float(value)
|
||||
except (TypeError, ValueError):
|
||||
return None
|
||||
|
||||
|
||||
def load(label: str) -> dict:
|
||||
folder = SCALING / label
|
||||
if not (folder / "meta.json").exists():
|
||||
raise SystemExit(f"no label {label} in evidence/scaling")
|
||||
return {
|
||||
"label": label,
|
||||
"meta": json.loads((folder / "meta.json").read_text(encoding="utf-8")),
|
||||
"searches": read_csv(folder / "searches.csv"),
|
||||
"runs": read_csv(folder / "runs.csv"),
|
||||
}
|
||||
|
||||
|
||||
def methodology(meta: dict) -> dict:
|
||||
"""Что должно совпасть у сравниваемых меток."""
|
||||
profile = dict(meta["profile"])
|
||||
profile.pop("configs", None)
|
||||
stand = meta.get("stand") or {}
|
||||
return {
|
||||
"profile": profile,
|
||||
"series_name": profile.get("name"),
|
||||
"configs": meta.get("configs"),
|
||||
"cpu_model": meta["host"].get("cpu_model"),
|
||||
"vm_cpus": meta["docker"].get("NCPU"),
|
||||
"postgres_image": (stand.get("postgres") or {}).get("image"),
|
||||
}
|
||||
|
||||
|
||||
def check_methodology(before: dict, after: dict) -> list[str]:
|
||||
a, b = methodology(before["meta"]), methodology(after["meta"])
|
||||
problems = []
|
||||
if a["profile"] != b["profile"]:
|
||||
problems.append("profile differs")
|
||||
if a["cpu_model"] != b["cpu_model"] or a["vm_cpus"] != b["vm_cpus"]:
|
||||
problems.append("host or docker VM differs")
|
||||
common = set(a["configs"] or {}) & set(b["configs"] or {})
|
||||
for config in sorted(common):
|
||||
if a["configs"][config] != b["configs"][config]:
|
||||
problems.append(f"limits of {config} differ")
|
||||
return problems
|
||||
|
||||
|
||||
def stats_by_config(data: dict) -> dict:
|
||||
out = {}
|
||||
for row in data["searches"]:
|
||||
entry = out.setdefault(row["config"], {"r": [], "cells": []})
|
||||
if num(row["r_star"]) is not None:
|
||||
entry["r"].append(num(row["r_star"]))
|
||||
entry["cells"].append(row)
|
||||
for entry in out.values():
|
||||
values = entry["r"] or [0.0]
|
||||
entry["median"] = statistics.median(values)
|
||||
entry["min"], entry["max"] = min(values), max(values)
|
||||
return out
|
||||
|
||||
|
||||
def step_metric(data: dict, config: str, which: str, key: str) -> float | None:
|
||||
"""Медиана поля на ступени R* (`star`) или первой нарушившей (`fail`)."""
|
||||
values = []
|
||||
for search in data["searches"]:
|
||||
if search["config"] != config:
|
||||
continue
|
||||
rate = num(search["r_star"] if which == "star" else search["first_fail"])
|
||||
row = next(
|
||||
(
|
||||
r
|
||||
for r in data["runs"]
|
||||
if r["cell"] == search["cell"]
|
||||
and r["phase"] != "fixed"
|
||||
and num(r["rate"]) == rate
|
||||
),
|
||||
None,
|
||||
)
|
||||
if row is not None and num(row.get(key)) is not None:
|
||||
values.append(num(row[key]))
|
||||
return statistics.median(values) if values else None
|
||||
|
||||
|
||||
def fixed_metric(data: dict, config: str, rate: float, key: str) -> float | None:
|
||||
values = [
|
||||
num(r[key])
|
||||
for r in data["runs"]
|
||||
if r["config"] == config
|
||||
and r["phase"] == "fixed"
|
||||
and num(r["rate"]) == rate
|
||||
and num(r.get(key)) is not None
|
||||
]
|
||||
return statistics.median(values) if values else None
|
||||
|
||||
|
||||
def fmt(value: float | None, digits: int = 1) -> str:
|
||||
if value is None:
|
||||
return "—"
|
||||
return f"{round(value, digits):g}"
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
parser.add_argument("--before", required=True)
|
||||
parser.add_argument("--after", required=True)
|
||||
parser.add_argument("--aa")
|
||||
args = parser.parse_args()
|
||||
before, after = load(args.before), load(args.after)
|
||||
aa = load(args.aa) if args.aa else None
|
||||
problems = check_methodology(before, after)
|
||||
if aa:
|
||||
problems += [f"A/A: {p}" for p in check_methodology(before, aa)]
|
||||
if aa["meta"]["code"]["src_sha256"] != before["meta"]["code"]["src_sha256"]:
|
||||
problems.append("A/A label has different code than BEFORE (src_sha256)")
|
||||
if problems:
|
||||
raise SystemExit("labels are not comparable: " + "; ".join(problems))
|
||||
|
||||
factor = before["meta"]["profile"]["ladder_factor"]
|
||||
two_steps = math.sqrt(factor)
|
||||
sb, sa = stats_by_config(before), stats_by_config(after)
|
||||
common = [c for c in before["meta"]["profile"]["configs"] if c in sb and c in sa]
|
||||
noise = None
|
||||
if aa:
|
||||
saa = stats_by_config(aa)
|
||||
deltas = [
|
||||
abs(saa[c]["median"] - sb[c]["median"]) / sb[c]["median"]
|
||||
for c in common
|
||||
if c in saa and sb[c]["median"]
|
||||
]
|
||||
noise = max(deltas) if deltas else None
|
||||
|
||||
same_code = (
|
||||
before["meta"]["code"]["src_sha256"] == after["meta"]["code"]["src_sha256"]
|
||||
)
|
||||
lines = [
|
||||
f"# Сравнение: {args.before} → {args.after}",
|
||||
"",
|
||||
f"- Код «до»: src_sha256 `{before['meta']['code']['src_sha256'][:16]}`; «после»: "
|
||||
f"`{after['meta']['code']['src_sha256'][:16]}`"
|
||||
+ (" — **код одинаковый: это A/A, а не изменение**" if same_code else "")
|
||||
+ ".",
|
||||
f"- Пул приложения «до»: {before['meta']['image'].get('app_defaults')}; «после»: "
|
||||
f"{after['meta']['image'].get('app_defaults')}.",
|
||||
f"- Шум A/A ({args.aa}): "
|
||||
+ (
|
||||
f"наибольшее |Δ медианы R*| = {noise * 100:.1f} %"
|
||||
if noise is not None
|
||||
else "не задан"
|
||||
)
|
||||
+ ".",
|
||||
f"- Порог эффекта: разбросы не пересекаются, |Δ| > шума и R* после / до ≥ "
|
||||
f"{two_steps:.3f} (две ступени сетки поиска; одна ступень — {factor**0.25:.3f}).",
|
||||
"",
|
||||
"| Конфигурация | R* до, медиана (min–max) | R* после | Δ | Вывод | p95 до / после на фиксированных, мс | API мкс/запрос до / после | PostgreSQL мкс/запрос на R* до / после | Новых сессий за окно на первой нарушившей до / после | Соединений на R* до / после |",
|
||||
"|---|---|---|---|---|---|---|---|---|---|",
|
||||
]
|
||||
rates = before["meta"]["profile"]["fixed_rates"]
|
||||
for config in common:
|
||||
b, a = sb[config], sa[config]
|
||||
delta = (a["median"] - b["median"]) / b["median"] if b["median"] else None
|
||||
overlap = not (a["min"] > b["max"] or a["max"] < b["min"])
|
||||
ratio = a["median"] / b["median"] if b["median"] else None
|
||||
if delta is None:
|
||||
verdict = "нет данных"
|
||||
elif overlap:
|
||||
verdict = "шум (разбросы пересекаются)"
|
||||
elif noise is not None and abs(delta) <= noise:
|
||||
verdict = "шум (в пределах A/A)"
|
||||
elif ratio is not None and (ratio >= two_steps or ratio <= 1 / two_steps):
|
||||
verdict = "эффект"
|
||||
else:
|
||||
verdict = "в пределах разрешения поиска"
|
||||
p95 = " ; ".join(
|
||||
f"{r:g}: {fmt(fixed_metric(before, config, r, 'p95_ms'))} / {fmt(fixed_metric(after, config, r, 'p95_ms'))}"
|
||||
for r in rates
|
||||
)
|
||||
api_us = (
|
||||
f"{fmt(fixed_metric(before, config, rates[-1], 'api_cpu_us_per_req'))} / "
|
||||
f"{fmt(fixed_metric(after, config, rates[-1], 'api_cpu_us_per_req'))}"
|
||||
)
|
||||
db_us = (
|
||||
f"{fmt(step_metric(before, config, 'star', 'db_cpu_us_per_req'))} / "
|
||||
f"{fmt(step_metric(after, config, 'star', 'db_cpu_us_per_req'))}"
|
||||
)
|
||||
sessions = (
|
||||
f"{fmt(step_metric(before, config, 'fail', 'pg_new_sessions'), 0)} / "
|
||||
f"{fmt(step_metric(after, config, 'fail', 'pg_new_sessions'), 0)}"
|
||||
)
|
||||
conns = (
|
||||
f"{fmt(step_metric(before, config, 'star', 'pg_conn_max'), 0)} / "
|
||||
f"{fmt(step_metric(after, config, 'star', 'pg_conn_max'), 0)}"
|
||||
)
|
||||
lines.append(
|
||||
f"| {config} | {b['median']:g} ({b['min']:g}–{b['max']:g}) | "
|
||||
f"{a['median']:g} ({a['min']:g}–{a['max']:g}) | "
|
||||
f"{fmt(delta * 100 if delta is not None else None)} % | {verdict} | {p95} | "
|
||||
f"{api_us} | {db_us} | {sessions} | {conns} |"
|
||||
)
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
path = OUT / f"{args.before}__{args.after}.md"
|
||||
path.write_text("\n".join(lines) + "\n", encoding="utf-8")
|
||||
print("\n".join(lines))
|
||||
print(f"\nwritten: {path.relative_to(ROOT)}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,119 @@
|
||||
"""Загрузчик объектов профиля reconcile: PUT в S3 стенда мимо API.
|
||||
|
||||
Запускается исключительно внутри `vlad-bench-fill`, контейнера на образе
|
||||
стенда: botocore там уже есть, потому что от него зависит aiobotocore, а
|
||||
пакет `src` скрипт не трогает. Номера, ключи и байты берутся из
|
||||
`bench/reconcile.py` — `bench/run.py` кладёт его рядом через `docker cp`.
|
||||
Ключи пользователя API приходят только из окружения контейнера
|
||||
(`S3_ACCESS_KEY_ID` и `S3_SECRET_ACCESS_KEY`, передаются как `docker run
|
||||
-e <имя>`, без значения в командной строке) и никуда не печатаются.
|
||||
|
||||
Пишутся те номера из [--start, --end), которым модель назначает объект.
|
||||
Работа делится между процессами, у каждого свой клиент и пул потоков. На
|
||||
выходе одна JSON-строка с полями objects, put_per_s и seconds; хотя бы
|
||||
один неудачный PUT даёт код 1.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from multiprocessing import Pool
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
import reconcile # noqa: E402
|
||||
|
||||
KEY_ENV = ("S3_ACCESS_KEY_ID", "S3_SECRET_ACCESS_KEY")
|
||||
|
||||
|
||||
def client(endpoint: str, threads: int):
|
||||
import botocore.session # noqa: PLC0415 - только в контейнере стенда
|
||||
from botocore.config import Config # noqa: PLC0415
|
||||
|
||||
return botocore.session.get_session().create_client(
|
||||
"s3",
|
||||
endpoint_url=endpoint,
|
||||
region_name="us-east-1",
|
||||
aws_access_key_id=os.environ[KEY_ENV[0]],
|
||||
aws_secret_access_key=os.environ[KEY_ENV[1]],
|
||||
config=Config(
|
||||
s3={"addressing_style": "path"},
|
||||
retries={"total_max_attempts": 3},
|
||||
max_pool_connections=threads,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def put_chunk(job: tuple[dict, list[int]]) -> int:
|
||||
"""Тело рабочего процесса: создать клиента, раздать номера потокам, вернуть их число."""
|
||||
args, indices = job
|
||||
s3 = client(args["endpoint"], args["threads"])
|
||||
|
||||
def put(index: int) -> None:
|
||||
attachment_id = reconcile.object_id(args["seed"], index)
|
||||
s3.put_object(
|
||||
Bucket=args["bucket"],
|
||||
Key=reconcile.object_key(args["namespace"], attachment_id),
|
||||
Body=reconcile.content(args["seed"], index, args["size"]),
|
||||
ContentType=reconcile.CONTENT_TYPE,
|
||||
)
|
||||
|
||||
with ThreadPoolExecutor(max_workers=args["threads"]) as pool:
|
||||
for _ in pool.map(put, indices):
|
||||
pass
|
||||
return len(indices)
|
||||
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
parser.add_argument("--endpoint", required=True)
|
||||
parser.add_argument("--bucket", required=True)
|
||||
parser.add_argument("--namespace", required=True)
|
||||
parser.add_argument("--seed", type=int, required=True)
|
||||
parser.add_argument("--start", type=int, required=True)
|
||||
parser.add_argument("--end", type=int, required=True)
|
||||
parser.add_argument("--size", type=int, required=True)
|
||||
parser.add_argument("--force", choices=(reconcile.FORCE_OK,))
|
||||
parser.add_argument("--processes", type=int, default=3)
|
||||
parser.add_argument("--threads", type=int, default=16)
|
||||
args = parser.parse_args(argv)
|
||||
if not Path("/.dockerenv").exists():
|
||||
print(json.dumps({"error": "run only in the bench container"}), flush=True)
|
||||
return 2
|
||||
if any(not os.environ.get(name) for name in KEY_ENV):
|
||||
print(json.dumps({"error": f"{' and '.join(KEY_ENV)} required"}), flush=True)
|
||||
return 2
|
||||
indices = reconcile.object_indices(args.start, args.end, args.force)
|
||||
parts = [indices[i :: args.processes] for i in range(args.processes)]
|
||||
shared = {
|
||||
key: getattr(args, key)
|
||||
for key in ("endpoint", "bucket", "namespace", "seed", "size", "threads")
|
||||
}
|
||||
started = time.monotonic()
|
||||
try:
|
||||
with Pool(args.processes) as pool:
|
||||
done = sum(pool.map(put_chunk, [(shared, p) for p in parts if p]))
|
||||
except Exception as exc: # noqa: BLE001
|
||||
# печатаем лишь тип: сообщение botocore может содержать URL и заголовки
|
||||
print(json.dumps({"error": f"put failed ({type(exc).__name__})"}), flush=True)
|
||||
return 1
|
||||
seconds = time.monotonic() - started
|
||||
print(
|
||||
json.dumps(
|
||||
{
|
||||
"objects": done,
|
||||
"put_per_s": round(done / seconds, 1) if seconds else 0.0,
|
||||
"seconds": round(seconds, 2),
|
||||
},
|
||||
),
|
||||
flush=True,
|
||||
)
|
||||
return 0 if done == len(indices) else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
+1680
File diff suppressed because it is too large
Load Diff
+212
@@ -0,0 +1,212 @@
|
||||
"""Чтение хранилищ телеметрии стенда для профиля telemetry. Только stdlib.
|
||||
|
||||
Работает внутри контейнера генератора `vlad-bench-gen`, который
|
||||
`bench/run.py` на время варианта с телеметрией подключает к сети
|
||||
`vlad-bench_telemetry`: Prometheus, Loki и Tempo наружу не опубликованы.
|
||||
Оркестратор копирует файл (`docker cp`), вызывает через `docker exec` и
|
||||
читает одну строку JSON из stdout. Только чтение по HTTP: ни записи, ни
|
||||
удаления в хранилищах.
|
||||
|
||||
Команды:
|
||||
ready ждать готовности Collector (:8888), Prometheus, Loki и Tempo
|
||||
snap счётчики приёма и потерь: собственные метрики Collector, Tempo,
|
||||
Loki и Prometheus (текстовый формат /metrics), сумма по меткам
|
||||
find по id запросов классов (`--input` JSON): запись доступа в Loki
|
||||
(статус, длительность на сервере, trace_id), затем трасса этого
|
||||
trace_id в Tempo — найдена ли, сколько span, есть ли consumer
|
||||
span задания и его исход
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
COLLECTOR = "http://otel-collector:8888"
|
||||
PROMETHEUS = "http://prometheus:9090"
|
||||
LOKI = "http://loki:3100"
|
||||
TEMPO = "http://tempo:3200"
|
||||
# ряды, которые нужны профилю; сумма по всем меткам ряда
|
||||
PREFIXES = {
|
||||
"collector": ("otelcol_receiver_", "otelcol_exporter_", "otelcol_processor_"),
|
||||
"tempo": ("tempo_distributor_", "tempo_discarded_"),
|
||||
"loki": ("loki_distributor_", "loki_discarded_"),
|
||||
"prometheus": ("prometheus_tsdb_head_",),
|
||||
}
|
||||
SOURCES = {
|
||||
"collector": f"{COLLECTOR}/metrics",
|
||||
"tempo": f"{TEMPO}/metrics",
|
||||
"loki": f"{LOKI}/metrics",
|
||||
"prometheus": f"{PROMETHEUS}/metrics",
|
||||
}
|
||||
ACCESS = re.compile(r"-> (\d{3}) \(([\d.]+) ms\)")
|
||||
LOKI_BATCH = 25
|
||||
TEMPO_THREADS = 3
|
||||
|
||||
|
||||
def fetch(url: str, timeout: float = 10.0) -> tuple[int, bytes]:
|
||||
try:
|
||||
with urllib.request.urlopen(url, timeout=timeout) as response: # noqa: S310
|
||||
return response.status, response.read()
|
||||
except urllib.error.HTTPError as exc:
|
||||
return exc.code, b""
|
||||
except (OSError, ValueError):
|
||||
return 0, b""
|
||||
|
||||
|
||||
def metric_sums(text: str, prefixes: tuple[str, ...]) -> dict[str, float]:
|
||||
"""Сумма значений ряда по всем меткам: `name{…} 12` → name: 12."""
|
||||
sums: dict[str, float] = {}
|
||||
for line in text.splitlines():
|
||||
if not line or line.startswith("#") or not line.startswith(prefixes):
|
||||
continue
|
||||
name_part, _, value = line.rpartition(" ")
|
||||
name = name_part.split("{", 1)[0].strip()
|
||||
try:
|
||||
number = float(value)
|
||||
except ValueError:
|
||||
continue
|
||||
sums[name] = sums.get(name, 0.0) + number
|
||||
return sums
|
||||
|
||||
|
||||
def cmd_ready(args: argparse.Namespace) -> dict:
|
||||
urls = {
|
||||
"collector": f"{COLLECTOR}/metrics",
|
||||
"prometheus": f"{PROMETHEUS}/-/ready",
|
||||
"loki": f"{LOKI}/ready",
|
||||
"tempo": f"{TEMPO}/ready",
|
||||
}
|
||||
started = time.monotonic()
|
||||
waiting = dict(urls)
|
||||
while waiting and time.monotonic() - started < args.timeout:
|
||||
for name, url in list(waiting.items()):
|
||||
if fetch(url, timeout=2)[0] == 200:
|
||||
del waiting[name]
|
||||
if waiting:
|
||||
time.sleep(0.5)
|
||||
return {
|
||||
"ready": not waiting,
|
||||
"waiting": sorted(waiting),
|
||||
"waited_s": round(time.monotonic() - started, 1),
|
||||
}
|
||||
|
||||
|
||||
def cmd_snap(args: argparse.Namespace) -> dict:
|
||||
out: dict = {"ts": round(time.time(), 3)}
|
||||
for name, url in SOURCES.items():
|
||||
status, body = fetch(url)
|
||||
out[name] = (
|
||||
metric_sums(body.decode("utf-8", "replace"), PREFIXES[name])
|
||||
if status == 200
|
||||
else None
|
||||
)
|
||||
# применена ли копия с отбором рядов (вариант balanced)
|
||||
status, body = fetch(f"{PROMETHEUS}/api/v1/status/config")
|
||||
out["prom_relabel"] = b"metric_relabel_configs" in body if status == 200 else None
|
||||
return out
|
||||
|
||||
|
||||
def loki_records(rids: list[str], start: float, end: float) -> dict[str, dict]:
|
||||
"""Запись доступа API на каждый id: статус, мс на сервере, trace_id."""
|
||||
found: dict[str, dict] = {}
|
||||
for offset in range(0, len(rids), LOKI_BATCH):
|
||||
batch = rids[offset : offset + LOKI_BATCH]
|
||||
query = (
|
||||
'{service_name="messenger-api"} | event="http request" | request_id=~"'
|
||||
+ "|".join(batch)
|
||||
+ '"'
|
||||
)
|
||||
params = urllib.parse.urlencode(
|
||||
{
|
||||
"query": query,
|
||||
"start": int((start - 60) * 1e9),
|
||||
"end": int((end + 60) * 1e9),
|
||||
"limit": 5000,
|
||||
"direction": "forward",
|
||||
}
|
||||
)
|
||||
status, body = fetch(f"{LOKI}/loki/api/v1/query_range?{params}", timeout=30)
|
||||
if status != 200:
|
||||
raise SystemExit(f"loki query failed: HTTP {status}")
|
||||
for stream in json.loads(body).get("data", {}).get("result", []):
|
||||
labels = stream.get("stream", {})
|
||||
rid = labels.get("request_id", "")
|
||||
for _, line in stream.get("values", []):
|
||||
match = ACCESS.search(line)
|
||||
if rid and match:
|
||||
found[rid] = {
|
||||
"status": int(match.group(1)),
|
||||
"server_ms": float(match.group(2)),
|
||||
"trace_id": labels.get("trace_id", ""),
|
||||
}
|
||||
return found
|
||||
|
||||
|
||||
def tempo_trace(trace_id: str) -> dict:
|
||||
"""Трасса по id: найдена ли, span, consumer span и его исход."""
|
||||
status, body = fetch(f"{TEMPO}/api/v2/traces/{trace_id}", timeout=30)
|
||||
if status == 404:
|
||||
return {"found": False}
|
||||
if status != 200:
|
||||
return {"found": None, "http": status}
|
||||
data = json.loads(body or b"{}")
|
||||
trace = data.get("trace", data)
|
||||
spans = 0
|
||||
consumer = None
|
||||
for resource in trace.get("resourceSpans") or trace.get("batches") or []:
|
||||
for scope in resource.get("scopeSpans", []):
|
||||
for span in scope.get("spans", []):
|
||||
spans += 1
|
||||
if span.get("kind") in ("SPAN_KIND_CONSUMER", 5):
|
||||
for attr in span.get("attributes", []):
|
||||
if attr.get("key") == "messenger.job.outcome":
|
||||
consumer = next(iter(attr["value"].values()), "")
|
||||
if consumer is None:
|
||||
consumer = ""
|
||||
return {"found": spans > 0, "spans": spans, "consumer": consumer}
|
||||
|
||||
|
||||
def cmd_find(args: argparse.Namespace) -> dict:
|
||||
with open(args.input, encoding="ascii") as handle:
|
||||
request = json.load(handle)
|
||||
rids = sorted({rid for items in request["classes"].values() for rid in items})
|
||||
records = loki_records(rids, request["start"], request["end"])
|
||||
trace_ids = sorted({r["trace_id"] for r in records.values() if r.get("trace_id")})
|
||||
with ThreadPoolExecutor(TEMPO_THREADS) as pool:
|
||||
traces = dict(zip(trace_ids, pool.map(tempo_trace, trace_ids), strict=True))
|
||||
out: dict = {"classes": {}}
|
||||
for name, items in request["classes"].items():
|
||||
rows = []
|
||||
for rid in items:
|
||||
record = records.get(rid)
|
||||
row = {"rid": rid, "log": record is not None}
|
||||
if record:
|
||||
row.update(record)
|
||||
row.update(traces.get(record.get("trace_id", ""), {"found": False}))
|
||||
rows.append(row)
|
||||
out["classes"][name] = rows
|
||||
return out
|
||||
|
||||
|
||||
def main() -> None:
|
||||
root = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
commands = root.add_subparsers(dest="command", required=True)
|
||||
ready = commands.add_parser("ready")
|
||||
ready.add_argument("--timeout", type=float, default=90)
|
||||
commands.add_parser("snap")
|
||||
find = commands.add_parser("find")
|
||||
find.add_argument("--input", required=True)
|
||||
args = root.parse_args()
|
||||
handler = {"ready": cmd_ready, "snap": cmd_snap, "find": cmd_find}
|
||||
json.dump(handler[args.command](args), sys.stdout)
|
||||
sys.stdout.write("\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,62 @@
|
||||
# >>> lean
|
||||
# Вариант `balanced` профиля telemetry (bench/run.py): тот же
|
||||
# infra/otel/prometheus/prometheus.yml, плюс отбор собственных рядов Loki,
|
||||
# Tempo и Prometheus — остаются приём, отказы и объём. Ряды приложения и
|
||||
# Collector (по ним правила и dashboard) — все. Слоёв Prometheus не
|
||||
# умеет, поэтому это копия: без строк между «>>> lean» и «<<< lean» файл
|
||||
# обязан совпадать с рабочим построчно (run.py проверяет до стенда).
|
||||
# <<< lean
|
||||
# Prometheus v3.15.1: хранилище метрик стенда. Метрики приложения сюда
|
||||
# не пушатся — Prometheus сам забирает экспортёр Collector (:8889), куда
|
||||
# SDK api, worker и relay отправляют OTLP. Срок (7d) и объём (1GB) хранения
|
||||
# — флаги в compose.yaml; volume promdata.
|
||||
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
scrape_timeout: 10s
|
||||
evaluation_interval: 15s
|
||||
|
||||
# SLI и alert rules (уровень 4). Оповещения наружу не уходят: Alertmanager
|
||||
# не подключён, состояние pending/firing видно в /api/v1/alerts и в Grafana
|
||||
rule_files:
|
||||
- /etc/prometheus/rules.yml
|
||||
|
||||
scrape_configs:
|
||||
# метрики приложения: job и instance уже проставил Collector из ресурса
|
||||
# (service.name, service.instance.id) — honor_labels их сохраняет
|
||||
- job_name: messenger
|
||||
honor_labels: true
|
||||
static_configs:
|
||||
- targets: ["otel-collector:8889"]
|
||||
|
||||
# здоровье самого конвейера телеметрии: очередь экспорта, отказы, память
|
||||
- job_name: otel-collector
|
||||
static_configs:
|
||||
- targets: ["otel-collector:8888"]
|
||||
- job_name: loki
|
||||
static_configs:
|
||||
- targets: ["loki:3100"]
|
||||
# >>> lean
|
||||
metric_relabel_configs:
|
||||
- source_labels: [__name__]
|
||||
regex: loki_distributor_(lines|bytes)_received_total|loki_discarded_(samples|bytes)_total|loki_ingester_chunks_flush_failures_total|loki_ingester_chunk_stored_bytes_total
|
||||
action: keep
|
||||
# <<< lean
|
||||
- job_name: tempo
|
||||
static_configs:
|
||||
- targets: ["tempo:3200"]
|
||||
# >>> lean
|
||||
metric_relabel_configs:
|
||||
- source_labels: [__name__]
|
||||
regex: tempo_distributor_(spans|bytes)_received_total|tempo_discarded_spans_total|tempo_ingester_bytes_received_total|tempo_.*_failed_total
|
||||
action: keep
|
||||
# <<< lean
|
||||
- job_name: prometheus
|
||||
static_configs:
|
||||
- targets: ["127.0.0.1:9090"]
|
||||
# >>> lean
|
||||
metric_relabel_configs:
|
||||
- source_labels: [__name__]
|
||||
regex: prometheus_tsdb_head_(series|samples_appended_total)|prometheus_rule_evaluation_failures_total|prometheus_tsdb_compactions_failed_total
|
||||
action: keep
|
||||
# <<< lean
|
||||
@@ -0,0 +1,45 @@
|
||||
# Вариант `balanced` профиля telemetry — предлагаемая сбалансированная
|
||||
# конфигурация (REPORT.md, «Трек 1. Цена наблюдаемости», критерии S1–S5).
|
||||
# SDK по-прежнему отдаёт все span, решение принимает Collector по правилам
|
||||
# этой системы; журнал и метрики не выбираются. Вместе с ним — реже
|
||||
# метрики (30 с), грубые границы histogram и prometheus-lean.yml.
|
||||
#
|
||||
# Отличие от tail-typical.yaml: «медленно» — это server span запроса дольше
|
||||
# порога SLO (250 мс), а не длина трассы; неуспешное задание узнаётся по
|
||||
# исходу consumer span (у failed статуса ERROR нет); остальное — 5 %.
|
||||
processors:
|
||||
tail_sampling:
|
||||
decision_wait: 8s
|
||||
num_traces: 5000
|
||||
expected_new_traces_per_sec: 150
|
||||
# поздний span уже сохранённой трассы (повтор задания) идёт за ней;
|
||||
# кэш несохранённых не держим — такой span проходит правила заново
|
||||
decision_cache:
|
||||
sampled_cache_size: 20000
|
||||
non_sampled_cache_size: 0
|
||||
policies:
|
||||
- name: errors
|
||||
type: status_code
|
||||
status_code:
|
||||
status_codes: [ERROR]
|
||||
- name: job-not-ready
|
||||
type: string_attribute
|
||||
string_attribute:
|
||||
key: messenger.job.outcome
|
||||
values: [failed, retry, error, unavailable, rejected, cancelled]
|
||||
- name: slow-requests
|
||||
type: ottl_condition
|
||||
ottl_condition:
|
||||
error_mode: ignore
|
||||
span:
|
||||
- kind == SPAN_KIND_SERVER and end_time_unix_nano - start_time_unix_nano >= 250000000
|
||||
- kind == SPAN_KIND_CONSUMER and end_time_unix_nano - start_time_unix_nano >= 10000000000
|
||||
- name: share
|
||||
type: probabilistic
|
||||
probabilistic:
|
||||
sampling_percentage: 5
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
traces:
|
||||
processors: [memory_limiter, tail_sampling, batch]
|
||||
@@ -0,0 +1,35 @@
|
||||
# Вариант `tail` профиля telemetry (bench/run.py): выбор трасс в Collector
|
||||
# «как в учебнике» — ошибки, длинные трассы, доля остальных. Подключается
|
||||
# вторым --config после infra/otel/collector.yaml; меняет только pipeline
|
||||
# трасс. Рабочий стенд этот файл не видит: там остаются все трассы.
|
||||
#
|
||||
# Порог 500 мс считается по длительности всей трассы, а не запроса:
|
||||
# асинхронная загрузка (API → relay → worker) почти всегда длиннее и
|
||||
# сохраняется целиком, а запись, которая ждала блокировку 250–500 мс, —
|
||||
# только по жребию. Это и проверяет гипотеза T3 (REPORT.md).
|
||||
processors:
|
||||
tail_sampling:
|
||||
# трасса загрузки ниже насыщения — 1–3 с (relay раз в 0,5 с, рендер
|
||||
# доли секунды): ожидание с запасом в три раза
|
||||
decision_wait: 10s
|
||||
# ~150 новых трасс/с × 10 с ожидания — 1 500 в карте; запас втрое с лишним
|
||||
num_traces: 5000
|
||||
expected_new_traces_per_sec: 150
|
||||
policies:
|
||||
- name: errors
|
||||
type: status_code
|
||||
status_code:
|
||||
status_codes: [ERROR]
|
||||
- name: long-traces
|
||||
type: latency
|
||||
latency:
|
||||
threshold_ms: 500
|
||||
- name: share
|
||||
type: probabilistic
|
||||
probabilistic:
|
||||
sampling_percentage: 10
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
traces:
|
||||
processors: [memory_limiter, tail_sampling, batch]
|
||||
+412
@@ -0,0 +1,412 @@
|
||||
"""Графики серий трека 1: SVG на стандартной библиотеке.
|
||||
|
||||
uv run python bench/plots.py --out scaling scaling-a scaling-b scaling-db
|
||||
→ evidence/plots/<out>/: rstar-by-config.svg, rstar-by-replicas.svg,
|
||||
summary.md (R*, эффективность, точка насыщения)
|
||||
|
||||
`run.py` после серии зовёт `render_label()`: в каталоге метки —
|
||||
`p95-by-rate.svg` (p95 от поданной интенсивности по ячейкам) и
|
||||
`cpu-by-component.svg` (CPU компонентов на ступени R*). Числа берутся из
|
||||
`searches.csv` и `runs.csv` меток как есть.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import csv
|
||||
import html
|
||||
import math
|
||||
import re
|
||||
import statistics
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SCALING = ROOT / "evidence" / "scaling"
|
||||
PLOTS = ROOT / "evidence" / "plots"
|
||||
COLORS = (
|
||||
"#2f6fbf",
|
||||
"#d0752a",
|
||||
"#3c9a5f",
|
||||
"#b8404a",
|
||||
"#7a5cb5",
|
||||
"#8c6d3f",
|
||||
"#c25f9c",
|
||||
"#5f8f9c",
|
||||
)
|
||||
COMPONENTS = (
|
||||
("api_cpu_cores", "API (сумма реплик)", "#2f6fbf"),
|
||||
("db_cpu_cores", "PostgreSQL", "#b8404a"),
|
||||
("lb_cpu_cores", "HAProxy", "#3c9a5f"),
|
||||
("cache_cpu_cores", "Valkey", "#7a5cb5"),
|
||||
("gen_cpu_cores", "генератор", "#8c6d3f"),
|
||||
)
|
||||
CONFIG_RE = re.compile(r"(\d+)x([\d.]+)(?:-pg([\d.]+))?")
|
||||
|
||||
|
||||
def read_csv(path: Path) -> list[dict]:
|
||||
if not path.exists():
|
||||
return []
|
||||
with path.open(encoding="utf-8") as handle:
|
||||
return list(csv.DictReader(handle))
|
||||
|
||||
|
||||
def num(value) -> float | None:
|
||||
try:
|
||||
return float(value)
|
||||
except (TypeError, ValueError):
|
||||
return None
|
||||
|
||||
|
||||
def nice_step(raw: float) -> float:
|
||||
"""Круглый шаг сетки не меньше raw: 1, 2, 2,5, 5 или 10 × 10^k."""
|
||||
magnitude = 10 ** math.floor(math.log10(raw))
|
||||
return next(m * magnitude for m in (1, 2, 2.5, 5, 10) if m * magnitude >= raw)
|
||||
|
||||
|
||||
def nice_ticks(top: float, count: int = 6) -> list[float]:
|
||||
step = nice_step(top / count) if top > 0 else 1.0
|
||||
return [round(step * i, 6) for i in range(int(top / step) + 1)]
|
||||
|
||||
|
||||
class Svg:
|
||||
"""Поле графика с осями: x и y в единицах данных."""
|
||||
|
||||
def __init__(self, width: int, height: int, title: str) -> None:
|
||||
self.width, self.height = width, height
|
||||
# справа — место под легенду: имена меток длинные
|
||||
self.left, self.right, self.top, self.bottom = 70, 300, 40, 50
|
||||
self.parts = [
|
||||
f'<svg xmlns="http://www.w3.org/2000/svg" width="{width}" height="{height}" '
|
||||
f'viewBox="0 0 {width} {height}" font-family="sans-serif" font-size="12">',
|
||||
f'<rect width="{width}" height="{height}" fill="white"/>',
|
||||
f'<text x="{width / 2}" y="22" text-anchor="middle" font-size="14">'
|
||||
f"{html.escape(title)}</text>",
|
||||
]
|
||||
self.x0 = self.x1 = self.y0 = self.y1 = 0.0
|
||||
self.ystep = 1.0
|
||||
self.legend_row = 0
|
||||
|
||||
def scale(self, x0: float, x1: float, y0: float, y1: float) -> None:
|
||||
"""Ось y — от y0 до круглого значения не меньше y1 (шаг сетки
|
||||
1, 2, 2,5 или 5 × 10^k, пять–шесть делений)."""
|
||||
self.ystep = nice_step(max(y1 - y0, 1e-9) / 5)
|
||||
top = y0 + self.ystep * math.ceil(max(y1 - y0, 1e-9) / self.ystep)
|
||||
self.x0, self.x1, self.y0, self.y1 = (
|
||||
x0,
|
||||
x1 if x1 > x0 else x0 + 1,
|
||||
y0,
|
||||
top,
|
||||
)
|
||||
|
||||
def px(self, x: float) -> float:
|
||||
span = self.width - self.left - self.right
|
||||
return self.left + (x - self.x0) / (self.x1 - self.x0) * span
|
||||
|
||||
def py(self, y: float) -> float:
|
||||
span = self.height - self.top - self.bottom
|
||||
return self.height - self.bottom - (y - self.y0) / (self.y1 - self.y0) * span
|
||||
|
||||
def axes(self, xlabel: str, ylabel: str, xticks: list[tuple[float, str]]) -> None:
|
||||
bottom, left = self.height - self.bottom, self.left
|
||||
right = self.width - self.right
|
||||
self.parts.append(
|
||||
f'<line x1="{left}" y1="{bottom}" x2="{right}" y2="{bottom}" stroke="#333"/>'
|
||||
)
|
||||
self.parts.append(
|
||||
f'<line x1="{left}" y1="{self.top}" x2="{left}" y2="{bottom}" stroke="#333"/>'
|
||||
)
|
||||
for x, text in xticks:
|
||||
self.parts.append(
|
||||
f'<text x="{self.px(x):.1f}" y="{bottom + 16}" text-anchor="middle">{html.escape(text)}</text>'
|
||||
)
|
||||
for index in range(round((self.y1 - self.y0) / self.ystep) + 1):
|
||||
value = round(self.y0 + self.ystep * index, 6)
|
||||
y = self.py(value)
|
||||
self.parts.append(
|
||||
f'<line x1="{left}" y1="{y:.1f}" x2="{right}" y2="{y:.1f}" stroke="#eee"/>'
|
||||
)
|
||||
self.parts.append(
|
||||
f'<text x="{left - 6}" y="{y + 4:.1f}" text-anchor="end">{value:g}</text>'
|
||||
)
|
||||
self.parts.append(
|
||||
f'<text x="{(left + right) / 2}" y="{self.height - 12}" text-anchor="middle">{html.escape(xlabel)}</text>'
|
||||
)
|
||||
self.parts.append(
|
||||
f'<text x="16" y="{(self.top + bottom) / 2}" text-anchor="middle" '
|
||||
f'transform="rotate(-90 16 {(self.top + bottom) / 2})">{html.escape(ylabel)}</text>'
|
||||
)
|
||||
|
||||
def line(
|
||||
self, points: list[tuple[float, float]], color: str, dash: str = ""
|
||||
) -> None:
|
||||
if not points:
|
||||
return
|
||||
path = " ".join(f"{self.px(x):.1f},{self.py(y):.1f}" for x, y in points)
|
||||
extra = f' stroke-dasharray="{dash}"' if dash else ""
|
||||
self.parts.append(
|
||||
f'<polyline points="{path}" fill="none" stroke="{color}" stroke-width="2"{extra}/>'
|
||||
)
|
||||
|
||||
def dot(self, x: float, y: float, color: str, hollow: bool = False) -> None:
|
||||
fill = "white" if hollow else color
|
||||
self.parts.append(
|
||||
f'<circle cx="{self.px(x):.1f}" cy="{self.py(y):.1f}" r="3.5" fill="{fill}" stroke="{color}"/>'
|
||||
)
|
||||
|
||||
def whisker(self, x: float, lo: float, hi: float, color: str) -> None:
|
||||
self.parts.append(
|
||||
f'<line x1="{self.px(x):.1f}" y1="{self.py(lo):.1f}" x2="{self.px(x):.1f}" '
|
||||
f'y2="{self.py(hi):.1f}" stroke="{color}" stroke-width="1.5"/>'
|
||||
)
|
||||
|
||||
def bar(self, x: float, width: float, y0: float, y1: float, color: str) -> None:
|
||||
left = self.px(x - width / 2)
|
||||
right = self.px(x + width / 2)
|
||||
self.parts.append(
|
||||
f'<rect x="{left:.1f}" y="{self.py(y1):.1f}" width="{right - left:.1f}" '
|
||||
f'height="{self.py(y0) - self.py(y1):.1f}" fill="{color}" opacity="0.85"/>'
|
||||
)
|
||||
|
||||
def legend(self, text: str, color: str, dash: str = "") -> None:
|
||||
x = self.width - self.right + 14
|
||||
y = self.top + 14 + 18 * self.legend_row
|
||||
extra = f' stroke-dasharray="{dash}"' if dash else ""
|
||||
self.parts.append(
|
||||
f'<line x1="{x}" y1="{y - 4}" x2="{x + 18}" y2="{y - 4}" stroke="{color}" stroke-width="3"{extra}/>'
|
||||
)
|
||||
self.parts.append(f'<text x="{x + 24}" y="{y}">{html.escape(text)}</text>')
|
||||
self.legend_row += 1
|
||||
|
||||
def save(self, path: Path) -> None:
|
||||
path.write_text("\n".join([*self.parts, "</svg>"]) + "\n", encoding="utf-8")
|
||||
|
||||
|
||||
def render_label(folder: Path) -> None:
|
||||
"""Графики одной метки серии: p95 от интенсивности, CPU на ступени R*."""
|
||||
runs = read_csv(folder / "runs.csv")
|
||||
searches = read_csv(folder / "searches.csv")
|
||||
if not runs:
|
||||
return
|
||||
configs = list(dict.fromkeys(row["config"] for row in runs))
|
||||
rates = [num(r["rate"]) or 0 for r in runs]
|
||||
p95s = [min(num(r["p95_ms"]) or 0, 1000) for r in runs]
|
||||
svg = Svg(1000, 440, f"p95 успешных от поданной интенсивности: {folder.name}")
|
||||
svg.scale(0, max(rates) * 1.05, 0, max(max(p95s) * 1.1, 250))
|
||||
ticks = [(x, f"{x:g}") for x in nice_ticks(max(rates))]
|
||||
svg.axes("запросов в секунду (по расписанию)", "p95, мс (≤ 1000)", ticks)
|
||||
svg.line([(0, 200), (max(rates) * 1.05, 200)], "#999", "4 4")
|
||||
for index, config in enumerate(configs):
|
||||
color = COLORS[index % len(COLORS)]
|
||||
cells = sorted(
|
||||
{(r["cell"], r["repeat"]) for r in runs if r["config"] == config}
|
||||
)
|
||||
for cell, _ in cells:
|
||||
points = sorted(
|
||||
(num(r["rate"]) or 0, min(num(r["p95_ms"]) or 1000, 1000))
|
||||
for r in runs
|
||||
if r["cell"] == cell
|
||||
)
|
||||
svg.line(points, color)
|
||||
for r in runs:
|
||||
if r["cell"] == cell:
|
||||
svg.dot(
|
||||
num(r["rate"]) or 0,
|
||||
min(num(r["p95_ms"]) or 1000, 1000),
|
||||
color,
|
||||
hollow=r["slo_pass"] != "True",
|
||||
)
|
||||
svg.legend(config, color)
|
||||
svg.legend("SLO 200 мс", "#999", "4 4")
|
||||
svg.save(folder / "p95-by-rate.svg")
|
||||
|
||||
# CPU компонентов на ступени R* каждой ячейки (медиана по повторам)
|
||||
stacks = []
|
||||
for config in configs:
|
||||
values = {key: [] for key, _, _ in COMPONENTS}
|
||||
for search in [s for s in searches if s["config"] == config]:
|
||||
star = num(search["r_star"])
|
||||
row = next(
|
||||
(
|
||||
r
|
||||
for r in runs
|
||||
if r["cell"] == search["cell"]
|
||||
and r["phase"] != "fixed"
|
||||
and num(r["rate"]) == star
|
||||
),
|
||||
None,
|
||||
)
|
||||
if row is None:
|
||||
continue
|
||||
for key, _, _ in COMPONENTS:
|
||||
if num(row.get(key)) is not None:
|
||||
values[key].append(num(row[key]))
|
||||
stacks.append(
|
||||
(config, {k: statistics.median(v) if v else 0 for k, v in values.items()})
|
||||
)
|
||||
if not stacks:
|
||||
return
|
||||
top = max(sum(s.values()) for _, s in stacks) or 1
|
||||
svg = Svg(
|
||||
1000, 440, f"CPU компонентов на ступени R* (медиана), ядер: {folder.name}"
|
||||
)
|
||||
svg.scale(0, len(stacks) + 1, 0, top * 1.15)
|
||||
svg.axes("конфигурация", "ядер", [(i + 1, c) for i, (c, _) in enumerate(stacks)])
|
||||
for index, (_, stack) in enumerate(stacks):
|
||||
base = 0.0
|
||||
for key, _, color in COMPONENTS:
|
||||
svg.bar(index + 1, 0.5, base, base + stack[key], color)
|
||||
base += stack[key]
|
||||
for _, name, color in COMPONENTS:
|
||||
svg.legend(name, color)
|
||||
svg.save(folder / "cpu-by-component.svg")
|
||||
|
||||
|
||||
def label_rows(label: str) -> list[dict]:
|
||||
rows = read_csv(SCALING / label / "searches.csv")
|
||||
for row in rows:
|
||||
row["label"] = label
|
||||
return rows
|
||||
|
||||
|
||||
def summarize(rows: list[dict]) -> dict[tuple[str, str], dict]:
|
||||
"""(метка, конфигурация) → медиана, min, max R*, реплик, CPU."""
|
||||
out: dict[tuple[str, str], dict] = {}
|
||||
for row in rows:
|
||||
key = (row["label"], row["config"])
|
||||
entry = out.setdefault(
|
||||
key,
|
||||
{
|
||||
"values": [],
|
||||
"replicas": int(row["replicas"]),
|
||||
"api_cpus": num(row["api_cpus"]),
|
||||
"db_cpus": num(row["db_cpus"]),
|
||||
"signals": {},
|
||||
},
|
||||
)
|
||||
if num(row["r_star"]) is not None:
|
||||
entry["values"].append(num(row["r_star"]))
|
||||
for signal in (row["signals_at_fail"] or "").split(";"):
|
||||
if signal:
|
||||
entry["signals"][signal] = entry["signals"].get(signal, 0) + 1
|
||||
for entry in out.values():
|
||||
values = entry["values"] or [0]
|
||||
entry["median"] = statistics.median(values)
|
||||
entry["min"], entry["max"] = min(values), max(values)
|
||||
return out
|
||||
|
||||
|
||||
def saturation(points: list[tuple[int, float]]) -> int | None:
|
||||
"""Наименьшее k, после которого следующая реплика даёт < +10 % R*."""
|
||||
points = sorted(points)
|
||||
for (k, r), (_, r_next) in zip(points, points[1:], strict=False):
|
||||
if r_next < 1.10 * r:
|
||||
return k
|
||||
return None
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
parser.add_argument("--out", required=True)
|
||||
parser.add_argument("labels", nargs="+")
|
||||
args = parser.parse_args()
|
||||
if not re.fullmatch(r"[A-Za-z0-9._-]{1,48}", args.out):
|
||||
raise SystemExit("--out must be a simple name")
|
||||
rows = [row for label in args.labels for row in label_rows(label)]
|
||||
if not rows:
|
||||
raise SystemExit("no searches.csv in the given labels")
|
||||
stats = summarize(rows)
|
||||
folder = PLOTS / args.out
|
||||
folder.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# R* по конфигурациям всех меток: медиана и min–max
|
||||
items = list(stats.items())
|
||||
top = max(entry["max"] for _, entry in items) or 1
|
||||
svg = Svg(
|
||||
max(1000, 90 * len(items) + 380), 460, "R* по конфигурациям: медиана и min–max"
|
||||
)
|
||||
svg.scale(0, len(items) + 1, 0, top * 1.15)
|
||||
svg.axes(
|
||||
"метка / конфигурация",
|
||||
"R*, запросов/с",
|
||||
[(i + 1, cfg) for i, ((_, cfg), _) in enumerate(items)],
|
||||
)
|
||||
labels = list(dict.fromkeys(label for (label, _), _ in items))
|
||||
for index, ((label, _), entry) in enumerate(items):
|
||||
color = COLORS[labels.index(label) % len(COLORS)]
|
||||
svg.bar(index + 1, 0.55, 0, entry["median"], color)
|
||||
svg.whisker(index + 1, entry["min"], entry["max"], "#222")
|
||||
for label in labels:
|
||||
svg.legend(label, COLORS[labels.index(label) % len(COLORS)])
|
||||
svg.save(folder / "rstar-by-config.svg")
|
||||
|
||||
# R* от числа реплик по 1 CPU — по меткам, где такие конфигурации есть
|
||||
svg = Svg(
|
||||
860, 440, "R* от числа реплик (по 1 CPU): медиана, min–max, линейный рост"
|
||||
)
|
||||
curves = {}
|
||||
for (label, config), entry in items:
|
||||
match = CONFIG_RE.fullmatch(config)
|
||||
if match and float(match.group(2)) == 1.0:
|
||||
curves.setdefault((label, match.group(3) or "2"), []).append(
|
||||
(entry["replicas"], entry)
|
||||
)
|
||||
if curves:
|
||||
max_k = max(k for points in curves.values() for k, _ in points)
|
||||
# линия линейного роста от 1 × 1 тоже должна поместиться
|
||||
ideal = [
|
||||
e["median"] * max_k
|
||||
for points in curves.values()
|
||||
for k, e in points
|
||||
if k == 1
|
||||
]
|
||||
svg.scale(0, max_k + 0.5, 0, max([top, *ideal]) * 1.05)
|
||||
svg.axes("реплик", "R*, запросов/с", [(k, str(k)) for k in range(1, max_k + 1)])
|
||||
for index, ((label, pg), points) in enumerate(sorted(curves.items())):
|
||||
color = COLORS[index % len(COLORS)]
|
||||
points.sort(key=lambda p: p[0])
|
||||
svg.line([(k, e["median"]) for k, e in points], color)
|
||||
for k, entry in points:
|
||||
svg.dot(k, entry["median"], color)
|
||||
svg.whisker(k, entry["min"], entry["max"], color)
|
||||
one = next((e["median"] for k, e in points if k == 1), None)
|
||||
if one:
|
||||
svg.line([(1, one), (max_k, one * max_k)], color, "3 4")
|
||||
svg.legend(f"{label}, PostgreSQL {pg} CPU", color)
|
||||
svg.save(folder / "rstar-by-replicas.svg")
|
||||
|
||||
lines = [
|
||||
f"# Графики трека 1: {args.out}",
|
||||
"",
|
||||
f"Метки: {', '.join(args.labels)}. Числа — `searches.csv` меток.",
|
||||
"",
|
||||
"| Метка | Конфигурация | Реплик | CPU реплики | PostgreSQL CPU | R* медиана | min–max | Эффективность к 1 × 1 метки | Признаки на первой нарушившей |",
|
||||
"|---|---|---|---|---|---|---|---|---|",
|
||||
]
|
||||
for (label, config), entry in items:
|
||||
one = stats.get((label, "1x1"))
|
||||
eff = (
|
||||
f"{entry['median'] / (entry['replicas'] * one['median']):.2f}"
|
||||
if one and one["median"] and config != "1x1"
|
||||
else "—"
|
||||
)
|
||||
signals = (
|
||||
", ".join(f"{k} ×{v}" for k, v in sorted(entry["signals"].items())) or "—"
|
||||
)
|
||||
lines.append(
|
||||
f"| {label} | {config} | {entry['replicas']} | {entry['api_cpus']:g} | "
|
||||
f"{entry['db_cpus']:g} | {entry['median']:g} | {entry['min']:g}–{entry['max']:g} | "
|
||||
f"{eff} | {signals} |"
|
||||
)
|
||||
lines += ["", "## Точка насыщения", ""]
|
||||
for (label, pg), points in sorted(curves.items()):
|
||||
k = saturation([(k, e["median"]) for k, e in points])
|
||||
verdict = (
|
||||
f"после {k} реплик(и) следующая даёт меньше +10 % R*"
|
||||
if k
|
||||
else "в пределах снятых конфигураций рост не останавливается (≥ +10 % на реплику)"
|
||||
)
|
||||
lines.append(f"- {label}, PostgreSQL {pg} CPU: {verdict}.")
|
||||
(folder / "summary.md").write_text("\n".join(lines) + "\n", encoding="utf-8")
|
||||
print(f"written: {folder.relative_to(ROOT)}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+1482
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,952 @@
|
||||
"""Профиль reconcile: набор, план, разбор и сводка без docker. Только stdlib.
|
||||
|
||||
Сам запуск проходов делает `run.py` (профили `reconcile` и
|
||||
`reconcile-quick`), а этот модуль содержит только расчёты без побочных
|
||||
эффектов: модель набора (по номеру и зерну — id, байты и класс
|
||||
объекта), строки CSV метаданных для `COPY`, план проходов кругами,
|
||||
разбор итоговой строки уборщика `reconcile pass finished …`, сверка
|
||||
найденного с моделью, окна фоновой нагрузки, строки `passes.csv` и
|
||||
`windows.csv`, вердикты H1–H5 (гипотезы внесены в `REPORT.md` заранее)
|
||||
и `summary.md`. Проверка без стенда — запуск файла с `--selftest`.
|
||||
|
||||
Этот же модуль импортирует `bench/fill_objects.py` внутри контейнера на
|
||||
образе стенда, поэтому на верхнем уровне допустим только stdlib.
|
||||
"""
|
||||
|
||||
import hashlib
|
||||
import random
|
||||
import re
|
||||
import statistics
|
||||
import sys
|
||||
import uuid
|
||||
from collections.abc import Iterable
|
||||
from dataclasses import dataclass
|
||||
from datetime import UTC, datetime
|
||||
|
||||
# остаток i mod PERIOD задаёт, что сломано у номера i: 0 — в S3 есть файл,
|
||||
# а строки нет; 1 — строка ready есть, файла нет; 2 — size_bytes на 1
|
||||
# больше настоящего; 3 — pending, брошенный вместе с файлом. Каждый класс
|
||||
# занимает 1/400 = 0,25 % набора
|
||||
PERIOD = 400
|
||||
CLASSES = ("orphan_object", "missing_object", "size_mismatch", "stale_pending")
|
||||
# найденное уборщиком (src/services/reconcile.py, KINDS)
|
||||
KINDS = (
|
||||
"orphan_object",
|
||||
"stale_pending",
|
||||
"missing_object",
|
||||
"size_mismatch",
|
||||
"checksum_mismatch",
|
||||
"restored_object",
|
||||
"foreign_object",
|
||||
)
|
||||
# переопределить класс сразу для всего диапазона: либо все номера исправны,
|
||||
# либо у всех нет файла — так строится набор для проверки отказа по пределу
|
||||
FORCE_OK = "ok"
|
||||
FORCE_MISSING = "missing_object"
|
||||
CONTENT_TYPE = "image/png"
|
||||
KIB = 1024
|
||||
MIB = 2**20
|
||||
COPY_COLUMNS = (
|
||||
"id",
|
||||
"chat_id",
|
||||
"owner_id",
|
||||
"filename",
|
||||
"content_type",
|
||||
"size_bytes",
|
||||
"sha256",
|
||||
"object_key",
|
||||
"status",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
)
|
||||
# параметры ячейки: strategy, deep, cpu уборщика ("stand" = 0,25 CPU как на
|
||||
# рабочем стенде, "fast" = 1 CPU для сравнения), rate ("default" берёт
|
||||
# RECONCILE_RATE из настроек, число — явный предел), load и apply
|
||||
CELLS: dict[str, dict] = {
|
||||
"batch": {"strategy": "batch", "deep": False, "cpu": "stand", "rate": 0},
|
||||
"head": {"strategy": "head", "deep": False, "cpu": "stand", "rate": 0},
|
||||
"deep": {"strategy": "batch", "deep": True, "cpu": "stand", "rate": 0},
|
||||
"deep-fast": {"strategy": "batch", "deep": True, "cpu": "fast", "rate": 0},
|
||||
"load-stand": {"strategy": "batch", "cpu": "stand", "rate": "default", "load": 1},
|
||||
"load-unlimited": {"strategy": "batch", "cpu": "stand", "rate": 0, "load": 1},
|
||||
"load-fast": {"strategy": "batch", "cpu": "fast", "rate": 0, "load": 1},
|
||||
"load-fast-limited": {
|
||||
"strategy": "batch",
|
||||
"cpu": "fast",
|
||||
"rate": "default",
|
||||
"load": 1,
|
||||
},
|
||||
# отказ по пределу: --apply --max-changes 100 при 1 000 кандидатов
|
||||
"refuse": {"strategy": "batch", "cpu": "stand", "rate": 0, "apply": 1},
|
||||
}
|
||||
LOAD_CELLS = ("load-stand", "load-unlimited", "load-fast", "load-fast-limited")
|
||||
LIMITED_LOAD = ("load-stand", "load-fast-limited")
|
||||
WINDOWS = ("before", "pass", "after")
|
||||
LOAD_KINDS = ("download", "write", "read")
|
||||
FINISHED = "reconcile pass finished"
|
||||
S3_OPERATIONS = ("list", "head", "get", "delete")
|
||||
PHASES = ("list", "rows", "stale", "recheck", "act")
|
||||
ACTIONS = ("cleared_lost", "deleted_object", "marked_lost", "removed_pending")
|
||||
# пороги гипотез — до замеров (REPORT.md, «Трек 2: гипотезы»)
|
||||
H1_SPREAD = 0.30
|
||||
H1_BYTES_PER_KEY = 300
|
||||
H2_TIME_RATIO = 5
|
||||
H2_RSS_GROWTH_MIB = 5
|
||||
H3_DEEP_RATIO = 5
|
||||
H3_FAST_RATIO = 1.5
|
||||
H4_THRESHOLD = 1.5
|
||||
H4_RATE_SHARE = 0.9
|
||||
H5_SPREAD = 0.20
|
||||
|
||||
PASS_COLUMNS = (
|
||||
"pass",
|
||||
"stage",
|
||||
"cell",
|
||||
"repeat",
|
||||
"order",
|
||||
"n",
|
||||
"size",
|
||||
"strategy",
|
||||
"deep",
|
||||
"apply",
|
||||
"rate",
|
||||
"cleaner_cpus",
|
||||
"nano_cpus",
|
||||
"exit_code",
|
||||
"refused",
|
||||
"listed_objects",
|
||||
"checked_rows",
|
||||
*(f"found_{kind}" for kind in KINDS),
|
||||
*(f"fixed_{action}" for action in ACTIONS),
|
||||
"remaining",
|
||||
*(f"s3_{op}" for op in S3_OPERATIONS),
|
||||
"listed_keys",
|
||||
"read_bytes",
|
||||
"db_queries",
|
||||
*(f"phase_{name}_ms" for name in PHASES),
|
||||
"cpu_ms",
|
||||
"maxrss_kib",
|
||||
"took_ms",
|
||||
"ms_per_1k",
|
||||
"cpu_share",
|
||||
"touched_per_s",
|
||||
"s3_cpu_cores",
|
||||
"db_cpu_cores",
|
||||
"api_cpu_cores",
|
||||
"model_ok",
|
||||
"flags",
|
||||
)
|
||||
WINDOW_COLUMNS = (
|
||||
"pass",
|
||||
"cell",
|
||||
"repeat",
|
||||
"window",
|
||||
"kind",
|
||||
"seconds",
|
||||
"requests",
|
||||
"ok",
|
||||
"errors",
|
||||
"errors_5xx",
|
||||
"p50_ms",
|
||||
"p95_ms",
|
||||
"p99_ms",
|
||||
"ratio_p95",
|
||||
)
|
||||
|
||||
|
||||
# --- набор ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def object_class(index: int, force: str | None = None) -> str | None:
|
||||
"""Какое расхождение заложено в номер `index` (None — никакого)."""
|
||||
if force == FORCE_OK:
|
||||
return None
|
||||
if force is not None:
|
||||
return force
|
||||
slot = index % PERIOD
|
||||
return CLASSES[slot] if slot < len(CLASSES) else None
|
||||
|
||||
|
||||
def object_id(seed: int, index: int) -> str:
|
||||
"""Детерминированный id: первые 16 байт SHA-256 от `<зерно>:<номер>` как UUID4."""
|
||||
digest = hashlib.sha256(f"{seed}:{index}".encode()).digest()
|
||||
return str(uuid.UUID(bytes=digest[:16], version=4))
|
||||
|
||||
|
||||
def content(seed: int, index: int, size: int) -> bytes:
|
||||
"""Байты объекта: 32-байтный хэш от `<зерно>:<номер>:c`, размноженный до `size`."""
|
||||
block = hashlib.sha256(f"{seed}:{index}:c".encode()).digest()
|
||||
return (block * (size // len(block) + 1))[:size]
|
||||
|
||||
|
||||
def object_key(namespace: str, attachment_id: str) -> str:
|
||||
"""Ключ оригинала — как `AttachmentObjects.key_of` (src/storage/objects.py)."""
|
||||
return f"{namespace}/attachments/{attachment_id}/original"
|
||||
|
||||
|
||||
def has_object(kind: str | None) -> bool:
|
||||
return kind != "missing_object"
|
||||
|
||||
|
||||
def has_row(kind: str | None) -> bool:
|
||||
return kind != "orphan_object"
|
||||
|
||||
|
||||
def object_indices(start: int, end: int, force: str | None = None) -> list[int]:
|
||||
"""Какие номера из [start, end) загрузчик должен положить в S3."""
|
||||
return [i for i in range(start, end) if has_object(object_class(i, force))]
|
||||
|
||||
|
||||
def rows_csv(
|
||||
*,
|
||||
seed: int,
|
||||
start: int,
|
||||
end: int,
|
||||
size: int,
|
||||
namespace: str,
|
||||
chat_id: str,
|
||||
owner_id: str,
|
||||
created_at: str,
|
||||
force: str | None = None,
|
||||
) -> str:
|
||||
"""CSV для `COPY attachments` по колонкам COPY_COLUMNS. Статус `ready`
|
||||
получают согласованные номера, номера «нет объекта» и «не тот размер»
|
||||
(у последних `size_bytes` завышен на 1); зависшая загрузка идёт как
|
||||
`pending`, а для «объекта без строки» строка не пишется вовсе.
|
||||
SHA-256 считается от тех же байт, которые запишет загрузчик."""
|
||||
lines = []
|
||||
for index in range(start, end):
|
||||
kind = object_class(index, force)
|
||||
if not has_row(kind):
|
||||
continue
|
||||
attachment_id = object_id(seed, index)
|
||||
digest = hashlib.sha256(content(seed, index, size)).hexdigest()
|
||||
size_bytes = size + 1 if kind == "size_mismatch" else size
|
||||
status = "pending" if kind == "stale_pending" else "ready"
|
||||
lines.append(
|
||||
",".join(
|
||||
(
|
||||
attachment_id,
|
||||
chat_id,
|
||||
owner_id,
|
||||
f"bench-{index}.png",
|
||||
CONTENT_TYPE,
|
||||
str(size_bytes),
|
||||
f"\\x{digest}",
|
||||
object_key(namespace, attachment_id),
|
||||
status,
|
||||
created_at,
|
||||
created_at,
|
||||
),
|
||||
),
|
||||
)
|
||||
return "\n".join(lines) + ("\n" if lines else "")
|
||||
|
||||
|
||||
def class_count(n: int, slot: int) -> int:
|
||||
"""Число номеров из range(n), попадающих в остаток `slot` по PERIOD."""
|
||||
return n // PERIOD + (1 if n % PERIOD > slot else 0)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Model:
|
||||
"""Что должна увидеть сверка: сколько файлов в S3, строк каждого
|
||||
статуса, расхождений каждого класса и полностью исправных пар."""
|
||||
|
||||
objects: int
|
||||
ready_rows: int
|
||||
pending_rows: int
|
||||
found: dict[str, int]
|
||||
consistent: int
|
||||
|
||||
@property
|
||||
def candidates(self) -> int:
|
||||
return sum(self.found.values())
|
||||
|
||||
|
||||
def model(n: int, *, clean: int = 0, missing: int = 0) -> Model:
|
||||
"""Набор из `n` объектов с классами по номеру; набор отказа по пределу
|
||||
— `clean` согласованных и `missing` строк без объекта."""
|
||||
if clean or missing:
|
||||
return Model(
|
||||
objects=clean,
|
||||
ready_rows=clean + missing,
|
||||
pending_rows=0,
|
||||
found={"missing_object": missing} if missing else {},
|
||||
consistent=clean,
|
||||
)
|
||||
found = {kind: class_count(n, slot) for slot, kind in enumerate(CLASSES)}
|
||||
return Model(
|
||||
objects=n - found["missing_object"],
|
||||
ready_rows=n - found["orphan_object"] - found["stale_pending"],
|
||||
pending_rows=found["stale_pending"],
|
||||
found={kind: count for kind, count in found.items() if count},
|
||||
consistent=n - sum(found.values()),
|
||||
)
|
||||
|
||||
|
||||
def downloads(seed: int, n: int, count: int) -> list[str]:
|
||||
"""Случайная (по зерну) выборка исправных вложений, которые будет качать фон."""
|
||||
pool = [i for i in range(n) if object_class(i) is None]
|
||||
chosen = random.Random(seed).sample(pool, min(count, len(pool)))
|
||||
return [object_id(seed, i) for i in chosen]
|
||||
|
||||
|
||||
# --- план --------------------------------------------------------------------------
|
||||
|
||||
|
||||
def plan_passes(
|
||||
stages: Iterable[tuple[str, tuple[str, ...]]], repeats: int, seed: int
|
||||
) -> list[dict]:
|
||||
"""Расписание проходов. Каждый этап повторяется `repeats` кругами; в
|
||||
круге ячейки перемешаны `Random(seed + 100 × номер этапа + r)`, и
|
||||
новый круг не стартует той ячейкой, на которой закончился предыдущий."""
|
||||
plan: list[dict] = []
|
||||
for stage_no, (stage, cells) in enumerate(stages):
|
||||
previous = None
|
||||
for round_no in range(1, repeats + 1):
|
||||
order = list(range(len(cells)))
|
||||
random.Random(seed + stage_no * 100 + round_no).shuffle(order)
|
||||
if len(order) > 1 and order[0] == previous:
|
||||
order[0], order[1] = order[1], order[0]
|
||||
for index in order:
|
||||
cell = cells[index]
|
||||
plan.append(
|
||||
{
|
||||
"pass": f"{stage}-{cell}-r{round_no}",
|
||||
"stage": stage,
|
||||
"cell": cell,
|
||||
"repeat": round_no,
|
||||
"order": len(plan) + 1,
|
||||
},
|
||||
)
|
||||
previous = order[-1]
|
||||
return plan
|
||||
|
||||
|
||||
# --- разбор ------------------------------------------------------------------------
|
||||
|
||||
|
||||
_PAIR = re.compile(r"(\w+)=(\S*)")
|
||||
|
||||
|
||||
def _value(text: str) -> object:
|
||||
if text in ("true", "false"):
|
||||
return text == "true"
|
||||
if text == "None":
|
||||
return None
|
||||
if text.endswith("ms") and text[:-2].isdigit():
|
||||
return int(text[:-2])
|
||||
try:
|
||||
return int(text)
|
||||
except ValueError:
|
||||
pass
|
||||
try:
|
||||
return float(text)
|
||||
except ValueError:
|
||||
return text
|
||||
|
||||
|
||||
def parse_finished(log: str) -> dict | None:
|
||||
"""Итог прохода из журнала уборщика: время строки (секунды эпохи, часы
|
||||
ВМ) и поля `key=value`; `took` — в мс. Нет строки — `None`."""
|
||||
for line in reversed(log.splitlines()):
|
||||
if FINISHED not in line:
|
||||
continue
|
||||
stamp = line.split(" ", 1)[0]
|
||||
fields = {
|
||||
key: _value(value)
|
||||
for key, value in _PAIR.findall(line.split(FINISHED, 1)[1])
|
||||
}
|
||||
fields["ts"] = parse_log_time(stamp)
|
||||
fields["took_ms"] = fields.pop("took", None)
|
||||
return fields
|
||||
return None
|
||||
|
||||
|
||||
def parse_log_time(stamp: str) -> float:
|
||||
"""`2026-10-23T12:00:00.123Z` (src/log.py) → секунды эпохи."""
|
||||
moment = datetime.strptime(stamp, "%Y-%m-%dT%H:%M:%S.%fZ")
|
||||
return moment.replace(tzinfo=UTC).timestamp()
|
||||
|
||||
|
||||
def found_problems(fields: dict, expected: Model, *, deep: bool) -> list[str]:
|
||||
"""Расхождения итога прохода с моделью набора: класс, найдено, ожидалось."""
|
||||
problems = []
|
||||
for kind in KINDS:
|
||||
want = expected.found.get(kind, 0)
|
||||
got = fields.get(f"found_{kind}", 0)
|
||||
if kind == "checksum_mismatch" and not deep:
|
||||
want = 0
|
||||
if got != want:
|
||||
problems.append(f"found_{kind}={got} expected={want}")
|
||||
for name, want in (
|
||||
("listed_objects", expected.objects),
|
||||
("checked_rows", expected.ready_rows),
|
||||
):
|
||||
if fields.get(name) != want:
|
||||
problems.append(f"{name}={fields.get(name)} expected={want}")
|
||||
return problems
|
||||
|
||||
|
||||
def touched(fields: dict) -> int:
|
||||
"""Объектов S3, затронутых проходом: ключи списка и вызовы на объект."""
|
||||
return int(fields.get("listed_keys") or 0) + sum(
|
||||
int(fields.get(f"s3_{op}") or 0) for op in ("head", "get", "delete")
|
||||
)
|
||||
|
||||
|
||||
def pass_row(
|
||||
item: dict,
|
||||
*,
|
||||
n: int,
|
||||
size: int,
|
||||
cell: dict,
|
||||
cleaner_cpus: float,
|
||||
rate: float,
|
||||
fields: dict | None,
|
||||
exit_code: int | None,
|
||||
nano_cpus: int | None,
|
||||
usage: dict,
|
||||
problems: list[str],
|
||||
extra_flags: Iterable[str] = (),
|
||||
) -> dict:
|
||||
"""Строка `passes.csv`. Пометки: `no_result` — итоговой строки нет,
|
||||
`model` — найденное разошлось с моделью, `cpu_limit` — лимит CPU
|
||||
контейнера прохода не тот, `exit` — неожиданный код выхода;
|
||||
`extra_flags` — от оркестратора (`bg_dropped` — генератор фоновой
|
||||
нагрузки не отправил часть запросов по расписанию)."""
|
||||
fields = fields or {}
|
||||
took = fields.get("took_ms")
|
||||
cpu = fields.get("cpu_ms")
|
||||
flags = list(extra_flags)
|
||||
if not fields:
|
||||
flags.append("no_result")
|
||||
if problems:
|
||||
flags.append("model")
|
||||
if nano_cpus is not None and nano_cpus != round(cleaner_cpus * 1e9):
|
||||
flags.append("cpu_limit")
|
||||
# в каждом наборе профиля расхождения есть: dry-run и отказ — код 3
|
||||
if exit_code != 3:
|
||||
flags.append("exit")
|
||||
return {
|
||||
**{key: item[key] for key in ("pass", "stage", "cell", "repeat", "order")},
|
||||
"n": n,
|
||||
"size": size,
|
||||
"strategy": cell["strategy"],
|
||||
"deep": bool(cell.get("deep")),
|
||||
"apply": bool(cell.get("apply")),
|
||||
"rate": rate,
|
||||
"cleaner_cpus": cleaner_cpus,
|
||||
"nano_cpus": nano_cpus,
|
||||
"exit_code": exit_code,
|
||||
**{
|
||||
key: fields.get(key)
|
||||
for key in PASS_COLUMNS
|
||||
if key.startswith(("found_", "fixed_", "s3_", "phase_"))
|
||||
and key not in ("s3_cpu_cores",)
|
||||
},
|
||||
"refused": fields.get("refused"),
|
||||
"listed_objects": fields.get("listed_objects"),
|
||||
"checked_rows": fields.get("checked_rows"),
|
||||
"remaining": fields.get("remaining"),
|
||||
"listed_keys": fields.get("listed_keys"),
|
||||
"read_bytes": fields.get("read_bytes"),
|
||||
"db_queries": fields.get("db_queries"),
|
||||
"cpu_ms": cpu,
|
||||
"maxrss_kib": fields.get("maxrss_kib"),
|
||||
"took_ms": took,
|
||||
"ms_per_1k": round(took / n * 1000, 2) if took is not None and n else None,
|
||||
"cpu_share": round(cpu / took, 3) if cpu is not None and took else None,
|
||||
"touched_per_s": (
|
||||
round(touched(fields) / took * 1000, 1) if fields and took else None
|
||||
),
|
||||
"s3_cpu_cores": usage.get("s3_cpu_cores"),
|
||||
"db_cpu_cores": usage.get("db_cpu_cores"),
|
||||
"api_cpu_cores": usage.get("api_cpu_cores"),
|
||||
"model_ok": not problems,
|
||||
"flags": " ".join(flags + [f"model:{p}" for p in problems[:3]]),
|
||||
}
|
||||
|
||||
|
||||
# --- фоновая нагрузка --------------------------------------------------------------
|
||||
|
||||
|
||||
def window_rows(
|
||||
item: dict,
|
||||
requests: list,
|
||||
bounds: dict[str, tuple[float, float]],
|
||||
stats_fn,
|
||||
) -> list[dict]:
|
||||
"""Строки `windows.csv` прохода под нагрузкой: окно × вид запроса;
|
||||
`ratio_p95` у окна `pass` — p95 прохода / p95 тихих окон (до и после
|
||||
вместе). `stats_fn` — `analysis.window_stats`, `bounds` — мс эпохи."""
|
||||
rows = []
|
||||
for kind in LOAD_KINDS:
|
||||
of_kind = [r for r in requests if r.kind == kind]
|
||||
quiet = [
|
||||
r
|
||||
for name in ("before", "after")
|
||||
for r in of_kind
|
||||
if bounds[name][0] <= r.scheduled < bounds[name][1]
|
||||
]
|
||||
quiet_p95 = stats_fn(quiet, 0, float("inf"))["p95_ms"] if quiet else None
|
||||
for window in WINDOWS:
|
||||
start, end = bounds[window]
|
||||
stats = stats_fn(of_kind, start, end)
|
||||
ratio = None
|
||||
if window == "pass" and stats["p95_ms"] and quiet_p95:
|
||||
ratio = round(stats["p95_ms"] / quiet_p95, 3)
|
||||
rows.append(
|
||||
{
|
||||
"pass": item["pass"],
|
||||
"cell": item["cell"],
|
||||
"repeat": item["repeat"],
|
||||
"window": window,
|
||||
"kind": kind,
|
||||
"seconds": stats["seconds"],
|
||||
"requests": stats["requests"],
|
||||
"ok": stats["ok"],
|
||||
"errors": stats["errors"],
|
||||
"errors_5xx": sum(
|
||||
count
|
||||
for label, count in stats["error_kinds"].items()
|
||||
if label.startswith("5")
|
||||
),
|
||||
"p50_ms": stats["p50_ms"],
|
||||
"p95_ms": stats["p95_ms"],
|
||||
"p99_ms": stats["p99_ms"],
|
||||
"ratio_p95": ratio,
|
||||
},
|
||||
)
|
||||
return rows
|
||||
|
||||
|
||||
# --- вердикты ----------------------------------------------------------------------
|
||||
|
||||
|
||||
CONFIRMED = "подтверждена"
|
||||
REFUTED = "опровергнута"
|
||||
UNTESTED = "нет данных"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Verdict:
|
||||
hypothesis: str
|
||||
result: str
|
||||
numbers: str
|
||||
|
||||
|
||||
def num(value) -> float | None:
|
||||
if value is None or value == "":
|
||||
return None
|
||||
try:
|
||||
return float(value)
|
||||
except (TypeError, ValueError):
|
||||
return None
|
||||
|
||||
|
||||
def med(values: Iterable) -> float | None:
|
||||
present = [v for v in (num(x) for x in values) if v is not None]
|
||||
return statistics.median(present) if present else None
|
||||
|
||||
|
||||
def spread(values: Iterable, digits: int = 0) -> str:
|
||||
present = [v for v in (num(x) for x in values) if v is not None]
|
||||
if not present:
|
||||
return "—"
|
||||
mid = statistics.median(present)
|
||||
if len(present) == 1:
|
||||
return f"{mid:.{digits}f}"
|
||||
return f"{mid:.{digits}f} ({min(present):.{digits}f}–{max(present):.{digits}f})"
|
||||
|
||||
|
||||
def fmt(value: float | None, digits: int = 2) -> str:
|
||||
return "—" if value is None else f"{value:.{digits}f}"
|
||||
|
||||
|
||||
def cell_rows(passes: list[dict], stage: str, cell: str) -> list[dict]:
|
||||
return [
|
||||
p
|
||||
for p in passes
|
||||
if p["stage"] == stage and p["cell"] == cell and not p.get("flags")
|
||||
]
|
||||
|
||||
|
||||
def cell_median(passes: list[dict], stage: str, cell: str, column: str) -> float | None:
|
||||
return med(p.get(column) for p in cell_rows(passes, stage, cell))
|
||||
|
||||
|
||||
def verdict_h1(stages: dict[str, dict], passes: list[dict]) -> Verdict:
|
||||
"""batch линейна: мс на 1 000 объектов по этапам 4 KiB — в пределах
|
||||
±30 %, рост RSS ≤ 300 байт на ключ."""
|
||||
# ряд по N — наборы с классами по номеру; набор отказа по пределу
|
||||
# (строки без объекта сверх набора) — другая модель, в ряд не идёт
|
||||
small = [
|
||||
s
|
||||
for s, info in stages.items()
|
||||
if info["size"] <= 64 * KIB and not info.get("missing")
|
||||
]
|
||||
per_k = {s: cell_median(passes, s, "batch", "ms_per_1k") for s in small}
|
||||
rss = {s: cell_median(passes, s, "batch", "maxrss_kib") for s in small}
|
||||
present = {s: v for s, v in per_k.items() if v}
|
||||
if len(present) < 2:
|
||||
return Verdict("H1", UNTESTED, "нужно ≥ 2 этапов batch с 4 KiB")
|
||||
low, high = min(present.values()), max(present.values())
|
||||
spread_ok = high / low - 1 <= H1_SPREAD
|
||||
first = min(present, key=lambda s: stages[s]["n"])
|
||||
last = max(present, key=lambda s: stages[s]["n"])
|
||||
keys = stages[last]["n"] - stages[first]["n"]
|
||||
growth = None
|
||||
if rss.get(first) and rss.get(last) and keys > 0:
|
||||
growth = (rss[last] - rss[first]) * 1024 / keys
|
||||
rss_ok = growth is not None and growth <= H1_BYTES_PER_KEY
|
||||
numbers = (
|
||||
"мс на 1 000 объектов: "
|
||||
+ ", ".join(f"{stages[s]['n']} — {fmt(v)}" for s, v in present.items())
|
||||
+ f" (разброс {high / low - 1:.0%}, порог {H1_SPREAD:.0%}); рост RSS "
|
||||
f"{fmt(growth, 0)} Б на ключ ({stages[first]['n']} → {stages[last]['n']}, "
|
||||
f"порог {H1_BYTES_PER_KEY})"
|
||||
)
|
||||
return Verdict("H1", CONFIRMED if spread_ok and rss_ok else REFUTED, numbers)
|
||||
|
||||
|
||||
def verdict_h2(stages: dict[str, dict], passes: list[dict]) -> Verdict:
|
||||
"""head: время ≥ 5 × batch на тех же N, запросов к БД не меньше
|
||||
объектов, RSS почти не растёт."""
|
||||
parts, checks = [], []
|
||||
rss = {}
|
||||
for stage, info in stages.items():
|
||||
head = cell_median(passes, stage, "head", "took_ms")
|
||||
batch = cell_median(passes, stage, "batch", "took_ms")
|
||||
if not head or not batch:
|
||||
continue
|
||||
queries = cell_median(passes, stage, "head", "db_queries")
|
||||
listed = cell_median(passes, stage, "head", "listed_objects")
|
||||
rss[info["n"]] = cell_median(passes, stage, "head", "maxrss_kib")
|
||||
ratio = head / batch
|
||||
checks.append(ratio >= H2_TIME_RATIO)
|
||||
checks.append(queries is not None and listed is not None and queries >= listed)
|
||||
parts.append(
|
||||
f"N={info['n']}: head {head:.0f} мс / batch {batch:.0f} мс = "
|
||||
f"{ratio:.1f}×, запросов БД {fmt(queries, 0)} на {fmt(listed, 0)} объектов"
|
||||
)
|
||||
if not parts:
|
||||
return Verdict("H2", UNTESTED, "нет пар head и batch")
|
||||
present = {n: v for n, v in rss.items() if v}
|
||||
if len(present) >= 2:
|
||||
growth = (present[max(present)] - present[min(present)]) / 1024
|
||||
checks.append(growth <= H2_RSS_GROWTH_MIB)
|
||||
parts.append(
|
||||
f"рост RSS head {min(present)} → {max(present)}: {growth:.1f} MiB "
|
||||
f"(порог {H2_RSS_GROWTH_MIB})"
|
||||
)
|
||||
return Verdict("H2", CONFIRMED if all(checks) else REFUTED, "; ".join(parts))
|
||||
|
||||
|
||||
def verdict_h3(
|
||||
stages: dict[str, dict], passes: list[dict], models: dict[str, Model]
|
||||
) -> Verdict:
|
||||
"""deep: прочитано ровно согласованные × размер; на 1 MiB — ≥ 5 × batch;
|
||||
1 CPU быстрее 0,25 CPU ≥ 1,5 раза."""
|
||||
parts, checks = [], []
|
||||
for stage, info in stages.items():
|
||||
rows = cell_rows(passes, stage, "deep") + cell_rows(passes, stage, "deep-fast")
|
||||
if not rows:
|
||||
continue
|
||||
want = models[stage].consistent * info["size"]
|
||||
exact = all(int(num(r["read_bytes"]) or -1) == want for r in rows)
|
||||
checks.append(exact)
|
||||
parts.append(
|
||||
f"N={info['n']} × {info['size'] // KIB} KiB: read_bytes = {want} "
|
||||
f"{'во всех' if exact else 'не во всех'} {len(rows)} проходах"
|
||||
)
|
||||
if info["size"] >= MIB:
|
||||
deep = cell_median(passes, stage, "deep", "took_ms")
|
||||
batch = cell_median(passes, stage, "batch", "took_ms")
|
||||
fast = cell_median(passes, stage, "deep-fast", "took_ms")
|
||||
share = cell_median(passes, stage, "deep", "cpu_share")
|
||||
if deep and batch:
|
||||
checks.append(deep / batch >= H3_DEEP_RATIO)
|
||||
parts.append(
|
||||
f"deep / batch = {deep / batch:.1f}× (порог {H3_DEEP_RATIO})"
|
||||
)
|
||||
if deep and fast:
|
||||
checks.append(deep / fast >= H3_FAST_RATIO)
|
||||
parts.append(
|
||||
f"0,25 CPU / 1 CPU = {deep / fast:.2f}× (порог {H3_FAST_RATIO}), "
|
||||
f"CPU уборщика / время при 0,25 CPU = {fmt(share)}"
|
||||
)
|
||||
if not parts:
|
||||
return Verdict("H3", UNTESTED, "нет глубоких проходов")
|
||||
return Verdict("H3", CONFIRMED if all(checks) else REFUTED, "; ".join(parts))
|
||||
|
||||
|
||||
def verdict_h4(passes: list[dict], windows: list[dict]) -> Verdict:
|
||||
"""Под нагрузкой: с пределом скорости p95 скачиваний в проходе ≤ 1,5 ×
|
||||
тихих, 5xx нет; предел соблюдён (затронуто/с ≤ предела / 0,9); без
|
||||
предела при 1 CPU отношение больше, чем с ним."""
|
||||
ratios: dict[str, float | None] = {}
|
||||
for cell in LOAD_CELLS:
|
||||
ratios[cell] = med(
|
||||
w["ratio_p95"]
|
||||
for w in windows
|
||||
if w["cell"] == cell and w["window"] == "pass" and w["kind"] == "download"
|
||||
)
|
||||
if not any(ratios.values()):
|
||||
return Verdict("H4", UNTESTED, "нет проходов под нагрузкой")
|
||||
fives = sum(int(num(w["errors_5xx"]) or 0) for w in windows)
|
||||
# генератор не успевал по расписанию — отношение p95 не о сверке
|
||||
dropped = sum("bg_dropped" in str(p.get("flags") or "") for p in passes)
|
||||
checks = [fives == 0, dropped == 0]
|
||||
for cell in LIMITED_LOAD:
|
||||
if ratios.get(cell) is not None:
|
||||
checks.append(ratios[cell] <= H4_THRESHOLD)
|
||||
rates = []
|
||||
for p in passes:
|
||||
if p["cell"] in LIMITED_LOAD and num(p.get("rate")):
|
||||
observed = num(p.get("touched_per_s"))
|
||||
rates.append(observed)
|
||||
checks.append(
|
||||
observed is not None and observed <= num(p["rate"]) / H4_RATE_SHARE
|
||||
)
|
||||
if ratios.get("load-fast") and ratios.get("load-fast-limited"):
|
||||
checks.append(ratios["load-fast"] > ratios["load-fast-limited"])
|
||||
numbers = (
|
||||
"p95 скачиваний в проходе / в тихих окнах: "
|
||||
+ ", ".join(f"{cell} {fmt(value)}" for cell, value in ratios.items())
|
||||
+ f" (порог для ячеек с пределом {H4_THRESHOLD}); 5xx во всех окнах: {fives}; "
|
||||
f"проходов с bg_dropped: {dropped}; затронуто объектов/с с пределом: "
|
||||
f"{', '.join(fmt(r, 0) for r in rates) or '—'}"
|
||||
)
|
||||
return Verdict("H4", CONFIRMED if all(checks) else REFUTED, numbers)
|
||||
|
||||
|
||||
def verdict_h5(passes: list[dict]) -> Verdict:
|
||||
"""Отказ по пределу ничего не меняет и стоит как dry-run того же набора."""
|
||||
stage = next((p["stage"] for p in passes if p["cell"] == "refuse"), None)
|
||||
if stage is None:
|
||||
return Verdict("H5", UNTESTED, "нет проходов отказа")
|
||||
refuse = [p for p in passes if p["stage"] == stage and p["cell"] == "refuse"]
|
||||
fixed = sum(
|
||||
int(num(p.get(f"fixed_{action}")) or 0) for p in refuse for action in ACTIONS
|
||||
)
|
||||
codes = sorted({p.get("exit_code") for p in refuse}, key=str)
|
||||
refused = all(p.get("refused") in (True, "True") for p in refuse)
|
||||
took_r = cell_median(passes, stage, "refuse", "took_ms")
|
||||
took_d = cell_median(passes, stage, "batch", "took_ms")
|
||||
calls = {
|
||||
cell: cell_median(passes, stage, cell, "s3_head")
|
||||
for cell in ("refuse", "batch")
|
||||
}
|
||||
checks = [fixed == 0, refused, codes == [3]]
|
||||
numbers = (
|
||||
f"исправлено {fixed}, коды {codes}, refused во всех: {refused}; время "
|
||||
f"отказа {fmt(took_r, 0)} мс / dry-run {fmt(took_d, 0)} мс; HEAD "
|
||||
f"{fmt(calls['refuse'], 0)} / {fmt(calls['batch'], 0)}"
|
||||
)
|
||||
if took_r and took_d:
|
||||
checks.append(abs(took_r / took_d - 1) <= H5_SPREAD)
|
||||
checks.append(calls["refuse"] is not None and calls["refuse"] == calls["batch"])
|
||||
return Verdict("H5", CONFIRMED if all(checks) else REFUTED, numbers)
|
||||
|
||||
|
||||
# --- сводка ------------------------------------------------------------------------
|
||||
|
||||
|
||||
def render_summary(
|
||||
meta: dict,
|
||||
passes: list[dict],
|
||||
windows: list[dict],
|
||||
verdicts: list[Verdict],
|
||||
) -> str:
|
||||
profile = meta["profile"]
|
||||
lines = [
|
||||
f"# Сверка bucket и БД: метка `{meta['label']}`",
|
||||
"",
|
||||
f"- Статус: **{'прерван: ' + meta['aborted'] if meta.get('aborted') else 'готово'}**",
|
||||
f"- Код (`src_sha256` образа): `{meta.get('code', {}).get('src_sha256', '—')}`",
|
||||
f"- Профиль `{profile['name']}`: повторов {profile['repeats']}, уборщик "
|
||||
f"{profile['cleaner_cpus']} CPU (управляемый опыт — {profile['fast_cpus']}), "
|
||||
f"предел скорости по умолчанию {profile['default_rate']:g} объектов/с, "
|
||||
f"grace прохода {profile['grace_s']} с, страница {profile['page_size']}",
|
||||
f"- Фоновая нагрузка (H4): скачиваний {profile['load_download_rate']:g}/с, "
|
||||
f"записей {profile['load_write_rate']:g}/с, чтений {profile['load_read_rate']:g}/с; "
|
||||
f"тихие окна {profile['quiet_s']:g} с до и после прохода",
|
||||
"- Значения — медиана (min–max) повторов. Стоимость — итоговая строка "
|
||||
"уборщика (счётчики клиента S3, запросы к БД, `cpu_ms` — CPU самого "
|
||||
"прохода без старта процесса, `maxrss_kib` — пик RSS процесса); CPU S3, "
|
||||
"PostgreSQL и реплик — сэмплер за окно прохода. LIST включает проверку "
|
||||
"bucket перед каждым «объекта нет» (список с одним ключом)",
|
||||
"",
|
||||
"## Проходы",
|
||||
"",
|
||||
"| Этап | N | Размер | Ячейка | Время, мс | мс на 1 000 | LIST | HEAD | GET "
|
||||
"| Запросов БД | Прочитано, MiB | CPU, мс | RSS, MiB | S3 CPU | Пометки |",
|
||||
"|---|---:|---:|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|",
|
||||
]
|
||||
seen: list[tuple[str, str]] = []
|
||||
for p in passes:
|
||||
key = (p["stage"], p["cell"])
|
||||
if key not in seen:
|
||||
seen.append(key)
|
||||
for stage, cell in seen:
|
||||
rows = [p for p in passes if p["stage"] == stage and p["cell"] == cell]
|
||||
first = rows[0]
|
||||
flags = sorted({f for r in rows for f in str(r.get("flags") or "").split()})
|
||||
lines.append(
|
||||
f"| {stage} | {first['n']} | {int(first['size']) // KIB} KiB | {cell} | "
|
||||
f"{spread(r['took_ms'] for r in rows)} | "
|
||||
f"{spread((r['ms_per_1k'] for r in rows), 2)} | "
|
||||
f"{spread(r['s3_list'] for r in rows)} | {spread(r['s3_head'] for r in rows)} | "
|
||||
f"{spread(r['s3_get'] for r in rows)} | {spread(r['db_queries'] for r in rows)} | "
|
||||
f"{spread(((num(r['read_bytes']) or 0) / MIB for r in rows), 1)} | "
|
||||
f"{spread(r['cpu_ms'] for r in rows)} | "
|
||||
f"{spread(((num(r['maxrss_kib']) or 0) / 1024 for r in rows), 1)} | "
|
||||
f"{spread((r['s3_cpu_cores'] for r in rows), 2)} | {' '.join(flags) or '—'} |"
|
||||
)
|
||||
if windows:
|
||||
lines += [
|
||||
"",
|
||||
"## Фоновая нагрузка",
|
||||
"",
|
||||
"| Ячейка | Окно | Скачиваний | p95 скачиваний, мс | p95 записи, мс | "
|
||||
"Ошибок | p95 прохода / тихих |",
|
||||
"|---|---|---:|---:|---:|---:|---:|",
|
||||
]
|
||||
for cell in LOAD_CELLS:
|
||||
for window in WINDOWS:
|
||||
rows = [
|
||||
w for w in windows if w["cell"] == cell and w["window"] == window
|
||||
]
|
||||
if not rows:
|
||||
continue
|
||||
down = [w for w in rows if w["kind"] == "download"]
|
||||
write = [w for w in rows if w["kind"] == "write"]
|
||||
lines.append(
|
||||
f"| {cell} | {window} | {spread(w['requests'] for w in down)} | "
|
||||
f"{spread((w['p95_ms'] for w in down), 1)} | "
|
||||
f"{spread((w['p95_ms'] for w in write), 1)} | "
|
||||
f"{sum(int(num(w['errors']) or 0) for w in rows)} | "
|
||||
f"{spread((w['ratio_p95'] for w in down), 2) if window == 'pass' else '—'} |"
|
||||
)
|
||||
lines += [
|
||||
"",
|
||||
"## Гипотезы",
|
||||
"",
|
||||
"Тексты и пороги — `REPORT.md`, «Трек 2: гипотезы» (записаны до замеров). "
|
||||
"Итог по числам этой метки; вывод — в `REPORT.md`.",
|
||||
"",
|
||||
"| Гипотеза | Итог | Числа |",
|
||||
"|---|---|---|",
|
||||
]
|
||||
lines += [f"| {v.hypothesis} | {v.result} | {v.numbers} |" for v in verdicts]
|
||||
warnings = meta.get("host_warnings") or []
|
||||
if warnings:
|
||||
lines += ["", "## Предупреждения о хосте", "", *(f"- {w}" for w in warnings)]
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
# --- --selftest: проверка расчётов без стенда --------------------------------------
|
||||
|
||||
|
||||
def selftest() -> None:
|
||||
m = model(2000)
|
||||
assert m.found == {
|
||||
"orphan_object": 5,
|
||||
"missing_object": 5,
|
||||
"size_mismatch": 5,
|
||||
"stale_pending": 5,
|
||||
}, m.found
|
||||
assert (m.objects, m.ready_rows, m.pending_rows) == (1995, 1990, 5)
|
||||
assert m.consistent == 1980
|
||||
assert (class_count(401, 0), class_count(401, 1)) == (2, 1)
|
||||
s4 = model(0, clean=500, missing=100)
|
||||
assert (s4.objects, s4.ready_rows, s4.candidates) == (500, 600, 100)
|
||||
assert object_id(1, 2) == object_id(1, 2) != object_id(1, 3)
|
||||
assert uuid.UUID(object_id(1, 2)).version == 4
|
||||
assert len(content(1, 2, 4096)) == 4096
|
||||
assert content(1, 2, 10) == content(1, 2, 10)
|
||||
assert len(object_indices(0, 400)) == 399
|
||||
assert object_indices(0, 10, FORCE_MISSING) == []
|
||||
csv_text = rows_csv(
|
||||
seed=1,
|
||||
start=0,
|
||||
end=400,
|
||||
size=8,
|
||||
namespace="bench",
|
||||
chat_id="c",
|
||||
owner_id="o",
|
||||
created_at="2026-10-22T00:00:00Z",
|
||||
)
|
||||
rows = csv_text.splitlines()
|
||||
assert len(rows) == 399, len(rows)
|
||||
assert ",ready," in rows[0]
|
||||
assert ",9,\\x" in rows[1]
|
||||
assert ",pending," in rows[2]
|
||||
assert rows[0].count(",") == len(COPY_COLUMNS) - 1
|
||||
plan = plan_passes([("a", ("batch", "deep")), ("b", ("batch",))], 2, 7)
|
||||
assert [p["order"] for p in plan] == [1, 2, 3, 4, 5, 6]
|
||||
assert {p["pass"] for p in plan if p["stage"] == "a"} == {
|
||||
"a-batch-r1",
|
||||
"a-deep-r1",
|
||||
"a-batch-r2",
|
||||
"a-deep-r2",
|
||||
}
|
||||
assert plan[1]["cell"] != plan[2]["cell"]
|
||||
log = (
|
||||
"2026-10-23T12:00:00.000Z INFO src.cleaner [rid=-] cleaner started mode=reconcile\n"
|
||||
"2026-10-23T12:00:05.250Z WARNING src.services.reconcile [rid=-] "
|
||||
"reconcile pass finished apply=false strategy=batch deep=false rate=0 "
|
||||
"listed_objects=1995 checked_rows=1990 fresh_objects=0 fresh_rows=0 lost_known=0 "
|
||||
"found_orphan_object=5 found_stale_pending=5 found_missing_object=5 "
|
||||
"found_size_mismatch=5 found_checksum_mismatch=0 found_restored_object=0 "
|
||||
"found_foreign_object=0 fixed_cleared_lost=0 fixed_deleted_object=0 "
|
||||
"fixed_marked_lost=0 fixed_removed_pending=0 remaining=20 refused=false "
|
||||
"unlogged=0 interrupted_by=None s3_list=7 s3_head=15 s3_get=0 s3_delete=0 "
|
||||
"listed_keys=2000 read_bytes=0 db_queries=30 phase_list_ms=100 phase_rows_ms=50 "
|
||||
"phase_stale_ms=2 phase_recheck_ms=40 phase_act_ms=0 cpu_ms=900 maxrss_kib=90000 "
|
||||
"took=1200ms\n"
|
||||
)
|
||||
fields = parse_finished(log)
|
||||
assert fields is not None
|
||||
assert (fields["took_ms"], fields["refused"]) == (1200, False)
|
||||
assert (fields["interrupted_by"], fields["s3_list"]) == (None, 7)
|
||||
assert abs(fields["ts"] - 1_792_756_805.25) < 1e-3, fields["ts"]
|
||||
assert found_problems(fields, m, deep=False) == []
|
||||
bad = dict(fields, found_orphan_object=4)
|
||||
assert found_problems(bad, m, deep=False) == ["found_orphan_object=4 expected=5"]
|
||||
assert touched(fields) == 2015
|
||||
row = pass_row(
|
||||
{"pass": "q-batch-r1", "stage": "q", "cell": "batch", "repeat": 1, "order": 1},
|
||||
n=2000,
|
||||
size=4096,
|
||||
cell=CELLS["batch"],
|
||||
cleaner_cpus=0.25,
|
||||
rate=0,
|
||||
fields=fields,
|
||||
exit_code=3,
|
||||
nano_cpus=250_000_000,
|
||||
usage={},
|
||||
problems=[],
|
||||
)
|
||||
assert (row["ms_per_1k"], row["cpu_share"], row["flags"]) == (600.0, 0.75, "")
|
||||
assert set(row) <= set(PASS_COLUMNS), set(row) - set(PASS_COLUMNS)
|
||||
passes = [
|
||||
dict(row, stage=s, n=n, ms_per_1k=v, maxrss_kib=r)
|
||||
for s, n, v, r in (("b", 10_000, 10.0, 90_000), ("d", 100_000, 11.0, 110_000))
|
||||
]
|
||||
stages = {"b": {"n": 10_000, "size": 4096}, "d": {"n": 100_000, "size": 4096}}
|
||||
h1 = verdict_h1(stages, passes)
|
||||
assert h1.result == CONFIRMED, h1
|
||||
passes[1]["maxrss_kib"] = 200_000
|
||||
assert verdict_h1(stages, passes).result == REFUTED
|
||||
assert verdict_h5([]).result == UNTESTED
|
||||
print("reconcile selftest: ok")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if sys.argv[1:] == ["--selftest"]:
|
||||
selftest()
|
||||
else:
|
||||
raise SystemExit("usage: uv run python bench/reconcile.py --selftest")
|
||||
+3917
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,274 @@
|
||||
"""Сэмплер стенда: раз в секунду — ресурсы контейнеров, LB и PostgreSQL.
|
||||
|
||||
Работает только внутри контейнера `vlad-bench-sampler` (образ
|
||||
приложения: в нём есть Python и asyncpg) с `--cgroupns host`: тогда в
|
||||
`/sys/fs/cgroup/docker/<id>/` видны cgroup всех контейнеров ВМ Docker.
|
||||
Его запускает `bench/run.py` (`Stand.start_sampler`), на хосте он не
|
||||
работает. Пишет строки JSON в файл `--out`; время — часы ВМ (`time.time()`),
|
||||
те же, что у генератора.
|
||||
|
||||
Строка тика:
|
||||
{"ts": ..., "cg": {"<id12>": [usage_usec, nr_periods, nr_throttled,
|
||||
throttled_usec, memory_current]},
|
||||
"vm": [занято_jiffies, всего_jiffies],
|
||||
"lb": {"<слот>": {...}, "FRONTEND": {...}}, # режим list
|
||||
"pg": {"conn": [[адрес, состояние, ожидание, n], ...],
|
||||
"db": {xact_commit, xact_rollback, sessions, numbackends}}}
|
||||
|
||||
Режимы:
|
||||
list — заданные контейнеры (`--container id` …), опрос статистики
|
||||
HAProxy (`/stats;csv` на :8404 внутри сети) и одно постоянное
|
||||
соединение с PostgreSQL стенда (`pg_stat_activity`,
|
||||
`pg_stat_database`); его слот занимает одно из
|
||||
`max_connections`. Серии трека 1;
|
||||
scan — все каталоги контейнеров в cgroup на каждом тике (новые
|
||||
реплики видны с первого тика), без сети, LB и PostgreSQL:
|
||||
наблюдатель не обращается к стенду. Профили failover, rollout
|
||||
и reconcile;
|
||||
peak — пиковая память заданных контейнеров (`--container роль=id`) за
|
||||
окно прогона профиля uploads (лаба 4). Контейнер с `--user 0`,
|
||||
cgroupfs на запись, без сети. `memory.peak` каждого контейнера
|
||||
открывается на чтение и запись: прежнее значение — пик с
|
||||
запуска, запись `reset` в свой дескриптор сбрасывает пик для
|
||||
этого дескриптора (ядро ≥ 6.12). Раз в `--interval` —
|
||||
`memory.current`, `anon` и `sock` из `memory.stat`, `oom_kill`
|
||||
из `memory.events`. Появился `--stop-file` — пик через тот же
|
||||
дескриптор и выход.
|
||||
|
||||
Строки режима peak:
|
||||
{"start": {"<роль>": байт|null}, "reset": {"<роль>": true|false}}
|
||||
{"ts": ..., "pk": {"<роль>": [current, anon, sock, oom_kill]|null}}
|
||||
{"ts": ..., "peak": {"<роль>": байт|null}, "end": true}
|
||||
|
||||
Пароль PostgreSQL — только из окружения контейнера (`PGPASSWORD`), в
|
||||
вывод не попадает.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import asyncio
|
||||
import contextlib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
CGROUP = Path("/sys/fs/cgroup/docker")
|
||||
HEX64 = re.compile(r"[0-9a-f]{64}")
|
||||
LB_STATS = "http://haproxy:8404/stats;csv"
|
||||
LB_FIELDS = ("scur", "stot", "econ", "eresp", "wretr", "wredis", "qcur", "rate")
|
||||
# по этому application_name отбираем соединения приложения; значение
|
||||
# продублировано из src/constants.py, потому что импортировать src нельзя
|
||||
APP_NAME = "mtusi-messenger"
|
||||
PG_CONN_SQL = """
|
||||
SELECT coalesce(host(client_addr), '-'), coalesce(state, '-'),
|
||||
coalesce(wait_event_type, 'CPU'), count(*)
|
||||
FROM pg_stat_activity
|
||||
WHERE backend_type = 'client backend' AND application_name = $1
|
||||
GROUP BY 1, 2, 3
|
||||
"""
|
||||
PG_DB_SQL = """
|
||||
SELECT xact_commit, xact_rollback, sessions, numbackends
|
||||
FROM pg_stat_database WHERE datname = current_database()
|
||||
"""
|
||||
|
||||
|
||||
def cgroup_line(container: str) -> list[int] | None:
|
||||
"""usage_usec, nr_periods, nr_throttled, throttled_usec, memory.current."""
|
||||
folder = CGROUP / container
|
||||
try:
|
||||
stat = (folder / "cpu.stat").read_text()
|
||||
memory = int((folder / "memory.current").read_text())
|
||||
except (OSError, ValueError):
|
||||
return None
|
||||
values = dict(line.split() for line in stat.splitlines() if line)
|
||||
return [
|
||||
int(values.get("usage_usec", 0)),
|
||||
int(values.get("nr_periods", 0)),
|
||||
int(values.get("nr_throttled", 0)),
|
||||
int(values.get("throttled_usec", 0)),
|
||||
memory,
|
||||
]
|
||||
|
||||
|
||||
def vm_line() -> list[int]:
|
||||
fields = Path("/proc/stat").read_text().splitlines()[0].split()[1:9]
|
||||
user, nice, system, idle, iowait, irq, softirq, steal = (int(f) for f in fields)
|
||||
total = user + nice + system + idle + iowait + irq + softirq + steal
|
||||
return [total - idle - iowait, total]
|
||||
|
||||
|
||||
def lb_stats() -> dict | None:
|
||||
try:
|
||||
with urllib.request.urlopen(LB_STATS, timeout=0.5) as response: # noqa: S310
|
||||
text = response.read().decode()
|
||||
except OSError:
|
||||
return None
|
||||
lines = text.splitlines()
|
||||
header = lines[0].lstrip("# ").split(",")
|
||||
out = {}
|
||||
for line in lines[1:]:
|
||||
row = dict(zip(header, line.split(","), strict=False))
|
||||
if row.get("pxname") != "api" and row.get("pxname") != "entry":
|
||||
continue
|
||||
name = "FRONTEND" if row["pxname"] == "entry" else row["svname"]
|
||||
if name == "FRONTEND" and row["svname"] != "FRONTEND":
|
||||
continue
|
||||
out[name] = {
|
||||
"status": row.get("status", ""),
|
||||
"addr": row.get("addr", ""),
|
||||
**{field: int(row[field]) for field in LB_FIELDS if row.get(field)},
|
||||
}
|
||||
return out
|
||||
|
||||
|
||||
def _memory_line(container: str) -> list[int] | None:
|
||||
"""memory.current, anon, sock, oom_kill контейнера; `None` — его нет."""
|
||||
folder = CGROUP / container
|
||||
try:
|
||||
current = int((folder / "memory.current").read_text())
|
||||
stat = dict(
|
||||
line.split() for line in (folder / "memory.stat").read_text().splitlines()
|
||||
)
|
||||
events = dict(
|
||||
line.split() for line in (folder / "memory.events").read_text().splitlines()
|
||||
)
|
||||
except (OSError, ValueError):
|
||||
return None
|
||||
return [
|
||||
current,
|
||||
int(stat.get("anon", 0)),
|
||||
int(stat.get("sock", 0)),
|
||||
int(events.get("oom_kill", 0)),
|
||||
]
|
||||
|
||||
|
||||
def _read_fd(fd: int) -> int | None:
|
||||
try:
|
||||
os.lseek(fd, 0, os.SEEK_SET)
|
||||
return int(os.read(fd, 64).decode().strip())
|
||||
except (OSError, ValueError):
|
||||
return None
|
||||
|
||||
|
||||
def peak(args: argparse.Namespace) -> None:
|
||||
"""Режим peak: сброс пика своим дескриптором, выборки, пик в конце."""
|
||||
targets = dict(item.split("=", 1) for item in args.container)
|
||||
handles: dict[str, int] = {}
|
||||
start: dict[str, int | None] = {}
|
||||
reset: dict[str, bool] = {}
|
||||
for role, container in targets.items():
|
||||
try:
|
||||
fd = os.open(CGROUP / container / "memory.peak", os.O_RDWR)
|
||||
except OSError:
|
||||
start[role], reset[role] = None, False
|
||||
continue
|
||||
start[role] = _read_fd(fd)
|
||||
try:
|
||||
os.lseek(fd, 0, os.SEEK_SET)
|
||||
os.write(fd, b"reset")
|
||||
reset[role] = True
|
||||
handles[role] = fd
|
||||
except OSError:
|
||||
reset[role] = False
|
||||
os.close(fd)
|
||||
with open(args.out, "a", encoding="ascii") as out:
|
||||
out.write(json.dumps({"start": start, "reset": reset}) + "\n")
|
||||
out.flush()
|
||||
next_tick = time.monotonic()
|
||||
while not os.path.exists(args.stop_file):
|
||||
tick = {
|
||||
"ts": round(time.time(), 3),
|
||||
"pk": {role: _memory_line(c) for role, c in targets.items()},
|
||||
}
|
||||
out.write(json.dumps(tick, separators=(",", ":")) + "\n")
|
||||
out.flush()
|
||||
next_tick += args.interval
|
||||
time.sleep(max(0.0, next_tick - time.monotonic()))
|
||||
final = {
|
||||
"ts": round(time.time(), 3),
|
||||
"peak": {role: _read_fd(fd) for role, fd in handles.items()},
|
||||
"end": True,
|
||||
}
|
||||
out.write(json.dumps(final) + "\n")
|
||||
|
||||
|
||||
async def main(args: argparse.Namespace) -> None:
|
||||
interval = args.interval
|
||||
connection = None
|
||||
if args.mode == "list":
|
||||
import asyncpg # noqa: PLC0415 - нужен только режиму list
|
||||
|
||||
for _ in range(20):
|
||||
try:
|
||||
connection = await asyncpg.connect(
|
||||
host="postgres",
|
||||
user=os.environ["PGUSER"],
|
||||
database=os.environ["PGDATABASE"],
|
||||
password=os.environ["PGPASSWORD"],
|
||||
server_settings={"application_name": "bench-sampler"},
|
||||
timeout=3,
|
||||
)
|
||||
break
|
||||
except (OSError, asyncpg.PostgresError):
|
||||
await asyncio.sleep(0.5)
|
||||
out = open(args.out, "a", encoding="ascii") # noqa: ASYNC230, SIM115
|
||||
next_tick = time.monotonic()
|
||||
while True:
|
||||
ts = time.time()
|
||||
if args.mode == "scan":
|
||||
# файлы cgroup — псевдофайловая система ядра: чтение без ожидания
|
||||
try:
|
||||
ids = [
|
||||
p.name
|
||||
for p in CGROUP.iterdir() # noqa: ASYNC240
|
||||
if HEX64.fullmatch(p.name)
|
||||
]
|
||||
except OSError:
|
||||
ids = []
|
||||
else:
|
||||
ids = args.container
|
||||
tick: dict = {"ts": round(ts, 3), "cg": {}, "vm": vm_line()}
|
||||
for container in ids:
|
||||
line = cgroup_line(container)
|
||||
if line is not None:
|
||||
tick["cg"][container[:12]] = line
|
||||
if args.mode == "list":
|
||||
tick["lb"] = await asyncio.to_thread(lb_stats)
|
||||
if connection is not None:
|
||||
with contextlib.suppress(Exception):
|
||||
rows = await connection.fetch(PG_CONN_SQL, APP_NAME)
|
||||
db = await connection.fetchrow(PG_DB_SQL)
|
||||
# соединения приложения: адрес реплики, состояние, ожидание
|
||||
tick["pg"] = {
|
||||
"conn": [list(row) for row in rows],
|
||||
"db": dict(db),
|
||||
}
|
||||
out.write(json.dumps(tick, separators=(",", ":")) + "\n")
|
||||
out.flush()
|
||||
next_tick += interval
|
||||
await asyncio.sleep(max(0.0, next_tick - time.monotonic()))
|
||||
|
||||
|
||||
def parser() -> argparse.ArgumentParser:
|
||||
root = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
root.add_argument("--mode", choices=("list", "scan", "peak"), required=True)
|
||||
root.add_argument("--interval", type=float, default=1.0)
|
||||
root.add_argument("--out", required=True)
|
||||
# list — id контейнера; peak — роль=id
|
||||
root.add_argument("--container", action="append", default=[])
|
||||
root.add_argument("--stop-file", default="/tmp/peak.stop")
|
||||
return root
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with contextlib.suppress(KeyboardInterrupt):
|
||||
arguments = parser().parse_args()
|
||||
# peak — без event loop: только файлы cgroup и пауза между выборками
|
||||
if arguments.mode == "peak":
|
||||
peak(arguments)
|
||||
else:
|
||||
asyncio.run(main(arguments))
|
||||
sys.exit(0)
|
||||
+1480
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,583 @@
|
||||
"""Профиль uploads: план, разбор сэмплера peak, сводка без docker. Только stdlib.
|
||||
|
||||
Контейнерами управляет `run.py` (профили `uploads` и `uploads-quick`),
|
||||
а тут собраны расчёты без побочных эффектов: порядок прогонов по кругам,
|
||||
пик памяти из вывода `bench/sampler.py` в режиме `peak`, строка
|
||||
`runs.csv`, сводка по ячейкам и вердикты U1–U4 (сами гипотезы внесены в
|
||||
`REPORT.md` заранее). Проверить расчёты без стенда: запустить этот файл
|
||||
с ключом `--selftest` через `uv run python`.
|
||||
"""
|
||||
|
||||
import random
|
||||
import statistics
|
||||
import sys
|
||||
from collections.abc import Iterable
|
||||
from dataclasses import dataclass
|
||||
|
||||
MIB = 2**20
|
||||
VARIANTS = ("limited", "unlimited")
|
||||
VARIANT_NAMES = {"limited": "с лимитом", "unlimited": "без лимита"}
|
||||
ROLES = ("api", "s3", "lb")
|
||||
# пороги гипотез — до замеров (REPORT.md, «Память загрузок: гипотезы»)
|
||||
U1_HALF = 0.5
|
||||
U1_GROWTH_MIB = 1.0
|
||||
U2_BODIES_PER_CLIENT = 0.8
|
||||
U2_NEAR_LIMIT = 0.9
|
||||
U3_SHARE = 0.9
|
||||
|
||||
RUN_COLUMNS = (
|
||||
"run",
|
||||
"variant",
|
||||
"size",
|
||||
"body_bytes",
|
||||
"clients",
|
||||
"repeat",
|
||||
"order",
|
||||
"mem_before_mib",
|
||||
"start_peak_mib",
|
||||
"peak_mib",
|
||||
"peak_source",
|
||||
"anon_max_mib",
|
||||
"sock_max_mib",
|
||||
"oom_kill",
|
||||
"oom_killed",
|
||||
"exit_code",
|
||||
"running_after",
|
||||
"started",
|
||||
"ok",
|
||||
"rejected_429",
|
||||
"errors_5xx",
|
||||
"other_errors",
|
||||
"statuses",
|
||||
"uploads_per_s",
|
||||
"mib_per_s",
|
||||
"p50_ms",
|
||||
"p95_ms",
|
||||
"p99_ms",
|
||||
"max_ms",
|
||||
"s3_peak_mib",
|
||||
"s3_anon_max_mib",
|
||||
"lb_peak_mib",
|
||||
"lb_sock_max_mib",
|
||||
"gen_cpu_s",
|
||||
"host_swapouts",
|
||||
"flags",
|
||||
)
|
||||
|
||||
|
||||
def plan_runs(
|
||||
variants: Iterable[str],
|
||||
sizes: Iterable[str],
|
||||
clients: Iterable[int],
|
||||
repeats: int,
|
||||
seed: int,
|
||||
) -> list[dict]:
|
||||
"""Расписание: все сочетания «вариант, размер, число клиентов» в каждом
|
||||
из `repeats` кругов, перемешанные `Random(seed + r)`. Если круг
|
||||
начался бы той же ячейкой, что закончил прошлый, первые две меняются."""
|
||||
cells = [(v, s, c) for v in variants for s in sizes for c in clients]
|
||||
plan: list[dict] = []
|
||||
previous = None
|
||||
for round_no in range(1, repeats + 1):
|
||||
order = list(range(len(cells)))
|
||||
random.Random(seed + round_no).shuffle(order)
|
||||
if len(order) > 1 and order[0] == previous:
|
||||
order[0], order[1] = order[1], order[0]
|
||||
for index in order:
|
||||
variant, size, count = cells[index]
|
||||
plan.append(
|
||||
{
|
||||
"run": f"{variant}-{size}-c{count}-r{round_no}",
|
||||
"variant": variant,
|
||||
"size": size,
|
||||
"clients": count,
|
||||
"repeat": round_no,
|
||||
"order": len(plan) + 1,
|
||||
},
|
||||
)
|
||||
previous = order[-1]
|
||||
return plan
|
||||
|
||||
|
||||
@dataclass
|
||||
class Peak:
|
||||
"""Накопитель по одному контейнеру: что сэмплер `peak` увидел за окно."""
|
||||
|
||||
start_peak: int | None = None
|
||||
reset: bool = False
|
||||
peak: int | None = None
|
||||
first_current: int | None = None
|
||||
max_current: int = 0
|
||||
max_anon: int = 0
|
||||
max_sock: int = 0
|
||||
oom_first: int | None = None
|
||||
oom_last: int | None = None
|
||||
samples: int = 0
|
||||
missing: int = 0
|
||||
|
||||
@property
|
||||
def oom_kills(self) -> int:
|
||||
if self.oom_first is None or self.oom_last is None:
|
||||
return 0
|
||||
return self.oom_last - self.oom_first
|
||||
|
||||
@property
|
||||
def window_peak(self) -> int | None:
|
||||
"""Лучшая доступная оценка пика: `memory.peak` после нашего сброса,
|
||||
а если сбросить или дочитать не удалось (контейнер умер) — максимум
|
||||
из выборок."""
|
||||
if self.reset and self.peak is not None:
|
||||
return max(self.peak, self.max_current)
|
||||
return self.max_current or None
|
||||
|
||||
@property
|
||||
def source(self) -> str:
|
||||
return "reset" if self.reset and self.peak is not None else "sampled"
|
||||
|
||||
|
||||
def parse_peak(lines: list[dict]) -> dict[str, Peak]:
|
||||
"""Строки сэмплера `peak` → память по ролям."""
|
||||
roles: dict[str, Peak] = {}
|
||||
|
||||
def role(name: str) -> Peak:
|
||||
return roles.setdefault(name, Peak())
|
||||
|
||||
for line in lines:
|
||||
if "reset" in line:
|
||||
for name, value in line.get("start", {}).items():
|
||||
role(name).start_peak = value
|
||||
for name, ok in line["reset"].items():
|
||||
role(name).reset = bool(ok)
|
||||
elif "pk" in line:
|
||||
for name, values in line["pk"].items():
|
||||
item = role(name)
|
||||
if values is None:
|
||||
item.missing += 1
|
||||
continue
|
||||
current, anon, sock, oom = values
|
||||
item.samples += 1
|
||||
if item.first_current is None:
|
||||
item.first_current = current
|
||||
item.max_current = max(item.max_current, current)
|
||||
item.max_anon = max(item.max_anon, anon)
|
||||
item.max_sock = max(item.max_sock, sock)
|
||||
if item.oom_first is None:
|
||||
item.oom_first = oom
|
||||
item.oom_last = oom
|
||||
elif "peak" in line:
|
||||
for name, value in line["peak"].items():
|
||||
role(name).peak = value
|
||||
return roles
|
||||
|
||||
|
||||
def mib(value: int | float | None) -> float | None:
|
||||
return None if value is None else round(value / MIB, 1)
|
||||
|
||||
|
||||
def run_row(
|
||||
run: dict,
|
||||
*,
|
||||
body_bytes: int,
|
||||
peaks: dict[str, Peak],
|
||||
result: dict,
|
||||
state: dict,
|
||||
swapouts: int | None,
|
||||
) -> dict:
|
||||
"""Собрать строку `runs.csv` и флаги к ней.
|
||||
|
||||
- `oom`: ядро убило реплику по памяти (`OOMKilled` у контейнера или
|
||||
счётчик `oom_kill` в cgroup); для варианта это исход, не поломка;
|
||||
- `host_swap`: пока шёл прогон, у хоста росли swapouts;
|
||||
- `peak_sampled`: сбросить `memory.peak` не вышло, и пик взят как
|
||||
максимум выборок;
|
||||
- `no_result`: итог генератора не пришёл."""
|
||||
api = peaks.get("api", Peak())
|
||||
s3 = peaks.get("s3", Peak())
|
||||
lb = peaks.get("lb", Peak())
|
||||
oom = bool(state.get("oom_killed")) or api.oom_kills > 0
|
||||
flags = []
|
||||
if oom:
|
||||
flags.append("oom")
|
||||
if swapouts:
|
||||
flags.append("host_swap")
|
||||
if api.source == "sampled":
|
||||
flags.append("peak_sampled")
|
||||
if not result:
|
||||
flags.append("no_result")
|
||||
return {
|
||||
**{key: run[key] for key in ("run", "variant", "size", "clients", "repeat")},
|
||||
"order": run["order"],
|
||||
"body_bytes": body_bytes,
|
||||
"mem_before_mib": mib(api.first_current),
|
||||
"start_peak_mib": mib(api.start_peak),
|
||||
"peak_mib": mib(api.window_peak),
|
||||
"peak_source": api.source,
|
||||
"anon_max_mib": mib(api.max_anon),
|
||||
"sock_max_mib": mib(api.max_sock),
|
||||
"oom_kill": api.oom_kills,
|
||||
"oom_killed": bool(state.get("oom_killed")),
|
||||
"exit_code": state.get("exit_code"),
|
||||
"running_after": state.get("running"),
|
||||
"started": result.get("started"),
|
||||
"ok": result.get("ok"),
|
||||
"rejected_429": result.get("rejected_429"),
|
||||
"errors_5xx": result.get("errors_5xx"),
|
||||
"other_errors": result.get("other_errors"),
|
||||
"statuses": " ".join(
|
||||
f"{k}:{v}" for k, v in sorted(result.get("statuses", {}).items())
|
||||
),
|
||||
**{
|
||||
key: result.get(key)
|
||||
for key in (
|
||||
"uploads_per_s",
|
||||
"mib_per_s",
|
||||
"p50_ms",
|
||||
"p95_ms",
|
||||
"p99_ms",
|
||||
"max_ms",
|
||||
"gen_cpu_s",
|
||||
)
|
||||
},
|
||||
"s3_peak_mib": mib(s3.window_peak),
|
||||
"s3_anon_max_mib": mib(s3.max_anon),
|
||||
"lb_peak_mib": mib(lb.window_peak),
|
||||
"lb_sock_max_mib": mib(lb.max_sock),
|
||||
"host_swapouts": swapouts,
|
||||
"flags": " ".join(flags),
|
||||
}
|
||||
|
||||
|
||||
# --- сводка ------------------------------------------------------------------------
|
||||
|
||||
|
||||
def num(value) -> float | None:
|
||||
if value is None or value == "":
|
||||
return None
|
||||
try:
|
||||
return float(value)
|
||||
except (TypeError, ValueError):
|
||||
return None
|
||||
|
||||
|
||||
def median(values: Iterable) -> float | None:
|
||||
present = [v for v in (num(x) for x in values) if v is not None]
|
||||
return statistics.median(present) if present else None
|
||||
|
||||
|
||||
def spread(values: Iterable, digits: int = 1) -> str:
|
||||
present = [v for v in (num(x) for x in values) if v is not None]
|
||||
if not present:
|
||||
return "—"
|
||||
mid = statistics.median(present)
|
||||
if len(present) == 1:
|
||||
return f"{mid:.{digits}f}"
|
||||
return f"{mid:.{digits}f} ({min(present):.{digits}f}–{max(present):.{digits}f})"
|
||||
|
||||
|
||||
def fmt(value: float | None, digits: int = 1) -> str:
|
||||
return "—" if value is None else f"{value:.{digits}f}"
|
||||
|
||||
|
||||
def is_oom(row: dict) -> bool:
|
||||
return "oom" in str(row.get("flags") or "").split()
|
||||
|
||||
|
||||
def cells(rows: list[dict]) -> dict[tuple[str, str, int], list[dict]]:
|
||||
grouped: dict[tuple[str, str, int], list[dict]] = {}
|
||||
for row in rows:
|
||||
key = (row["variant"], row["size"], int(row["clients"]))
|
||||
grouped.setdefault(key, []).append(row)
|
||||
return grouped
|
||||
|
||||
|
||||
def per_client_bodies(row: dict) -> float | None:
|
||||
"""(пик − память до окна) / (размер тела × клиенты): сколько тел на клиента."""
|
||||
peak, before = num(row.get("peak_mib")), num(row.get("mem_before_mib"))
|
||||
body, clients = num(row.get("body_bytes")), int(row["clients"])
|
||||
if peak is None or before is None or not body or not clients:
|
||||
return None
|
||||
return (peak - before) * MIB / body / clients
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Verdict:
|
||||
hypothesis: str
|
||||
result: str
|
||||
numbers: str
|
||||
|
||||
|
||||
CONFIRMED = "подтверждена"
|
||||
REFUTED = "опровергнута"
|
||||
UNTESTED = "нет данных"
|
||||
|
||||
|
||||
def verdicts(rows: list[dict], *, limit_mib: float, big: str) -> list[Verdict]:
|
||||
grouped = cells(rows)
|
||||
|
||||
def group(variant: str, size: str, clients: int) -> list[dict]:
|
||||
return grouped.get((variant, size, clients), [])
|
||||
|
||||
out = []
|
||||
# U1: с лимитом пик ≤ половины лимита при C = 10, 20, 40 (большое тело),
|
||||
# рост сверх C = 10 ≤ 1 MiB на клиента; OOM и 5xx нет ни в одном прогоне
|
||||
levels = [c for c in (10, 20, 40) if group("limited", big, c)]
|
||||
limited = [r for r in rows if r["variant"] == "limited"]
|
||||
if levels:
|
||||
peaks = {
|
||||
c: median(r["peak_mib"] for r in group("limited", big, c)) for c in levels
|
||||
}
|
||||
base = peaks.get(10)
|
||||
growth = {
|
||||
c: (peaks[c] - base) / (c - 10)
|
||||
for c in levels
|
||||
if c > 10 and base is not None and peaks[c] is not None
|
||||
}
|
||||
ooms = sum(is_oom(r) for r in limited)
|
||||
fives = sum(int(num(r.get("errors_5xx")) or 0) for r in limited)
|
||||
ok = (
|
||||
all(v is not None and v <= limit_mib * U1_HALF for v in peaks.values())
|
||||
and all(v <= U1_GROWTH_MIB for v in growth.values())
|
||||
and not ooms
|
||||
and not fives
|
||||
)
|
||||
out.append(
|
||||
Verdict(
|
||||
"U1",
|
||||
CONFIRMED if ok else REFUTED,
|
||||
"пик, MiB: "
|
||||
+ ", ".join(f"C={c} {fmt(v)}" for c, v in peaks.items())
|
||||
+ f" (половина лимита {limit_mib * U1_HALF:g}); сверх C=10, MiB "
|
||||
"на клиента: "
|
||||
+ (", ".join(f"C={c} {fmt(v, 2)}" for c, v in growth.items()) or "—")
|
||||
+ f"; OOM {ooms}, 5xx {fives} во всех прогонах «с лимитом»",
|
||||
),
|
||||
)
|
||||
else:
|
||||
out.append(Verdict("U1", UNTESTED, "нет ячеек «с лимитом» C ≥ 10"))
|
||||
# U2: без лимита рост ≥ 0,8 тела на клиента при C = 10; при C = 40 —
|
||||
# OOM или пик ≥ 90 % лимита
|
||||
ten = group("unlimited", big, 10)
|
||||
forty = group("unlimited", big, 40)
|
||||
if ten or forty:
|
||||
slope = median(per_client_bodies(r) for r in ten if not is_oom(r))
|
||||
near = all(
|
||||
is_oom(r) or (num(r["peak_mib"]) or 0) >= limit_mib * U2_NEAR_LIMIT
|
||||
for r in forty
|
||||
)
|
||||
ok = (
|
||||
slope is not None and slope >= U2_BODIES_PER_CLIENT and bool(forty) and near
|
||||
)
|
||||
out.append(
|
||||
Verdict(
|
||||
"U2",
|
||||
CONFIRMED if ok else REFUTED,
|
||||
f"C=10: {fmt(slope, 2)} тела на клиента (порог {U2_BODIES_PER_CLIENT}); "
|
||||
f"C=40: OOM {sum(is_oom(r) for r in forty)}/{len(forty)}, пик "
|
||||
f"{spread(r['peak_mib'] for r in forty)} MiB (90 % лимита "
|
||||
f"{limit_mib * U2_NEAR_LIMIT:g})",
|
||||
),
|
||||
)
|
||||
else:
|
||||
out.append(Verdict("U2", UNTESTED, "нет ячеек «без лимита»"))
|
||||
# U3: загрузок/с с лимитом ≥ 90 % без лимита при C ≥ 10, пока тот жив
|
||||
ratios = []
|
||||
for variant_size in sorted({r["size"] for r in rows}):
|
||||
for clients in (10, 20, 40):
|
||||
lim = group("limited", variant_size, clients)
|
||||
unl = group("unlimited", variant_size, clients)
|
||||
if not lim or not unl or any(is_oom(r) for r in unl):
|
||||
continue
|
||||
a = median(r["uploads_per_s"] for r in lim)
|
||||
b = median(r["uploads_per_s"] for r in unl)
|
||||
if a is not None and b:
|
||||
ratios.append((variant_size, clients, a, b, a / b))
|
||||
if ratios:
|
||||
out.append(
|
||||
Verdict(
|
||||
"U3",
|
||||
CONFIRMED if all(r[4] >= U3_SHARE for r in ratios) else REFUTED,
|
||||
"; ".join(
|
||||
f"{s} C={c}: {a:.2f} / {b:.2f} = {ratio:.0%}"
|
||||
for s, c, a, b, ratio in ratios
|
||||
),
|
||||
),
|
||||
)
|
||||
else:
|
||||
out.append(Verdict("U3", UNTESTED, "нет пар ячеек без OOM"))
|
||||
# U4: с лимитом 429 нет при C ≤ 20 (4 места + 16 в очереди), есть при C = 40
|
||||
low = [r for r in limited if int(r["clients"]) <= 20]
|
||||
high = [r for r in limited if int(r["clients"]) >= 40]
|
||||
if low and high:
|
||||
low_429 = sum(int(num(r.get("rejected_429")) or 0) for r in low)
|
||||
high_429 = [int(num(r.get("rejected_429")) or 0) for r in high]
|
||||
ok = low_429 == 0 and all(v > 0 for v in high_429)
|
||||
out.append(
|
||||
Verdict(
|
||||
"U4",
|
||||
CONFIRMED if ok else REFUTED,
|
||||
f"429 при C ≤ 20: {low_429} в {len(low)} прогонах; при C = 40: "
|
||||
+ ", ".join(map(str, high_429)),
|
||||
),
|
||||
)
|
||||
else:
|
||||
out.append(Verdict("U4", UNTESTED, "нет ячеек «с лимитом» C ≤ 20 и C = 40"))
|
||||
return out
|
||||
|
||||
|
||||
def render_summary(meta: dict, rows: list[dict]) -> str:
|
||||
profile = meta["profile"]
|
||||
bodies = meta.get("bodies", {})
|
||||
big = max(bodies, key=lambda k: bodies[k]["bytes"]) if bodies else ""
|
||||
limit_mib = float(profile["api_memory"].rstrip("m"))
|
||||
lines = [
|
||||
f"# Память загрузок: метка `{meta['label']}`",
|
||||
"",
|
||||
f"- Статус: **{'прерван: ' + meta['aborted'] if meta.get('aborted') else 'готово'}**",
|
||||
f"- Код (`src_sha256` образа): `{meta.get('code', {}).get('src_sha256', '—')}`",
|
||||
f"- Профиль `{profile['name']}`: варианты "
|
||||
+ ", ".join(f"«{VARIANT_NAMES[v]}»" for v in profile["variants"])
|
||||
+ f"; клиенты {', '.join(map(str, profile['clients']))}; повторов "
|
||||
f"{profile['repeats']}; окно {profile['window_s']:g} с после "
|
||||
f"{profile['warmup_s']:g} с разгона",
|
||||
"- Тела: "
|
||||
+ ", ".join(
|
||||
f"{name} — {item['bytes']} байт ({item['width']} × {item['height']}), "
|
||||
f"SHA-256 `{item['sha256'][:16]}…`"
|
||||
for name, item in bodies.items()
|
||||
),
|
||||
f"- Реплика {profile['api_cpus']} CPU / {profile['api_memory']} без swap, "
|
||||
f"буфер приёма `{meta.get('stand', {}).get('api_tcp_rmem', '—')}`; S3 "
|
||||
f"{profile['s3_cpus']} CPU / {profile['s3_memory']}; «без лимита» — "
|
||||
+ ", ".join(f"`{k}={v}`" for k, v in profile["unlimited_env"]),
|
||||
"- Пик — `memory.peak` cgroup, сброшенный своим дескриптором после "
|
||||
"разогрева (`peak_source` = reset); без сброса — наибольшая выборка "
|
||||
f"раз в {profile['sample_interval_s']:g} с (`peak_sampled`). «До окна» — "
|
||||
"первая выборка. Ответы по кодам и задержки — загрузки, начатые в окне. "
|
||||
"Значения — медиана (min–max) повторов. Пик S3 включает страничный кэш "
|
||||
"записанных объектов и упирается в лимит; память самого шлюза — `anon`",
|
||||
"",
|
||||
"## Ячейки",
|
||||
"",
|
||||
"| Вариант | Тело | C | Пик старта, MiB | До окна, MiB | Пик, MiB | anon, MiB "
|
||||
"| sock, MiB | OOM | 201/202 | 429 | 5xx | прочие | Загрузок/с | p50, мс | "
|
||||
"p95, мс | S3 пик / anon, MiB | LB пик, MiB | Пометки |",
|
||||
"|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|"
|
||||
"---:|---:|---:|---|",
|
||||
]
|
||||
grouped = cells(rows)
|
||||
for (variant, size, clients), items in sorted(
|
||||
grouped.items(), key=lambda kv: (kv[0][0], kv[0][1], kv[0][2])
|
||||
):
|
||||
flags = sorted({f for r in items for f in str(r.get("flags") or "").split()})
|
||||
lines.append(
|
||||
f"| {VARIANT_NAMES.get(variant, variant)} | {size} | {clients} | "
|
||||
f"{spread(r['start_peak_mib'] for r in items)} | "
|
||||
f"{spread(r['mem_before_mib'] for r in items)} | "
|
||||
f"{spread(r['peak_mib'] for r in items)} | "
|
||||
f"{spread(r['anon_max_mib'] for r in items)} | "
|
||||
f"{spread(r['sock_max_mib'] for r in items)} | "
|
||||
f"{sum(is_oom(r) for r in items)}/{len(items)} | "
|
||||
f"{spread((r['ok'] for r in items), 0)} | "
|
||||
f"{spread((r['rejected_429'] for r in items), 0)} | "
|
||||
f"{spread((r['errors_5xx'] for r in items), 0)} | "
|
||||
f"{spread((r['other_errors'] for r in items), 0)} | "
|
||||
f"{spread((r['uploads_per_s'] for r in items), 2)} | "
|
||||
f"{spread((r['p50_ms'] for r in items), 0)} | "
|
||||
f"{spread((r['p95_ms'] for r in items), 0)} | "
|
||||
f"{spread(r['s3_peak_mib'] for r in items)} / "
|
||||
f"{spread(r['s3_anon_max_mib'] for r in items)} | "
|
||||
f"{spread(r['lb_peak_mib'] for r in items)} | {' '.join(flags) or '—'} |"
|
||||
)
|
||||
lines += [
|
||||
"",
|
||||
"## Гипотезы",
|
||||
"",
|
||||
"Тексты и пороги — `REPORT.md`, «Память загрузок: гипотезы» (записаны до "
|
||||
f"замеров); большое тело — `{big}`, лимит памяти реплики {limit_mib:g} MiB.",
|
||||
"",
|
||||
"| Гипотеза | Итог | Числа |",
|
||||
"|---|---|---|",
|
||||
]
|
||||
lines += [
|
||||
f"| {v.hypothesis} | {v.result} | {v.numbers} |"
|
||||
for v in verdicts(rows, limit_mib=limit_mib, big=big)
|
||||
]
|
||||
warnings = meta.get("host_warnings") or []
|
||||
if warnings:
|
||||
lines += ["", "## Предупреждения о хосте", "", *(f"- {w}" for w in warnings)]
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
# --- --selftest: проверка расчётов без стенда --------------------------------------
|
||||
|
||||
|
||||
def selftest() -> None:
|
||||
plan = plan_runs(VARIANTS, ("1mib", "10mib"), (1, 10), 2, 5)
|
||||
assert [p["order"] for p in plan] == list(range(1, 17))
|
||||
assert plan[7]["run"] != plan[8]["run"]
|
||||
assert len({p["run"] for p in plan}) == 16
|
||||
lines = [
|
||||
{"start": {"api": 300 * MIB, "s3": None}, "reset": {"api": True, "s3": False}},
|
||||
{"ts": 1.0, "pk": {"api": [100 * MIB, 50 * MIB, 1 * MIB, 0], "s3": None}},
|
||||
{"ts": 1.2, "pk": {"api": [180 * MIB, 120 * MIB, 3 * MIB, 0], "s3": None}},
|
||||
{"ts": 1.4, "pk": {"api": [150 * MIB, 90 * MIB, 2 * MIB, 1], "s3": None}},
|
||||
{"ts": 1.6, "peak": {"api": 200 * MIB}, "end": True},
|
||||
]
|
||||
peaks = parse_peak(lines)
|
||||
api = peaks["api"]
|
||||
assert (api.start_peak, api.window_peak) == (300 * MIB, 200 * MIB)
|
||||
assert (api.first_current, api.max_sock) == (100 * MIB, 3 * MIB)
|
||||
assert (api.oom_kills, api.source) == (1, "reset")
|
||||
assert (peaks["s3"].missing, peaks["s3"].source) == (3, "sampled")
|
||||
run = {"run": "limited-10mib-c10-r1", "variant": "limited", "size": "10mib"}
|
||||
run |= {"clients": 10, "repeat": 1, "order": 1}
|
||||
result = {"ok": 40, "rejected_429": 0, "errors_5xx": 0, "statuses": {"201": 40}}
|
||||
row = run_row(
|
||||
run,
|
||||
body_bytes=10 * MIB,
|
||||
peaks=peaks,
|
||||
result=result,
|
||||
state={"oom_killed": False, "exit_code": 0, "running": True},
|
||||
swapouts=0,
|
||||
)
|
||||
assert (row["peak_mib"], row["mem_before_mib"]) == (200.0, 100.0)
|
||||
assert row["flags"] == "oom", row["flags"]
|
||||
assert set(row) <= set(RUN_COLUMNS), set(row) - set(RUN_COLUMNS)
|
||||
assert per_client_bodies(row) == 1.0
|
||||
rows = []
|
||||
for clients, peak in ((10, 100.0), (20, 105.0), (40, 125.0)):
|
||||
rows.append(
|
||||
{
|
||||
"variant": "limited",
|
||||
"size": "10mib",
|
||||
"clients": clients,
|
||||
"body_bytes": 10 * MIB,
|
||||
"peak_mib": peak,
|
||||
"mem_before_mib": 80.0,
|
||||
"errors_5xx": 0,
|
||||
"rejected_429": 0 if clients <= 20 else 7,
|
||||
"uploads_per_s": 4.0,
|
||||
"flags": "",
|
||||
},
|
||||
)
|
||||
rows.append(dict(rows[0], variant="unlimited", peak_mib=200.0, uploads_per_s=4.1))
|
||||
rows.append(dict(rows[2], variant="unlimited", flags="oom"))
|
||||
result_by = {
|
||||
v.hypothesis: v.result for v in verdicts(rows, limit_mib=512, big="10mib")
|
||||
}
|
||||
assert result_by == {
|
||||
"U1": CONFIRMED,
|
||||
"U2": CONFIRMED,
|
||||
"U3": CONFIRMED,
|
||||
"U4": CONFIRMED,
|
||||
}, result_by
|
||||
rows[2]["peak_mib"] = 400.0
|
||||
assert verdicts(rows, limit_mib=512, big="10mib")[0].result == REFUTED
|
||||
print("uploads selftest: ok")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if sys.argv[1:] == ["--selftest"]:
|
||||
selftest()
|
||||
else:
|
||||
raise SystemExit("usage: uv run python bench/uploads.py --selftest")
|
||||
+738
@@ -0,0 +1,738 @@
|
||||
# Стенд лабы 6. Вход — HAProxy, за ним API_REPLICAS реплик API.
|
||||
# Хранилища: PostgreSQL (источник истины, в том числе задания обработки),
|
||||
# Valkey (кэш карточек чатов), SeaweedFS (staging и опубликованные файлы),
|
||||
# RabbitMQ (сообщения о заданиях). Фон: relay (outbox → брокер), worker
|
||||
# (обработка изображений), cleaner (уборка и сверка). Одноразовые:
|
||||
# migrate, s3-bootstrap. Наблюдаемость (лаба 6): api, worker и relay шлют
|
||||
# OTLP в otel-collector, он раскладывает сигналы по prometheus (метрики),
|
||||
# loki (логи) и tempo (трассы); grafana — интерфейс к ним. ${...} — из
|
||||
# .env (`make env`). Наружу — только 127.0.0.1. Правила — infra/AGENTS.md;
|
||||
# запуск — `make up`.
|
||||
name: vladimirceva-lab6
|
||||
|
||||
# Блоки окружения ниже разбиты по хранилищам, чтобы каждый сервис
|
||||
# подключал только свои секреты. К базе ходят api, cleaner, relay,
|
||||
# worker и migrate
|
||||
x-db-env: &db-env
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
DB_HOST: postgres
|
||||
DB_PORT: "5432"
|
||||
DB_NAME: ${POSTGRES_DB:?POSTGRES_DB is not set, run make env}
|
||||
DB_USER: ${POSTGRES_USER:?POSTGRES_USER is not set, run make env}
|
||||
DB_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is empty, run make env}
|
||||
|
||||
# кэш нужен одному api
|
||||
x-cache-env: &cache-env
|
||||
CACHE_HOST: valkey
|
||||
CACHE_PORT: "6379"
|
||||
CACHE_PASSWORD: ${VALKEY_PASSWORD:?VALKEY_PASSWORD is empty, run make env}
|
||||
|
||||
# общий для api, worker и cleaner адрес S3 и имя bucket; ключи каждый
|
||||
# получает свои (их заводит infra/s3/bootstrap.sh), root-пары нет ни у кого
|
||||
x-s3-env: &s3-env
|
||||
S3_ENDPOINT: http://s3:8333
|
||||
S3_BUCKET: ${S3_BUCKET:-messenger-attachments}
|
||||
|
||||
# RabbitMQ — только relay и worker; у реплик API брокера нет вовсе
|
||||
x-broker-env: &broker-env
|
||||
BROKER_HOST: rabbitmq
|
||||
BROKER_PORT: "5672"
|
||||
BROKER_USER: messenger
|
||||
BROKER_PASSWORD: ${BROKER_PASSWORD:?BROKER_PASSWORD is empty, run make env}
|
||||
|
||||
# параметры pipeline: читают worker (повторы, аренда) и relay (бюджет при
|
||||
# возврате истёкшей аренды)
|
||||
x-pipeline-env: &pipeline-env
|
||||
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
||||
JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-60}
|
||||
|
||||
# лаба 6: куда и как api, worker и relay отдают телеметрию. Адрес
|
||||
# Collector — не секрет. Значения по умолчанию — полная телеметрия;
|
||||
# ручки трека 1 (выключить, доля трасс, период метрик, границы histogram)
|
||||
# переопределяются из .env или окружения make (src/AGENTS.md, таблица)
|
||||
x-telemetry-env: &telemetry-env
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
|
||||
OTEL_RESOURCE_ATTRIBUTES: ${OTEL_RESOURCE_ATTRIBUTES:-deployment.environment.name=lab}
|
||||
OTEL_SDK_DISABLED: ${OTEL_SDK_DISABLED:-false}
|
||||
OTEL_TRACES_SAMPLER_ARG: ${OTEL_TRACES_SAMPLER_ARG:-1.0}
|
||||
OTEL_METRIC_EXPORT_INTERVAL: ${OTEL_METRIC_EXPORT_INTERVAL:-15000}
|
||||
TELEMETRY_HISTOGRAM_BUCKETS: ${TELEMETRY_HISTOGRAM_BUCKETS:-default}
|
||||
|
||||
# сервисы телеметрии: перезапуск сами, Go не видит лимит cgroup — мягкий
|
||||
# предел кучи задаётся GOMEMLIMIT у каждого (~75–80 % лимита контейнера)
|
||||
x-telemetry-service: &telemetry-service
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- telemetry
|
||||
|
||||
# один образ SeaweedFS на сервер и bootstrap; digest мультиарх-индекса,
|
||||
# поэтому закрепление работает и на amd64, и на arm64
|
||||
x-s3-image: &s3-image chrislusf/seaweedfs:4.48@sha256:4e61d15fd35994cb1e43e1e553dff106794841fd9a99ade2fc8c8bfce4d7872d
|
||||
|
||||
# ужесточение контейнеров приложения: файловая система только для
|
||||
# чтения, без capabilities и повышения привилегий
|
||||
x-hardened: &hardened
|
||||
read_only: true
|
||||
cap_drop:
|
||||
- ALL
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:?POSTGRES_USER is not set, run make env}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is empty, run make env}
|
||||
POSTGRES_DB: ${POSTGRES_DB:?POSTGRES_DB is not set, run make env}
|
||||
ports:
|
||||
# только localhost: к нему подключается `make run` и миграции с
|
||||
# хоста. API наружу так не публикуется — только через LB
|
||||
- "127.0.0.1:${POSTGRES_HOST_PORT:-5433}:5432"
|
||||
volumes:
|
||||
# с 18-й версии кластер лежит в подкаталоге 18/docker, поэтому
|
||||
# монтируем родительский каталог — тот, что объявлен в Config.Volumes
|
||||
- pgdata:/var/lib/postgresql
|
||||
healthcheck:
|
||||
# -h 127.0.0.1 обязателен: init-скрипты образа идут на временном
|
||||
# сервере, который слушает лишь unix-сокет, и проверка по сокету
|
||||
# отпустила бы зависимых до настоящего старта. $$ раскрывает shell
|
||||
# контейнера, а не compose
|
||||
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
start_interval: 1s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
# соединения ≤ max_connections (100): реплики 2 × 15, migrate 1,
|
||||
# cleaner 1, relay 1, worker 3 — 36; на пике замены реплик 51
|
||||
# (REPORT.md, «Лимиты и пулы»)
|
||||
cpus: "2.0"
|
||||
memory: 1G
|
||||
|
||||
# Valkey держит только кэш карточек чатов и ничего не пишет на диск
|
||||
# (valkey.conf): рестарт обнуляет кэш, а источник истины — PostgreSQL
|
||||
valkey:
|
||||
image: valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd
|
||||
restart: unless-stopped
|
||||
# пароль подставляет shell контейнера ($$), в описании сервиса его не
|
||||
# видно; entrypoint образа сбрасывает права до пользователя valkey
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- exec docker-entrypoint.sh valkey-server /usr/local/etc/valkey/valkey.conf --requirepass "$$VALKEY_PASSWORD"
|
||||
environment:
|
||||
VALKEY_PASSWORD: ${VALKEY_PASSWORD:?VALKEY_PASSWORD is empty, run make env}
|
||||
# valkey-cli читает пароль отсюда, и healthcheck обходится без -a
|
||||
VALKEYCLI_AUTH: ${VALKEY_PASSWORD:?VALKEY_PASSWORD is empty, run make env}
|
||||
ports:
|
||||
# только localhost: к нему подключается `make run`
|
||||
- "127.0.0.1:${VALKEY_HOST_PORT:-6380}:6379"
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./infra/valkey/valkey.conf
|
||||
target: /usr/local/etc/valkey/valkey.conf
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
healthcheck:
|
||||
# с неверным паролем ответ будет NOAUTH, так что PONG значит
|
||||
# «сервер жив и пароль совпал»
|
||||
test: ["CMD-SHELL", 'test "$$(valkey-cli ping)" = PONG']
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
start_interval: 1s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
# 64mb под данные (maxmemory) и запас на сам процесс
|
||||
cpus: "0.5"
|
||||
memory: 128M
|
||||
|
||||
# SeaweedFS хранит байты вложений (infra/AGENTS.md, «S3»). Команда weed
|
||||
# server запускает в одном процессе master, volume, filer и S3-шлюз.
|
||||
# Внутренние компоненты сидят на 127.0.0.1 контейнера; наружу, в сеть
|
||||
# стенда, смотрят только S3 API (8333) и gRPC шлюза (18333) под
|
||||
# JWT-подписью. Переход на пользователя seaweed и -dir=/data делает
|
||||
# entrypoint образа
|
||||
s3:
|
||||
image: *s3-image
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- server
|
||||
# внутренние серверы SeaweedFS привязаны к loopback
|
||||
- -ip=127.0.0.1
|
||||
- -ip.bind=127.0.0.1
|
||||
# иначе master отправляет телеметрию разработчикам SeaweedFS
|
||||
- -master.telemetry=false
|
||||
# с одним master выбирать лидера не из кого; рестарт до healthy
|
||||
# занимает ~7 с вместо ~24
|
||||
- -master.electionTimeout=1s
|
||||
# задержка остановки тома имеет смысл только в многоузловом кластере
|
||||
- -volume.preStopSeconds=0
|
||||
- -filer
|
||||
- -s3
|
||||
- -s3.ip.bind=0.0.0.0
|
||||
- -s3.port=8333
|
||||
# гасим порты Iceberg (8181) и Lance (9101), открытые по умолчанию
|
||||
- -s3.port.iceberg=0
|
||||
- -s3.port.lance=0
|
||||
# пользователей заводит weed shell в bootstrap, HTTP IAM на 8333 лишний
|
||||
- -s3.iam=false
|
||||
# суммарный объём параллельных загрузок в шлюзе ≤ 64 МБ, сверх — очередь
|
||||
- -s3.concurrentUploadLimitMB=64
|
||||
environment:
|
||||
# root-ключи заданы сразу, поэтому S3 ни секунды не работает без
|
||||
# аутентификации. Они есть только здесь, другим сервисам не
|
||||
# передаются
|
||||
AWS_ACCESS_KEY_ID: ${S3_ROOT_ACCESS_KEY:?S3_ROOT_ACCESS_KEY is empty, run make env}
|
||||
AWS_SECRET_ACCESS_KEY: ${S3_ROOT_SECRET_KEY:?S3_ROOT_SECRET_KEY is empty, run make env}
|
||||
# gRPC шлюза открыт в сеть стенда; JWT-подпись не даёт соседнему
|
||||
# контейнеру действовать от имени администратора
|
||||
WEED_JWT_FILER_SIGNING_KEY: ${S3_JWT_SIGNING_KEY:?S3_JWT_SIGNING_KEY is empty, run make env}
|
||||
# мягкий предел кучи Go заставляет GC срабатывать раньше; вместе с
|
||||
# concurrentUploadLimitMB это держит двадцать параллельных PUT по
|
||||
# 10 MiB в лимите 512 МБ
|
||||
GOMEMLIMIT: 400MiB
|
||||
ports:
|
||||
# только localhost и только API S3: проверки приватности с хоста
|
||||
# (make s3-check) и make run; консоль, UI и служебные серверы не
|
||||
# публикуются
|
||||
- "127.0.0.1:${S3_HOST_PORT:-8334}:8333"
|
||||
volumes:
|
||||
# /data объявлен в образе: данные томов, метаданные filer, пользователи
|
||||
- s3data:/data
|
||||
healthcheck:
|
||||
# четыре условия по loopback: у master есть лидер, в /dir/status уже
|
||||
# виден узел данных, filer и шлюз отвечают. Без проверки DataNodes
|
||||
# healthy приходит ~4 с до регистрации тома, и первый PUT висел бы
|
||||
# почти до своего таймаута
|
||||
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:9333/cluster/healthz && wget -q -O - http://127.0.0.1:9333/dir/status | grep -qF '\"DataNodes\":[{' && wget -q -O /dev/null http://127.0.0.1:8888/healthz && wget -q -O /dev/null http://127.0.0.1:8333/healthz"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
start_interval: 1s
|
||||
# filer на SIGTERM ждёт подписчиков около 15 с (константа в коде
|
||||
# SeaweedFS); с grace 10 с контейнер добивался бы SIGKILL и кодом 137
|
||||
stop_grace_period: 20s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "1.0"
|
||||
memory: 512M
|
||||
|
||||
# Разовая настройка S3 перед стартом реплик, по аналогии с migrate:
|
||||
# приватный bucket, пользователи api, worker и cleaner с узкими правами
|
||||
# и проверка, что анонимно ничего не читается. Запускать можно сколько
|
||||
# угодно раз — ключи и политики каждый раз приводятся к .env.
|
||||
# network_mode: service:s3 даёт общий loopback с сервером, без него до
|
||||
# master и filer не достучаться. make s3-check — тот же скрипт с check
|
||||
s3-bootstrap:
|
||||
image: *s3-image
|
||||
network_mode: service:s3
|
||||
user: seaweed
|
||||
entrypoint: ["sh", "/opt/s3/bootstrap.sh"]
|
||||
command: ["apply"]
|
||||
restart: "no"
|
||||
environment:
|
||||
S3_BUCKET: ${S3_BUCKET:-messenger-attachments}
|
||||
# weed shell обращается к IAM filer только с JWT этой подписи
|
||||
WEED_JWT_FILER_SIGNING_KEY: ${S3_JWT_SIGNING_KEY:?S3_JWT_SIGNING_KEY is empty, run make env}
|
||||
S3_API_ACCESS_KEY: ${S3_API_ACCESS_KEY:?S3_API_ACCESS_KEY is empty, run make env}
|
||||
S3_API_SECRET_KEY: ${S3_API_SECRET_KEY:?S3_API_SECRET_KEY is empty, run make env}
|
||||
S3_WORKER_ACCESS_KEY: ${S3_WORKER_ACCESS_KEY:?S3_WORKER_ACCESS_KEY is empty, run make env}
|
||||
S3_WORKER_SECRET_KEY: ${S3_WORKER_SECRET_KEY:?S3_WORKER_SECRET_KEY is empty, run make env}
|
||||
S3_CLEANER_ACCESS_KEY: ${S3_CLEANER_ACCESS_KEY:?S3_CLEANER_ACCESS_KEY is empty, run make env}
|
||||
S3_CLEANER_SECRET_KEY: ${S3_CLEANER_SECRET_KEY:?S3_CLEANER_SECRET_KEY is empty, run make env}
|
||||
# политика cleaner разрешает ListBucket лишь под этим префиксом; это
|
||||
# не секрет — cleaner вычисляет такой же из DB_NAME
|
||||
S3_CLEANER_LIST_PREFIX: ${POSTGRES_DB:?POSTGRES_DB is not set, run make env}/attachments/
|
||||
HOME: /tmp
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./infra/s3/bootstrap.sh
|
||||
target: /opt/s3/bootstrap.sh
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
# tmpfs: временные файлы с ключами и политиками не попадают на диск, а
|
||||
# объявленный в образе /data не плодит анонимный volume на каждый запуск
|
||||
tmpfs:
|
||||
- /tmp
|
||||
- /data
|
||||
depends_on:
|
||||
s3:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.5"
|
||||
memory: 128M
|
||||
|
||||
# миграции до старта реплик: тот же образ, другая команда. Один раз на
|
||||
# `up`, реплики ждут его завершения; сами реплики миграции не запускают
|
||||
# (их несколько — они гонялись бы за одну схему). Повторный запуск —
|
||||
# no-op: alembic применяет только недостающие ревизии
|
||||
migrate:
|
||||
image: mtusi-messenger-vladimirceva:lab6
|
||||
# образ собирает сервис api (make up, make docker-build)
|
||||
pull_policy: never
|
||||
command: ["python", "-m", "alembic", "upgrade", "head"]
|
||||
restart: "no"
|
||||
# migrate получает одно окружение базы
|
||||
environment: *db-env
|
||||
<<: *hardened
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.5"
|
||||
memory: 256M
|
||||
|
||||
# API масштабируется числом реплик, поэтому у сервиса нет ни ports, ни
|
||||
# container_name — с ними --scale не работает; клиенты ходят только
|
||||
# через haproxy. X-Instance-Id берётся из hostname, а это короткий ID
|
||||
# контейнера. Временно сменить число — `make replicas API_REPLICAS=N`
|
||||
api:
|
||||
build: .
|
||||
# тот же тег, что у make docker-build
|
||||
image: mtusi-messenger-vladimirceva:lab6
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: [*db-env, *cache-env, *s3-env, *telemetry-env]
|
||||
# пользователь API в S3: чтение, запись и удаление объектов своего
|
||||
# bucket; списка и прав на bucket нет
|
||||
S3_ACCESS_KEY_ID: ${S3_API_ACCESS_KEY:?S3_API_ACCESS_KEY is empty, run make env}
|
||||
S3_SECRET_ACCESS_KEY: ${S3_API_SECRET_KEY:?S3_API_SECRET_KEY is empty, run make env}
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
IDEMPOTENCY_TTL_SECONDS: ${IDEMPOTENCY_TTL_SECONDS:-86400}
|
||||
SHUTDOWN_TIMEOUT: ${SHUTDOWN_TIMEOUT:-5}
|
||||
# предел незавершённых заданий стенда; 0 — без предела
|
||||
UPLOAD_MAX_UNFINISHED: ${UPLOAD_MAX_UNFINISHED:-300}
|
||||
<<: *hardened
|
||||
# приложение ничего не пишет на диск, кроме временных файлов Python
|
||||
tmpfs:
|
||||
- /tmp
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
# API переживает отказ Valkey, но стенд стартует сразу с рабочим кэшем
|
||||
valkey:
|
||||
condition: service_healthy
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
# к первому запросу ключи API в S3 уже заведены
|
||||
s3-bootstrap:
|
||||
condition: service_completed_successfully
|
||||
# проверка здоровья задана в Dockerfile. Grace 10 с больше
|
||||
# SHUTDOWN_TIMEOUT (≤ 9 с), чтобы uvicorn закрылся сам, без SIGKILL
|
||||
stop_grace_period: 10s
|
||||
# потолок приёмного буфера TCP 512 KiB вместо 32 MiB по умолчанию в ВМ
|
||||
# Docker. Пока реплика не читает тело (ждёт место загрузки или уже
|
||||
# отказала), байты лежат в этом буфере и идут в лимит памяти
|
||||
# контейнера. Действует на все копии api, включая тестовые стенды и bench/
|
||||
sysctls:
|
||||
net.ipv4.tcp_rmem: "4096 131072 524288"
|
||||
deploy:
|
||||
replicas: ${API_REPLICAS:-2}
|
||||
resources:
|
||||
limits:
|
||||
# на event loop хватает одного ядра; только Argon2id в потоках
|
||||
# мог бы взять больше, и под лимитом вход просто медленнее.
|
||||
# 512M складываются из четырёх Argon2id по 64 MiB, самого
|
||||
# интерпретатора и четырёх мест загрузки по телу до 10 MiB
|
||||
cpus: "1.0"
|
||||
memory: 512M
|
||||
|
||||
# cleaner: фоновая уборка брошенных загрузок и сверка S3 с базой. Образ
|
||||
# тот же, что у api, точка входа своя; стартует после migrate и
|
||||
# s3-bootstrap, от него никто не зависит, портов у него нет.
|
||||
# Разовые запуски из Makefile: make cleanup-once и make reconcile
|
||||
cleaner:
|
||||
image: mtusi-messenger-vladimirceva:lab6
|
||||
pull_policy: never
|
||||
# точка входа, а не command: аргументы `docker compose run cleaner …`
|
||||
# — флаги уборщика, а не замена команды
|
||||
entrypoint: ["python", "-m", "src.cleaner"]
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: [*db-env, *s3-env]
|
||||
# проходы идут по одному, хватает одного соединения
|
||||
DB_POOL_SIZE: "1"
|
||||
DB_POOL_OVERFLOW: "0"
|
||||
# сколько держать staging и обрывки failed (окно для replay)
|
||||
STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400}
|
||||
# ключи cleaner в S3: читать, удалять и листать префикс своей базы;
|
||||
# чужих ключей и пароля Valkey он не видит
|
||||
S3_ACCESS_KEY_ID: ${S3_CLEANER_ACCESS_KEY:?S3_CLEANER_ACCESS_KEY is empty, run make env}
|
||||
S3_SECRET_ACCESS_KEY: ${S3_CLEANER_SECRET_KEY:?S3_CLEANER_SECRET_KEY is empty, run make env}
|
||||
<<: *hardened
|
||||
tmpfs:
|
||||
- /tmp
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
s3-bootstrap:
|
||||
condition: service_completed_successfully
|
||||
# унаследованный от образа healthcheck стучится в /health/ready, а у
|
||||
# cleaner нет HTTP; следить за ним — по журналу
|
||||
healthcheck:
|
||||
disable: true
|
||||
# на SIGTERM cleaner дорабатывает шаг (до 6 с) и выходит с кодом 0
|
||||
stop_grace_period: 10s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.25"
|
||||
memory: 256M
|
||||
|
||||
# брокер: одна quorum-очередь <база>.attachment-jobs (объявляют relay и
|
||||
# worker). hostname фиксирован: по нему RabbitMQ называет узел и каталог
|
||||
# данных в volume — с новым именем старые сообщения не нашлись бы
|
||||
rabbitmq:
|
||||
image: rabbitmq:4.3.7-alpine@sha256:b1f997f74103d08fc1f20a13890dc44fe6cfa51d528cf521b480ada988d3ffa5
|
||||
hostname: rabbitmq
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# пользователь создаётся при первом старте на пустом volume; смена
|
||||
# пароля потом — rabbitmqctl change_password (REPORT.md)
|
||||
RABBITMQ_DEFAULT_USER: messenger
|
||||
RABBITMQ_DEFAULT_PASS: ${BROKER_PASSWORD:?BROKER_PASSWORD is empty, run make env}
|
||||
ports:
|
||||
# только localhost: make run-worker / run-relay с хоста
|
||||
- "127.0.0.1:${BROKER_HOST_PORT:-5673}:5672"
|
||||
volumes:
|
||||
- rmqdata:/var/lib/rabbitmq
|
||||
- type: bind
|
||||
source: ./infra/rabbitmq/rabbitmq.conf
|
||||
target: /etc/rabbitmq/conf.d/90-messenger.conf
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
healthcheck:
|
||||
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 30s
|
||||
start_interval: 2s
|
||||
stop_grace_period: 20s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "1.0"
|
||||
memory: 512M
|
||||
|
||||
# relay: забирает намерения из attachment_jobs и публикует с
|
||||
# подтверждением; возвращает истёкшие аренды. S3 и Valkey ему не нужны
|
||||
relay:
|
||||
image: mtusi-messenger-vladimirceva:lab6
|
||||
pull_policy: never
|
||||
entrypoint: ["python", "-m", "src.relay"]
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: [*db-env, *broker-env, *pipeline-env, *telemetry-env]
|
||||
DB_POOL_SIZE: "1"
|
||||
DB_POOL_OVERFLOW: "0"
|
||||
<<: *hardened
|
||||
tmpfs:
|
||||
- /tmp
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
disable: true
|
||||
stop_grace_period: 10s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.25"
|
||||
memory: 192M
|
||||
|
||||
# worker: обработка изображений. Pillow работает только в его дочерних
|
||||
# процессах (src/worker/render.py) с RLIMIT_AS = RENDER_MEMORY_MB и
|
||||
# RLIMIT_CPU; лимит контейнера — на concurrency таких процессов сразу
|
||||
worker:
|
||||
image: mtusi-messenger-vladimirceva:lab6
|
||||
pull_policy: never
|
||||
entrypoint: ["python", "-m", "src.worker"]
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: [*db-env, *s3-env, *broker-env, *pipeline-env, *telemetry-env]
|
||||
# пользователь worker в S3: чтение staging, запись результата
|
||||
S3_ACCESS_KEY_ID: ${S3_WORKER_ACCESS_KEY:?S3_WORKER_ACCESS_KEY is empty, run make env}
|
||||
S3_SECRET_ACCESS_KEY: ${S3_WORKER_SECRET_KEY:?S3_WORKER_SECRET_KEY is empty, run make env}
|
||||
DB_POOL_SIZE: "2"
|
||||
DB_POOL_OVERFLOW: "1"
|
||||
WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-2}
|
||||
WORKER_PREFETCH: ${WORKER_PREFETCH:-2}
|
||||
RENDER_MEMORY_MB: ${RENDER_MEMORY_MB:-768}
|
||||
<<: *hardened
|
||||
tmpfs:
|
||||
- /tmp
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
s3-bootstrap:
|
||||
condition: service_completed_successfully
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
disable: true
|
||||
# SIGTERM: начатые задания ждут WORKER_STOP_TIMEOUT (8 с)
|
||||
stop_grace_period: 12s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "2.0"
|
||||
memory: 1536M
|
||||
|
||||
# HAProxy — единственный опубликованный вход API. Список реплик берёт из
|
||||
# DNS Docker и опрашивает их /health/ready (infra/haproxy/haproxy.cfg);
|
||||
# секретов в окружении нет
|
||||
haproxy:
|
||||
image: haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
# публикуем на 127.0.0.1: учебный стенд, из внешней сети не нужен
|
||||
- "127.0.0.1:${HOST_PORT:-8080}:8080"
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./infra/haproxy/haproxy.cfg
|
||||
target: /usr/local/etc/haproxy/haproxy.cfg
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
<<: *hardened
|
||||
# из-за зависимости LB стартует после реплик, а при остановке стенда
|
||||
# выключается первым
|
||||
depends_on:
|
||||
- api
|
||||
healthcheck:
|
||||
# /lb/ready вернёт 200, только если в backend есть живая реплика,
|
||||
# то есть LB правда может ответить. Запрос — через /dev/tcp bash:
|
||||
# curl в образе отсутствует
|
||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/8404 && printf 'GET /lb/ready HTTP/1.0\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
start_interval: 1s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
# HAProxy запущен с одним потоком (nbthread 1). С лабы 6 — 0,5
|
||||
# CPU вместо 1: телеметрия заняла 1,5 CPU, а сумма лимитов стенда
|
||||
# должна уложиться в 11 CPU машины замеров; LB на учебной
|
||||
# нагрузке берёт сотые доли ядра (нагрузочный стенд bench/ задаёт
|
||||
# свой лимит LB)
|
||||
cpus: "0.5"
|
||||
memory: 256M
|
||||
|
||||
# --- Наблюдаемость (лаба 6) -------------------------------------------------
|
||||
# Конфиги — infra/otel/, каждый файл монтируется только на чтение. Наружу
|
||||
# — одна Grafana на 127.0.0.1; OTLP, метрики и API хранилищ видны только
|
||||
# внутри сетей стенда. Приложение от этих сервисов не зависит: без них
|
||||
# API, worker и relay работают, SDK лишь теряет то, что не отправил.
|
||||
|
||||
# OpenTelemetry Collector (contrib): приёмник OTLP/HTTP для api, worker и
|
||||
# relay (сеть default) и экспорт в хранилища (сеть telemetry). В образе нет
|
||||
# оболочки — healthcheck нет, живость видна как up{job="otel-collector"}
|
||||
otel-collector:
|
||||
<<: *telemetry-service
|
||||
image: otel/opentelemetry-collector-contrib:0.164.0@sha256:340c9ca6a36617084c6661bdc4f0fe92b7cda5a805d61673ec8db375fddc522b
|
||||
command: ["--config=/etc/otelcol-contrib/collector.yaml"]
|
||||
environment:
|
||||
# memory_limiter в collector.yaml — 180 / 36 МиБ
|
||||
GOMEMLIMIT: 200MiB
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./infra/otel/collector.yaml
|
||||
target: /etc/otelcol-contrib/collector.yaml
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
networks:
|
||||
- default
|
||||
- telemetry
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.5"
|
||||
memory: 256M
|
||||
|
||||
# Prometheus — метрики: забирает экспортёр Collector и собственные метрики
|
||||
# Collector, Loki, Tempo. Срок и объём хранения — флагами
|
||||
prometheus:
|
||||
<<: *telemetry-service
|
||||
image: prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2
|
||||
command:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
- --storage.tsdb.path=/prometheus
|
||||
- --storage.tsdb.retention.time=7d
|
||||
- --storage.tsdb.retention.size=1GB
|
||||
environment:
|
||||
GOMEMLIMIT: 256MiB
|
||||
volumes:
|
||||
# /prometheus объявлен в образе, владелец nobody — chown не нужен
|
||||
- promdata:/prometheus
|
||||
- type: bind
|
||||
source: ./infra/otel/prometheus/prometheus.yml
|
||||
target: /etc/prometheus/prometheus.yml
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
# уровень 4: SLI (recording) и alert rules; тесты правил — make alerts-test
|
||||
- type: bind
|
||||
source: ./infra/otel/prometheus/rules.yml
|
||||
target: /etc/prometheus/rules.yml
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
healthcheck:
|
||||
# в образе есть busybox wget
|
||||
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:9090/-/ready"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 6
|
||||
start_period: 30s
|
||||
start_interval: 1s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.25"
|
||||
memory: 320M
|
||||
|
||||
# Loki — логи: родной OTLP-приёмник (/otlp), файловое хранилище в volume.
|
||||
# Оболочки в образе нет — healthcheck нет, живость — up{job="loki"}
|
||||
loki:
|
||||
<<: *telemetry-service
|
||||
image: grafana/loki:3.7.9@sha256:0db216b630ae1f348a1584c67f3cead8b4c1fc839169a39501db664744158e28
|
||||
command: ["-config.file=/etc/loki/loki.yaml"]
|
||||
environment:
|
||||
GOMEMLIMIT: 300MiB
|
||||
volumes:
|
||||
- lokidata:/loki
|
||||
- type: bind
|
||||
source: ./infra/otel/loki/loki.yaml
|
||||
target: /etc/loki/loki.yaml
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.25"
|
||||
memory: 384M
|
||||
|
||||
# Tempo — трассы: монолит (-target=all) с локальным хранилищем блоков.
|
||||
# Healthcheck нет по той же причине, живость — up{job="tempo"}
|
||||
tempo:
|
||||
<<: *telemetry-service
|
||||
image: grafana/tempo:3.1.1@sha256:64e2fbd56d9c2b3412a4b430a58ea59e91a670b1e75f920a0c702213ad145044
|
||||
command: ["-config.file=/etc/tempo/tempo.yaml", "-target=all"]
|
||||
environment:
|
||||
# куча Tempo упирается в GOMEMLIMIT, поэтому запас до лимита больше
|
||||
GOMEMLIMIT: 320MiB
|
||||
volumes:
|
||||
- tempodata:/var/tempo
|
||||
- type: bind
|
||||
source: ./infra/otel/tempo/tempo.yaml
|
||||
target: /etc/tempo/tempo.yaml
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.25"
|
||||
memory: 512M
|
||||
|
||||
# Grafana — только интерфейс и запросы к хранилищам; своего состояния нет
|
||||
# (tmpfs): источники и dashboard — provisioning из git, пароль admin из
|
||||
# .env действует на каждом старте, правки в UI не расходятся с git.
|
||||
# Встроенные источники, кроме трёх нужных, выключены — каждый был бы
|
||||
# отдельным процессом в памяти; установки плагинов из сети нет
|
||||
grafana:
|
||||
<<: *telemetry-service
|
||||
image: grafana/grafana:13.3.1@sha256:0615ec4fbd4072004b7d86b46ded63013a74b7d6eb1119273dd89e8fa25c13cf
|
||||
environment:
|
||||
GF_SECURITY_ADMIN_USER: admin
|
||||
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:?GRAFANA_ADMIN_PASSWORD is empty, run make env}
|
||||
GF_AUTH_ANONYMOUS_ENABLED: "false"
|
||||
GF_USERS_ALLOW_SIGN_UP: "false"
|
||||
GF_ANALYTICS_REPORTING_ENABLED: "false"
|
||||
GF_ANALYTICS_CHECK_FOR_UPDATES: "false"
|
||||
GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES: "false"
|
||||
GF_NEWS_NEWS_FEED_ENABLED: "false"
|
||||
GF_PLUGINS_PREINSTALL_DISABLED: "true"
|
||||
GF_PLUGINS_DISABLE_PLUGINS: cloudwatch,elasticsearch,graphite,influxdb,jaeger,mssql,mysql,opentsdb,stackdriver,zipkin,grafana-postgresql-datasource,grafana-pyroscope-datasource,grafana-azure-monitor-datasource,grafana-testdata-datasource
|
||||
GOMEMLIMIT: 300MiB
|
||||
ports:
|
||||
- "127.0.0.1:${GRAFANA_HOST_PORT:-3180}:3000"
|
||||
tmpfs:
|
||||
- /var/lib/grafana
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./infra/otel/grafana/datasources.yaml
|
||||
target: /etc/grafana/provisioning/datasources/datasources.yaml
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
- type: bind
|
||||
source: ./infra/otel/grafana/dashboards.yaml
|
||||
target: /etc/grafana/provisioning/dashboards/dashboards.yaml
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
- type: bind
|
||||
source: ./infra/otel/grafana/dashboards
|
||||
target: /var/lib/grafana-dashboards
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:3000/api/health"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 6
|
||||
start_period: 60s
|
||||
start_interval: 1s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.25"
|
||||
memory: 448M
|
||||
|
||||
networks:
|
||||
# хранилища телеметрии и Grafana: процессы приложения сюда не попадают и
|
||||
# до Loki, Tempo и Prometheus не достают — только до OTLP Collector. Не
|
||||
# internal: иначе не работает опубликованный порт Grafana
|
||||
telemetry:
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
s3data:
|
||||
rmqdata:
|
||||
# лаба 6: история метрик, логов и трасс переживает рестарт и make down
|
||||
promdata:
|
||||
lokidata:
|
||||
tempodata:
|
||||
@@ -0,0 +1,70 @@
|
||||
# evidence/ — доказательства для REPORT.md
|
||||
|
||||
Требования преподавателя — `evidence/README.md` (skeleton, не менять).
|
||||
Каждый файл — подтверждение строки «Доказательства критериев» в
|
||||
`REPORT.md`. Доказательства лаб 3–5 остались в их репозиториях: сюда
|
||||
ничего не копируется, всё снято заново на стенде лабы 6.
|
||||
|
||||
## Правила
|
||||
|
||||
- **Только реальный вывод** команд, которые ты сам запустил. Не дописывать
|
||||
«ожидаемое», не править числа, не склеивать прогоны без пометки. Нечем
|
||||
проверить — не создавать файл, а сказать пользователю.
|
||||
- Шапка — строки `#`: что доказывает (пункт рубрики), дата UTC, окружение
|
||||
(ОС, Docker, Compose, Python), стенд (рабочий и его порт или отдельный),
|
||||
код (`src_sha256` — SHA-256 по отсортированным путям и содержимому
|
||||
`src/` и `migrations/` без `__pycache__`, как в паспорте `bench/`).
|
||||
Как повторить — команды.
|
||||
- Команда — строкой `$ ...`, под ней вывод; сокращать можно с пометкой
|
||||
`...`, не трогая строк, на которые ссылается отчёт.
|
||||
- Итог — строкой `#` после вывода: что видно и почему это закрывает
|
||||
пункт.
|
||||
- Без секретов, токенов, ключей, `.env`, текстов сообщений; домашний
|
||||
каталог — `<репозиторий>`; у переменных окружения — только имена.
|
||||
- Файл пишется инструментом правки (`apply_patch`), а не `>` из shell.
|
||||
|
||||
## Состав
|
||||
|
||||
Сняты на машине разработки (без нагрузки), 15 ноября 2026, код
|
||||
`src_sha256 81c47ffc…` (заморожен). Файлы лабы 5, которых здесь нет (миграции,
|
||||
persistence, smoke, failover, рестарт брокера, лимиты рендера), не пересняты:
|
||||
|
||||
| Файл | Пункт рубрики |
|
||||
|---|---|
|
||||
| `stand/stand.txt` | рабочий стенд лабы 6: сервисы, loopback-порты, лимиты (Tempo 512 МиБ), образы по digest |
|
||||
| `tests/test.txt` | `make test`: публичный smoke |
|
||||
| `tests/test-isolated.txt` | `make test-isolated`: 178 passed, failover, attachment-failover, persistence |
|
||||
| `tests/failure-checks.txt` | `make failure-checks FAULT_ARGS=-rP`: 34 passed с числами |
|
||||
| `attachments/defense.txt` | `make defense`: worker стоит → 202 → ссылка 201 → 409 → рестарт → ready |
|
||||
| `s3/privacy.txt` | `make s3-check`: 79 проверок |
|
||||
| `telemetry/check.txt` | `make telemetry-check`: 22/22, пары трасса — лог |
|
||||
| `telemetry/trace-chain.txt` | `make trace-chain`: одна трасса API → relay → worker, retry и ready |
|
||||
| `telemetry/outage.txt` | `make telemetry-outage`: Tempo недоступен 120 с, потери span |
|
||||
| `alerts/promtool.txt` | `make alerts-test`: promtool check и test |
|
||||
| `alerts/alerts-check.txt` | `make alerts-check`: firing и resolved двух alert |
|
||||
| `telemetry-cost/<метка>/` | трек 1 лабы 6 — пишет `make bench-telemetry`, `quick-*` — самопроверки |
|
||||
|
||||
Снято Codex на машине замеров 16 ноября 2026 (`bench/RUNBOOK.md`):
|
||||
|
||||
| Каталог | Пункт |
|
||||
|---|---|
|
||||
| `telemetry-cost/baseline-after-restart/` | трек 1: 15/15, без flags/потерь/host_warnings, S1–S5 выполнены; `baseline/` — прерванная при host swap, сохранена отдельно |
|
||||
| `tests/host-preflight-20261116.txt` | lint, check, OpenAPI, lock, 38 unit и 5 selftest на машине замеров |
|
||||
| `tests/host-stand-20261116.txt` | smoke, telemetry 22/22, isolated 178 и все resilience 0, fault 34 |
|
||||
| `tests/final-check-20261116.txt` | финальные lint/check и isolated 178; все resilience 0, контейнеры остановлены |
|
||||
|
||||
Перед сдачей 20 ноября: `telemetry/submission-review-20261120.txt` — свежие
|
||||
smoke, telemetry 22/22, promtool 7 правил, alerts 6/6 с реальными трассами
|
||||
и логами (диагностика 7/7), trace-chain 9/9, outage 5/5. Код приложения
|
||||
совпадает с измеренной меткой; исторические результаты 15–16 ноября сохранены.
|
||||
|
||||
Поменялось показанное поведение — перезапусти проверку и обнови файл
|
||||
целиком, вместе с датой.
|
||||
|
||||
## Каталоги меток — исключение
|
||||
|
||||
`telemetry-cost/<метка>/` (и профилей прошлых лаб: `queue/`, `uploads/`,
|
||||
`reconcile/`, `failover/`, `rollout/`, `scaling/`) пишет только стенд (`make bench-*`):
|
||||
руками не править и не создавать. Каталог метки не перезаписывается и не
|
||||
удаляется без согласия пользователя. `quick-*` — самопроверки, в git и
|
||||
отчёт не идут.
|
||||
@@ -0,0 +1,43 @@
|
||||
# Доказывает (уровень 4): alerts срабатывают и гаснут на реальных отказах.
|
||||
# (а) worker остановлен → возраст старейшего задания растёт →
|
||||
# MessengerQueueLagGrowing pending → firing → после старта worker resolved;
|
||||
# (б) блокировка таблицы sessions → запросы ждут statement_timeout и дают 503
|
||||
# → MessengerHighErrorRate pending → firing → после снятия блокировки
|
||||
# resolved. Правила загружены в Prometheus рабочего стенда.
|
||||
# Дата: 2026-11-15, 22:33 UTC; длительность 390 с (фаза (а) 181 с, (б) 209 с).
|
||||
# Окружение: macOS 26.7.1, Docker 29.9.2, Compose 5.6.1, Python хоста 3.11.9.
|
||||
# Стенд: рабочий (make up); LB 127.0.0.1:8180; Prometheus — внутри сети compose.
|
||||
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Повторить: make up && make alerts-check
|
||||
# Время — секунды от начала шага проверки.
|
||||
|
||||
$ make alerts-check
|
||||
python3 scripts/lab6.py alerts-check --base-url "http://localhost:8180"
|
||||
PASS alert rules loaded in Prometheus: MessengerHighErrorRate, MessengerQueueLagGrowing, MessengerTelemetryTargetDown
|
||||
(a) worker stopped: oldest job age grows
|
||||
PASS 3 uploads accepted with worker stopped
|
||||
0 s MessengerQueueLagGrowing: inactive
|
||||
90 s MessengerQueueLagGrowing: pending
|
||||
151 s MessengerQueueLagGrowing: firing
|
||||
PASS MessengerQueueLagGrowing firing: after 151 s; backlog 3 jobs, oldest 129 s
|
||||
0 s MessengerQueueLagGrowing: firing
|
||||
25 s MessengerQueueLagGrowing: inactive
|
||||
PASS worker started: backlog drained, alert resolved: after 25 s; backlog 3 -> 0
|
||||
phase (a): 181 s
|
||||
(b) sessions table locked: authenticated requests wait and get 503
|
||||
baseline statuses: {200: 188}
|
||||
0 s MessengerHighErrorRate: inactive
|
||||
65 s MessengerHighErrorRate: pending
|
||||
126 s MessengerHighErrorRate: firing
|
||||
PASS MessengerHighErrorRate firing: after 126 s; 5xx ratio 0.43, pool used 4, waiting 0; statuses {200: 6, 503: 96}
|
||||
statuses around release: {200: 152}
|
||||
0 s MessengerHighErrorRate: firing
|
||||
65 s MessengerHighErrorRate: inactive
|
||||
PASS lock released: errors stopped, alert resolved: after 65 s; statuses after release {200: 1220}
|
||||
phase (b): 209 s
|
||||
alerts-check: PASS (6/6 checks, 390 s)
|
||||
|
||||
# Итог: 6/6. QueueLagGrowing: firing через 151 с (backlog 3, старейшее 129 с),
|
||||
# resolved через 25 с после старта worker (3 → 0). HighErrorRate: firing через
|
||||
# 126 с (доля 5xx 0,43, 503 × 96), resolved через 65 с после снятия блокировки
|
||||
# (200 × 1220). Оба alert доведены до firing и обратно до inactive.
|
||||
@@ -0,0 +1,18 @@
|
||||
# Доказывает (уровень 4): правила Prometheus (SLO recording rules и три alert)
|
||||
# проходят promtool check и unit-тесты promtool (rules.test.yml); образ
|
||||
# Prometheus — тот же digest, что в compose.yaml.
|
||||
# Дата: 2026-11-15, 22:23 UTC.
|
||||
# Окружение: macOS 26.7.1, Docker 29.9.2, Compose 5.6.1, Python хоста 3.11.9.
|
||||
# Стенд: не нужен (promtool в разовом контейнере, правила — bind-mount read-only).
|
||||
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Повторить: make alerts-test
|
||||
|
||||
$ make alerts-test
|
||||
docker run --rm -v "<репозиторий>/infra/otel/prometheus:/rules:ro" -w /rules --entrypoint promtool prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2 check rules rules.yml
|
||||
Checking rules.yml
|
||||
SUCCESS: 7 rules found
|
||||
|
||||
docker run --rm -v "<репозиторий>/infra/otel/prometheus:/rules:ro" -w /rules --entrypoint promtool prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2 test rules rules.test.yml
|
||||
SUCCESS
|
||||
|
||||
# Итог: PASS — 7 правил, тесты правил SUCCESS.
|
||||
@@ -0,0 +1,47 @@
|
||||
# Доказывает: worker стоит → загрузка 202 queued → сообщение со ссылкой 201 →
|
||||
# байты 409 → текст 201 → scripts/restart.sh (LB, реплики, PostgreSQL,
|
||||
# Valkey, S3, RabbitMQ, relay) → задание пережило рестарт, после старта
|
||||
# worker — ready, оригинал совпадает с фикстурой по SHA-256, thumbnail JPEG
|
||||
# 256×160.
|
||||
# Дата: 2026-11-15, 22:22 UTC (прогон шёл параллельно с make test-isolated на
|
||||
# отдельном стенде vladimirceva-lab6-isolated).
|
||||
# Окружение: macOS 26.7.1, Docker 29.9.2, Compose 5.6.1, Python хоста 3.11.9.
|
||||
# Стенд: рабочий (make up); LB на 127.0.0.1:8180.
|
||||
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Повторить: make up && make defense
|
||||
|
||||
$ make defense
|
||||
python3 scripts/lab6.py defense --base-url "http://localhost:8180"
|
||||
$ docker compose stop worker
|
||||
worker stopped; upload -> 202 queued
|
||||
attachment_id=f328f7ea-8daa-4a61-ab5e-bb73c4ddedc1
|
||||
message with queued attachment -> 201
|
||||
content while worker is stopped -> 409
|
||||
plain text message meanwhile -> 201
|
||||
StartedAt before restart:
|
||||
vladimirceva-lab6-api-1 2026-11-15T22:21:14.326654554Z; vladimirceva-lab6-api-2 2026-11-15T22:21:14.418838429Z
|
||||
vladimirceva-lab6-postgres-1 2026-11-15T22:21:03.104030007Z
|
||||
vladimirceva-lab6-valkey-1 2026-11-15T22:21:03.289816549Z
|
||||
vladimirceva-lab6-s3-1 2026-11-15T22:22:33.971774091Z
|
||||
vladimirceva-lab6-rabbitmq-1 2026-11-15T22:21:03.197266507Z
|
||||
worker: not running
|
||||
vladimirceva-lab6-relay-1 2026-11-15T22:21:07.288409843Z
|
||||
$ scripts/restart.sh -> exit 0
|
||||
after restart, worker still stopped: queued
|
||||
$ docker compose start worker
|
||||
after worker start: ready error_code=None
|
||||
original -> 200, sha256 == fixture
|
||||
thumbnail -> 200, JPEG (256, 160)
|
||||
StartedAt after:
|
||||
vladimirceva-lab6-api-1 2026-11-15T22:23:17.889222958Z; vladimirceva-lab6-api-2 2026-11-15T22:23:17.974980875Z
|
||||
vladimirceva-lab6-postgres-1 2026-11-15T22:22:54.207387795Z
|
||||
vladimirceva-lab6-valkey-1 2026-11-15T22:22:54.24856817Z
|
||||
vladimirceva-lab6-s3-1 2026-11-15T22:23:09.16088876Z
|
||||
vladimirceva-lab6-rabbitmq-1 2026-11-15T22:22:55.267222379Z
|
||||
vladimirceva-lab6-worker-1 2026-11-15T22:23:20.007711751Z
|
||||
vladimirceva-lab6-relay-1 2026-11-15T22:21:07.288409843Z
|
||||
PASS
|
||||
|
||||
# Итог: PASS, 31 с. Все сервисы, кроме relay, имеют новый StartedAt; задание
|
||||
# осталось queued и стало ready после старта worker; байты — 409 до ready,
|
||||
# 200 после.
|
||||
@@ -0,0 +1,80 @@
|
||||
# Доказывает: bucket приватный; ключ API — put/get/head своих объектов, без
|
||||
# list, delete и операций над bucket; ключ worker — только put/get; ключ
|
||||
# уборщика — get/head/delete и list только префикса вложений; чужой bucket —
|
||||
# 403 всем; аноним — 403 изнутри, с хоста и из сети стенда; наружу у S3
|
||||
# только порт API.
|
||||
# Дата: 2026-11-15, 22:22 UTC.
|
||||
# Окружение: macOS 26.7.1, Docker 29.9.2, Compose 5.6.1, Python хоста 3.11.9.
|
||||
# Стенд: рабочий (make up); S3 API на 127.0.0.1:8434.
|
||||
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Повторить: make s3-check
|
||||
# Строки `...` — пропущены однотипные проверки (403 на операции над bucket и
|
||||
# политиками); итоговая строка `checks:` считает все 79.
|
||||
|
||||
$ make s3-check
|
||||
python3 scripts/lab6.py s3-check
|
||||
$ docker compose run --rm --no-deps s3-bootstrap check
|
||||
s3-bootstrap: checks passed; probe object messenger-attachments/.s3-check/probe kept for host and network checks
|
||||
$ docker compose run --rm --no-deps s3-bootstrap cleanup -> exit 0
|
||||
where check expected got verdict
|
||||
bootstrap (loopback s3) anonymous access setting none none ok
|
||||
bootstrap (loopback s3) api key put object 200 200 ok
|
||||
bootstrap (loopback s3) api key get object 200 200 ok
|
||||
bootstrap (loopback s3) api key head object 200 200 ok
|
||||
bootstrap (loopback s3) api key get missing object 404 404 ok
|
||||
bootstrap (loopback s3) api key list objects 403 403 ok
|
||||
bootstrap (loopback s3) api key create bucket 403 403 ok
|
||||
bootstrap (loopback s3) api key delete bucket 403 403 ok
|
||||
...
|
||||
bootstrap (loopback s3) worker key put object 200 200 ok
|
||||
bootstrap (loopback s3) worker key get object 200 200 ok
|
||||
bootstrap (loopback s3) worker key delete object 403 403 ok
|
||||
bootstrap (loopback s3) worker key list objects 403 403 ok
|
||||
bootstrap (loopback s3) worker key list attachments prefix 403 403 ok
|
||||
...
|
||||
bootstrap (loopback s3) api key put cleaner probe object 200 200 ok
|
||||
bootstrap (loopback s3) cleaner key get object 200 200 ok
|
||||
bootstrap (loopback s3) cleaner key head object 200 200 ok
|
||||
bootstrap (loopback s3) cleaner key delete object 204 204 ok
|
||||
bootstrap (loopback s3) cleaner key delete object again 204 204 ok
|
||||
bootstrap (loopback s3) api key get deleted object 404 404 ok
|
||||
bootstrap (loopback s3) cleaner key delete missing object 204 204 ok
|
||||
bootstrap (loopback s3) cleaner key put object 403 403 ok
|
||||
bootstrap (loopback s3) cleaner key list objects 403 403 ok
|
||||
bootstrap (loopback s3) cleaner key list attachments prefix 200 200 ok
|
||||
bootstrap (loopback s3) cleaner key list other prefix 403 403 ok
|
||||
...
|
||||
bootstrap (loopback s3) api key put object to other bucket 403 403 ok
|
||||
bootstrap (loopback s3) api key get object from other bucket 403 403 ok
|
||||
bootstrap (loopback s3) api key list other bucket 403 403 ok
|
||||
bootstrap (loopback s3) worker key put object to other bucket 403 403 ok
|
||||
bootstrap (loopback s3) cleaner key put object to other bucket 403 403 ok
|
||||
...
|
||||
bootstrap (loopback s3) anonymous get object 403 403 ok
|
||||
bootstrap (loopback s3) anonymous head object 403 403 ok
|
||||
bootstrap (loopback s3) anonymous get missing object 403 403 ok
|
||||
bootstrap (loopback s3) anonymous list objects 403 403 ok
|
||||
bootstrap (loopback s3) anonymous list buckets 403 403 ok
|
||||
bootstrap (loopback s3) anonymous put object 403 403 ok
|
||||
bootstrap (loopback s3) anonymous create bucket 403 403 ok
|
||||
host 127.0.0.1 anonymous get object 403 403 ok
|
||||
host 127.0.0.1 anonymous head object 403 403 ok
|
||||
host 127.0.0.1 anonymous list objects 403 403 ok
|
||||
host 127.0.0.1 anonymous list buckets 403 403 ok
|
||||
host 127.0.0.1 anonymous put object 403 403 ok
|
||||
stand network (haproxy) anonymous get object 403 403 ok
|
||||
stand network (haproxy) anonymous list objects 403 403 ok
|
||||
stand network (haproxy) anonymous put object 403 403 ok
|
||||
stand network (haproxy) s3 port 8080 closed closed ok
|
||||
stand network (haproxy) s3 port 8333 open open ok
|
||||
stand network (haproxy) s3 port 8888 closed closed ok
|
||||
stand network (haproxy) s3 port 9333 closed closed ok
|
||||
stand network (haproxy) s3 port 18080 closed closed ok
|
||||
stand network (haproxy) s3 port 18333 open open ok
|
||||
stand network (haproxy) s3 port 18888 closed closed ok
|
||||
stand network (haproxy) s3 port 19333 closed closed ok
|
||||
stand network (haproxy) s3 port 46655 closed closed ok
|
||||
checks: 79, failed: 0, bootstrap exit 0
|
||||
|
||||
# Итог: 79 проверок, 0 расхождений (PASS). Ключи API, worker и уборщика имеют
|
||||
# только свои права, чужой bucket и аноним — 403, наружу открыт только порт API.
|
||||
@@ -0,0 +1,53 @@
|
||||
# Доказывает: рабочий стенд лабы 6 — отдельные api (2 реплики), relay, worker,
|
||||
# cleaner; LB — единственный вход API; наружу только loopback-порты
|
||||
# (LB 8180, PostgreSQL 5533, Valkey 6480, S3 8434, RabbitMQ 5773, Grafana
|
||||
# 3180), порты Collector, Prometheus, Loki, Tempo наружу не опубликованы;
|
||||
# лимиты CPU/памяти у всех сервисов (swap = 2 × память — как в compose.yaml);
|
||||
# образы сервисов закреплены по digest, образ приложения — один у api, relay,
|
||||
# worker, cleaner. Память Tempo рабочего стенда — 512 МиБ (768 МиБ — только
|
||||
# у стенда замеров bench/, см. bench/AGENTS.md).
|
||||
# Дата: 2026-11-15, 22:26 UTC.
|
||||
# Окружение: macOS 26.7.1, Docker 29.9.2, Compose 5.6.1, Python хоста 3.11.9.
|
||||
# Стенд: рабочий (make up), проект compose vladimirceva-lab6.
|
||||
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Повторить: make up; docker compose ps; docker inspect (команды ниже)
|
||||
|
||||
$ docker compose ps --format 'table {{.Service}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}'
|
||||
SERVICE IMAGE STATUS PORTS
|
||||
api sha256:9da616a68b66888161151f8e6afae0ed8edd250c09dcbac3435aa9a50fd620d3 Up 52 seconds (healthy) 8080/tcp
|
||||
api sha256:9da616a68b66888161151f8e6afae0ed8edd250c09dcbac3435aa9a50fd620d3 Up 52 seconds (healthy) 8080/tcp
|
||||
cleaner sha256:9da616a68b66888161151f8e6afae0ed8edd250c09dcbac3435aa9a50fd620d3 Up 2 minutes 8080/tcp
|
||||
grafana grafana/grafana:13.3.1@sha256:0615ec4fbd4072004b7d86b46ded63013a74b7d6eb1119273dd89e8fa25c13cf Up 3 minutes (healthy) 127.0.0.1:3180->3000/tcp
|
||||
haproxy haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26 Up 52 seconds (healthy) 127.0.0.1:8180->8080/tcp
|
||||
loki grafana/loki:3.7.9@sha256:0db216b630ae1f348a1584c67f3cead8b4c1fc839169a39501db664744158e28 Up 3 minutes 3100/tcp
|
||||
otel-collector otel/opentelemetry-collector-contrib:0.164.0@sha256:340c9ca6a36617084c6661bdc4f0fe92b7cda5a805d61673ec8db375fddc522b Up 3 minutes 4317-4318/tcp, 55679/tcp
|
||||
postgres postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722 Up About a minute (healthy) 127.0.0.1:5533->5432/tcp
|
||||
prometheus prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2 Up 3 minutes (healthy) 9090/tcp
|
||||
rabbitmq rabbitmq:4.3.7-alpine@sha256:b1f997f74103d08fc1f20a13890dc44fe6cfa51d528cf521b480ada988d3ffa5 Up About a minute (healthy) 127.0.0.1:5773->5672/tcp
|
||||
relay sha256:9da616a68b66888161151f8e6afae0ed8edd250c09dcbac3435aa9a50fd620d3 Up 3 minutes 8080/tcp
|
||||
s3 chrislusf/seaweedfs:4.48@sha256:4e61d15fd35994cb1e43e1e553dff106794841fd9a99ade2fc8c8bfce4d7872d Up About a minute (healthy) 127.0.0.1:8434->8333/tcp
|
||||
tempo grafana/tempo:3.1.1@sha256:64e2fbd56d9c2b3412a4b430a58ea59e91a670b1e75f920a0c702213ad145044 Up 3 minutes
|
||||
valkey valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd Up About a minute (healthy) 127.0.0.1:6480->6379/tcp
|
||||
worker sha256:9da616a68b66888161151f8e6afae0ed8edd250c09dcbac3435aa9a50fd620d3 Up 50 seconds 8080/tcp
|
||||
|
||||
$ docker inspect -f '<сервис> cpus={{.HostConfig.NanoCpus}} mem={{.HostConfig.Memory}} swap={{.HostConfig.MemorySwap}}' <контейнеры проекта>
|
||||
api cpus=1000000000 mem=536870912 swap=1073741824
|
||||
api cpus=1000000000 mem=536870912 swap=1073741824
|
||||
cleaner cpus=250000000 mem=268435456 swap=536870912
|
||||
grafana cpus=250000000 mem=469762048 swap=939524096
|
||||
haproxy cpus=500000000 mem=268435456 swap=536870912
|
||||
loki cpus=250000000 mem=402653184 swap=805306368
|
||||
otel-collector cpus=500000000 mem=268435456 swap=536870912
|
||||
postgres cpus=2000000000 mem=1073741824 swap=2147483648
|
||||
prometheus cpus=250000000 mem=335544320 swap=671088640
|
||||
rabbitmq cpus=1000000000 mem=536870912 swap=1073741824
|
||||
relay cpus=250000000 mem=201326592 swap=402653184
|
||||
s3 cpus=1000000000 mem=536870912 swap=1073741824
|
||||
tempo cpus=250000000 mem=536870912 swap=1073741824
|
||||
valkey cpus=500000000 mem=134217728 swap=268435456
|
||||
worker cpus=2000000000 mem=1610612736 swap=3221225472
|
||||
|
||||
# Итог: образ приложения один (sha256:9da616a6…) у api ×2, relay, worker, cleaner;
|
||||
# образы сервисов — по digest; публикуются только 127.0.0.1:{8180,5533,6480,8434,
|
||||
# 5773,3180}, у api, cleaner, relay, worker, Collector, Prometheus, Loki, Tempo
|
||||
# порты только внутри сети compose; у каждого сервиса лимиты CPU и памяти.
|
||||
@@ -0,0 +1,241 @@
|
||||
run,variant,repeat,window,class,n,unexpected,dropped,p50_ms,p95_ms,p99_ms,max_ms
|
||||
balanced-r1,balanced,1,clean,read,9000,0,0,3.6,5.7,7.3,60.9
|
||||
balanced-r1,balanced,1,clean,write,2700,0,0,4.5,6.8,8.0,37.0
|
||||
balanced-r1,balanced,1,clean,me,3600,0,0,1.5,2.9,3.6,32.6
|
||||
balanced-r1,balanced,1,clean,chat,2700,0,0,2.2,3.8,4.9,49.7
|
||||
balanced-r1,balanced,1,clean,download,720,0,0,5.4,7.8,9.4,18.1
|
||||
balanced-r1,balanced,1,clean,upload,45,0,0,16.8,20.7,22.7,22.7
|
||||
balanced-r1,balanced,1,clean,bad,9,0,0,7.9,13.0,13.0,13.0
|
||||
balanced-r1,balanced,1,clean,broken,18,0,0,3.2,8.2,8.2,8.2
|
||||
balanced-r1,balanced,1,fault,read,3000,0,0,3.6,5.8,7.9,49.4
|
||||
balanced-r1,balanced,1,fault,write,900,0,0,4.5,100.6,497.1,596.3
|
||||
balanced-r1,balanced,1,fault,me,1200,0,0,1.5,2.9,3.9,22.4
|
||||
balanced-r1,balanced,1,fault,chat,900,0,0,2.2,3.7,4.8,33.8
|
||||
balanced-r1,balanced,1,fault,download,240,0,0,5.6,8.1,9.5,19.6
|
||||
balanced-r1,balanced,1,fault,upload,15,0,0,17.1,31.9,31.9,31.9
|
||||
balanced-r1,balanced,1,fault,bad,3,0,0,8.8,17.5,17.5,17.5
|
||||
balanced-r1,balanced,1,fault,broken,6,0,0,4.0,13.7,13.7,13.7
|
||||
head-r1,head,1,clean,read,9000,0,0,3.7,6.3,8.1,17.6
|
||||
head-r1,head,1,clean,write,2700,0,0,4.7,7.4,8.6,16.8
|
||||
head-r1,head,1,clean,me,3600,0,0,1.4,3.0,3.8,7.4
|
||||
head-r1,head,1,clean,chat,2700,0,0,2.4,4.5,5.6,11.7
|
||||
head-r1,head,1,clean,download,720,0,0,5.6,8.6,10.1,16.4
|
||||
head-r1,head,1,clean,upload,45,0,0,18.2,21.7,22.9,22.9
|
||||
head-r1,head,1,clean,bad,9,0,0,10.1,12.7,12.7,12.7
|
||||
head-r1,head,1,clean,broken,18,0,0,4.3,7.2,7.2,7.2
|
||||
head-r1,head,1,fault,read,3000,0,0,4.0,7.0,9.4,69.0
|
||||
head-r1,head,1,fault,write,900,0,0,4.9,86.8,487.0,585.9
|
||||
head-r1,head,1,fault,me,1200,0,0,1.4,3.4,4.2,48.3
|
||||
head-r1,head,1,fault,chat,900,0,0,2.6,5.2,6.0,60.5
|
||||
head-r1,head,1,fault,download,240,0,0,5.9,9.2,11.7,37.6
|
||||
head-r1,head,1,fault,upload,15,0,0,18.3,40.3,40.3,40.3
|
||||
head-r1,head,1,fault,bad,3,0,0,10.3,11.2,11.2,11.2
|
||||
head-r1,head,1,fault,broken,6,0,0,3.8,5.3,5.3,5.3
|
||||
tail-r1,tail,1,clean,read,9000,0,0,3.9,6.9,9.3,57.6
|
||||
tail-r1,tail,1,clean,write,2700,0,0,4.7,7.7,9.3,46.1
|
||||
tail-r1,tail,1,clean,me,3600,0,0,1.4,3.3,4.2,42.3
|
||||
tail-r1,tail,1,clean,chat,2700,0,0,2.5,5.1,6.3,43.5
|
||||
tail-r1,tail,1,clean,download,720,0,0,5.9,9.4,11.4,16.5
|
||||
tail-r1,tail,1,clean,upload,45,0,0,18.7,22.0,23.0,23.0
|
||||
tail-r1,tail,1,clean,bad,9,0,0,10.3,12.0,12.0,12.0
|
||||
tail-r1,tail,1,clean,broken,18,0,0,3.8,6.8,6.8,6.8
|
||||
tail-r1,tail,1,fault,read,3000,0,0,3.9,6.9,9.1,63.1
|
||||
tail-r1,tail,1,fault,write,900,0,0,4.8,113.9,511.5,611.9
|
||||
tail-r1,tail,1,fault,me,1200,0,0,1.5,3.3,4.5,41.6
|
||||
tail-r1,tail,1,fault,chat,900,0,0,2.4,5.1,5.8,19.5
|
||||
tail-r1,tail,1,fault,download,240,0,0,5.9,9.3,12.2,16.9
|
||||
tail-r1,tail,1,fault,upload,15,0,0,18.9,27.6,27.6,27.6
|
||||
tail-r1,tail,1,fault,bad,3,0,0,9.7,10.7,10.7,10.7
|
||||
tail-r1,tail,1,fault,broken,6,0,0,4.2,7.1,7.1,7.1
|
||||
off-r1,off,1,clean,read,9000,0,0,3.9,7.2,9.0,19.0
|
||||
off-r1,off,1,clean,write,2700,0,0,4.7,7.7,8.5,18.6
|
||||
off-r1,off,1,clean,me,3600,0,0,1.5,3.5,4.1,11.8
|
||||
off-r1,off,1,clean,chat,2700,0,0,2.6,5.1,6.5,10.8
|
||||
off-r1,off,1,clean,download,720,0,0,6.0,9.3,11.0,18.5
|
||||
off-r1,off,1,clean,upload,45,0,0,19.4,24.6,42.8,42.8
|
||||
off-r1,off,1,clean,bad,9,0,0,9.7,11.1,11.1,11.1
|
||||
off-r1,off,1,clean,broken,18,0,0,4.8,6.7,6.7,6.7
|
||||
off-r1,off,1,fault,read,3000,0,0,3.9,7.2,9.6,57.2
|
||||
off-r1,off,1,fault,write,900,0,0,4.8,110.0,517.2,609.6
|
||||
off-r1,off,1,fault,me,1200,0,0,1.5,3.6,4.4,27.2
|
||||
off-r1,off,1,fault,chat,900,0,0,2.7,5.1,6.7,18.6
|
||||
off-r1,off,1,fault,download,240,0,0,6.0,9.7,10.7,29.5
|
||||
off-r1,off,1,fault,upload,15,0,0,19.1,22.2,22.2,22.2
|
||||
off-r1,off,1,fault,bad,3,0,0,10.2,10.9,10.9,10.9
|
||||
off-r1,off,1,fault,broken,6,0,0,3.6,6.5,6.5,6.5
|
||||
full-r1,full,1,clean,read,9000,0,0,3.8,6.8,8.9,62.2
|
||||
full-r1,full,1,clean,write,2700,0,0,4.7,7.7,9.2,57.4
|
||||
full-r1,full,1,clean,me,3600,0,0,1.6,3.5,4.3,54.5
|
||||
full-r1,full,1,clean,chat,2700,0,0,2.6,5.1,6.5,41.3
|
||||
full-r1,full,1,clean,download,720,0,0,5.9,9.2,11.5,64.6
|
||||
full-r1,full,1,clean,upload,45,0,0,16.8,21.5,25.4,25.4
|
||||
full-r1,full,1,clean,bad,9,0,0,9.8,12.0,12.0,12.0
|
||||
full-r1,full,1,clean,broken,18,0,0,4.8,11.2,11.2,11.2
|
||||
full-r1,full,1,fault,read,3000,0,0,3.9,7.0,9.5,76.7
|
||||
full-r1,full,1,fault,write,900,0,0,4.9,108.1,508.8,606.7
|
||||
full-r1,full,1,fault,me,1200,0,0,1.7,3.6,4.6,39.0
|
||||
full-r1,full,1,fault,chat,900,0,0,2.4,5.0,6.1,38.7
|
||||
full-r1,full,1,fault,download,240,0,0,6.0,9.6,21.2,30.5
|
||||
full-r1,full,1,fault,upload,15,0,0,18.8,45.0,45.0,45.0
|
||||
full-r1,full,1,fault,bad,3,0,0,10.2,10.9,10.9,10.9
|
||||
full-r1,full,1,fault,broken,6,0,0,4.5,7.7,7.7,7.7
|
||||
balanced-r2,balanced,2,clean,read,9000,0,0,3.8,6.9,9.3,53.0
|
||||
balanced-r2,balanced,2,clean,write,2700,0,0,4.7,7.8,9.5,29.7
|
||||
balanced-r2,balanced,2,clean,me,3600,0,0,1.4,3.3,4.2,47.8
|
||||
balanced-r2,balanced,2,clean,chat,2700,0,0,2.5,5.1,6.3,42.7
|
||||
balanced-r2,balanced,2,clean,download,720,0,0,5.9,9.0,11.1,14.8
|
||||
balanced-r2,balanced,2,clean,upload,45,0,0,17.6,23.5,27.3,27.3
|
||||
balanced-r2,balanced,2,clean,bad,9,0,0,10.4,11.9,11.9,11.9
|
||||
balanced-r2,balanced,2,clean,broken,18,0,0,5.2,7.6,7.6,7.6
|
||||
balanced-r2,balanced,2,fault,read,3000,0,0,3.9,7.1,10.5,67.8
|
||||
balanced-r2,balanced,2,fault,write,900,0,0,4.8,102.0,496.8,599.8
|
||||
balanced-r2,balanced,2,fault,me,1200,0,0,1.4,3.3,4.3,24.0
|
||||
balanced-r2,balanced,2,fault,chat,900,0,0,2.5,5.2,9.4,52.9
|
||||
balanced-r2,balanced,2,fault,download,240,0,0,6.2,9.8,13.7,49.1
|
||||
balanced-r2,balanced,2,fault,upload,15,0,0,18.4,26.3,26.3,26.3
|
||||
balanced-r2,balanced,2,fault,bad,3,0,0,10.2,11.6,11.6,11.6
|
||||
balanced-r2,balanced,2,fault,broken,6,0,0,3.7,6.6,6.6,6.6
|
||||
tail-r2,tail,2,clean,read,9000,0,0,4.0,7.3,9.7,58.3
|
||||
tail-r2,tail,2,clean,write,2700,0,0,4.9,8.0,9.9,37.5
|
||||
tail-r2,tail,2,clean,me,3600,0,0,1.6,3.5,4.9,52.8
|
||||
tail-r2,tail,2,clean,chat,2700,0,0,2.7,5.1,6.5,11.8
|
||||
tail-r2,tail,2,clean,download,720,0,0,5.9,9.5,12.5,55.8
|
||||
tail-r2,tail,2,clean,upload,45,0,0,18.0,21.6,23.7,23.7
|
||||
tail-r2,tail,2,clean,bad,9,0,0,10.2,10.9,10.9,10.9
|
||||
tail-r2,tail,2,clean,broken,18,0,0,3.9,6.1,6.1,6.1
|
||||
tail-r2,tail,2,fault,read,3000,0,0,3.9,7.6,10.3,69.3
|
||||
tail-r2,tail,2,fault,write,900,0,0,5.0,126.0,523.3,623.8
|
||||
tail-r2,tail,2,fault,me,1200,0,0,1.6,3.7,5.5,48.4
|
||||
tail-r2,tail,2,fault,chat,900,0,0,2.7,5.3,6.4,41.2
|
||||
tail-r2,tail,2,fault,download,240,0,0,5.9,10.1,11.7,23.1
|
||||
tail-r2,tail,2,fault,upload,15,0,0,19.7,72.4,72.4,72.4
|
||||
tail-r2,tail,2,fault,bad,3,0,0,8.8,9.7,9.7,9.7
|
||||
tail-r2,tail,2,fault,broken,6,0,0,3.6,4.8,4.8,4.8
|
||||
off-r2,off,2,clean,read,9000,0,0,4.1,7.5,9.6,17.0
|
||||
off-r2,off,2,clean,write,2700,0,0,4.8,8.0,9.0,18.2
|
||||
off-r2,off,2,clean,me,3600,0,0,1.5,3.6,4.6,10.5
|
||||
off-r2,off,2,clean,chat,2700,0,0,2.7,5.4,7.0,12.5
|
||||
off-r2,off,2,clean,download,720,0,0,6.2,9.3,11.0,21.9
|
||||
off-r2,off,2,clean,upload,45,0,0,18.4,21.7,22.8,22.8
|
||||
off-r2,off,2,clean,bad,9,0,0,9.6,12.0,12.0,12.0
|
||||
off-r2,off,2,clean,broken,18,0,0,3.9,8.2,8.2,8.2
|
||||
off-r2,off,2,fault,read,3000,0,0,4.1,7.6,10.0,46.6
|
||||
off-r2,off,2,fault,write,900,0,0,5.0,108.1,506.6,605.7
|
||||
off-r2,off,2,fault,me,1200,0,0,1.5,3.6,4.8,25.2
|
||||
off-r2,off,2,fault,chat,900,0,0,2.8,5.3,7.1,22.4
|
||||
off-r2,off,2,fault,download,240,0,0,6.0,9.6,11.1,24.4
|
||||
off-r2,off,2,fault,upload,15,0,0,20.6,33.1,33.1,33.1
|
||||
off-r2,off,2,fault,bad,3,0,0,10.0,12.2,12.2,12.2
|
||||
off-r2,off,2,fault,broken,6,0,0,4.3,5.6,5.6,5.6
|
||||
head-r2,head,2,clean,read,9000,0,0,3.9,7.0,9.1,22.0
|
||||
head-r2,head,2,clean,write,2700,0,0,4.6,7.6,9.1,24.4
|
||||
head-r2,head,2,clean,me,3600,0,0,1.4,3.3,4.0,13.5
|
||||
head-r2,head,2,clean,chat,2700,0,0,2.6,5.2,6.3,19.5
|
||||
head-r2,head,2,clean,download,720,0,0,5.8,9.0,11.7,16.9
|
||||
head-r2,head,2,clean,upload,45,0,0,18.5,24.1,25.2,25.2
|
||||
head-r2,head,2,clean,bad,9,0,0,10.6,12.5,12.5,12.5
|
||||
head-r2,head,2,clean,broken,18,0,0,3.4,6.1,6.1,6.1
|
||||
head-r2,head,2,fault,read,3000,0,0,4.0,7.2,9.4,61.6
|
||||
head-r2,head,2,fault,write,900,0,0,4.8,112.2,509.3,608.2
|
||||
head-r2,head,2,fault,me,1200,0,0,1.5,3.4,3.9,48.2
|
||||
head-r2,head,2,fault,chat,900,0,0,2.6,5.3,6.2,22.9
|
||||
head-r2,head,2,fault,download,240,0,0,6.0,9.7,26.4,37.4
|
||||
head-r2,head,2,fault,upload,15,0,0,19.6,58.8,58.8,58.8
|
||||
head-r2,head,2,fault,bad,3,0,0,9.9,10.6,10.6,10.6
|
||||
head-r2,head,2,fault,broken,6,0,0,4.3,6.2,6.2,6.2
|
||||
full-r2,full,2,clean,read,9000,0,0,3.9,7.2,9.6,61.6
|
||||
full-r2,full,2,clean,write,2700,0,0,4.8,7.8,9.7,52.6
|
||||
full-r2,full,2,clean,me,3600,0,0,1.7,3.7,4.6,38.6
|
||||
full-r2,full,2,clean,chat,2700,0,0,2.6,4.9,6.8,57.1
|
||||
full-r2,full,2,clean,download,720,0,0,5.8,9.2,10.8,52.3
|
||||
full-r2,full,2,clean,upload,45,0,0,18.9,21.0,25.5,25.5
|
||||
full-r2,full,2,clean,bad,9,0,0,10.5,41.5,41.5,41.5
|
||||
full-r2,full,2,clean,broken,18,0,0,4.8,7.8,7.8,7.8
|
||||
full-r2,full,2,fault,read,3000,0,0,3.9,7.0,10.1,69.3
|
||||
full-r2,full,2,fault,write,900,0,0,4.9,110.1,515.1,609.2
|
||||
full-r2,full,2,fault,me,1200,0,0,1.7,3.8,5.4,28.0
|
||||
full-r2,full,2,fault,chat,900,0,0,2.6,4.8,6.9,36.9
|
||||
full-r2,full,2,fault,download,240,0,0,5.8,9.7,12.6,24.5
|
||||
full-r2,full,2,fault,upload,15,0,0,20.0,40.6,40.6,40.6
|
||||
full-r2,full,2,fault,bad,3,0,0,9.0,9.2,9.2,9.2
|
||||
full-r2,full,2,fault,broken,6,0,0,3.9,6.3,6.3,6.3
|
||||
head-r3,head,3,clean,read,9000,0,0,3.9,7.0,8.9,28.5
|
||||
head-r3,head,3,clean,write,2700,0,0,4.7,7.7,9.2,18.1
|
||||
head-r3,head,3,clean,me,3600,0,0,1.5,3.5,4.1,14.9
|
||||
head-r3,head,3,clean,chat,2700,0,0,2.6,5.2,6.4,24.1
|
||||
head-r3,head,3,clean,download,720,0,0,5.9,9.1,11.1,12.8
|
||||
head-r3,head,3,clean,upload,45,0,0,19.2,22.8,25.3,25.3
|
||||
head-r3,head,3,clean,bad,9,0,0,9.7,11.2,11.2,11.2
|
||||
head-r3,head,3,clean,broken,18,0,0,4.0,6.8,6.8,6.8
|
||||
head-r3,head,3,fault,read,3000,0,0,3.9,7.0,9.5,65.2
|
||||
head-r3,head,3,fault,write,900,0,0,4.6,105.3,506.3,605.1
|
||||
head-r3,head,3,fault,me,1200,0,0,1.5,3.4,4.0,43.3
|
||||
head-r3,head,3,fault,chat,900,0,0,2.7,5.5,7.7,25.2
|
||||
head-r3,head,3,fault,download,240,0,0,6.0,9.5,19.3,52.4
|
||||
head-r3,head,3,fault,upload,15,0,0,17.8,26.4,26.4,26.4
|
||||
head-r3,head,3,fault,bad,3,0,0,10.4,10.9,10.9,10.9
|
||||
head-r3,head,3,fault,broken,6,0,0,4.0,5.8,5.8,5.8
|
||||
balanced-r3,balanced,3,clean,read,9000,0,0,3.9,7.0,9.5,86.5
|
||||
balanced-r3,balanced,3,clean,write,2700,0,0,4.7,7.9,11.1,96.9
|
||||
balanced-r3,balanced,3,clean,me,3600,0,0,1.5,3.5,4.3,49.1
|
||||
balanced-r3,balanced,3,clean,chat,2700,0,0,2.5,5.0,6.4,86.1
|
||||
balanced-r3,balanced,3,clean,download,720,0,0,5.9,9.4,11.0,22.7
|
||||
balanced-r3,balanced,3,clean,upload,45,0,0,17.9,21.7,22.8,22.8
|
||||
balanced-r3,balanced,3,clean,bad,9,0,0,10.2,12.7,12.7,12.7
|
||||
balanced-r3,balanced,3,clean,broken,18,0,0,3.9,6.9,6.9,6.9
|
||||
balanced-r3,balanced,3,fault,read,3000,0,0,4.0,7.0,9.5,54.3
|
||||
balanced-r3,balanced,3,fault,write,900,0,0,4.8,108.1,507.2,607.9
|
||||
balanced-r3,balanced,3,fault,me,1200,0,0,1.5,3.6,4.3,26.4
|
||||
balanced-r3,balanced,3,fault,chat,900,0,0,2.5,5.0,7.4,17.5
|
||||
balanced-r3,balanced,3,fault,download,240,0,0,5.8,10.3,13.6,59.1
|
||||
balanced-r3,balanced,3,fault,upload,15,0,0,18.7,85.3,85.3,85.3
|
||||
balanced-r3,balanced,3,fault,bad,3,0,0,11.0,11.6,11.6,11.6
|
||||
balanced-r3,balanced,3,fault,broken,6,0,0,4.7,6.2,6.2,6.2
|
||||
off-r3,off,3,clean,read,9000,0,0,4.1,7.5,9.5,32.8
|
||||
off-r3,off,3,clean,write,2700,0,0,5.0,8.1,9.2,27.1
|
||||
off-r3,off,3,clean,me,3600,0,0,1.4,3.5,4.4,24.4
|
||||
off-r3,off,3,clean,chat,2700,0,0,2.8,5.5,6.7,14.0
|
||||
off-r3,off,3,clean,download,720,0,0,6.2,9.6,11.5,23.1
|
||||
off-r3,off,3,clean,upload,45,0,0,18.0,22.0,22.4,22.4
|
||||
off-r3,off,3,clean,bad,9,0,0,10.1,11.7,11.7,11.7
|
||||
off-r3,off,3,clean,broken,18,0,0,4.3,6.1,6.1,6.1
|
||||
off-r3,off,3,fault,read,3000,0,0,4.1,7.5,9.7,54.3
|
||||
off-r3,off,3,fault,write,900,0,0,5.3,110.0,507.5,607.4
|
||||
off-r3,off,3,fault,me,1200,0,0,1.4,3.5,4.5,26.3
|
||||
off-r3,off,3,fault,chat,900,0,0,2.8,5.3,6.0,21.4
|
||||
off-r3,off,3,fault,download,240,0,0,6.3,9.9,11.8,15.7
|
||||
off-r3,off,3,fault,upload,15,0,0,19.6,47.6,47.6,47.6
|
||||
off-r3,off,3,fault,bad,3,0,0,10.6,11.3,11.3,11.3
|
||||
off-r3,off,3,fault,broken,6,0,0,4.6,5.8,5.8,5.8
|
||||
full-r3,full,3,clean,read,9000,0,0,3.9,7.3,9.9,65.4
|
||||
full-r3,full,3,clean,write,2700,0,0,4.6,7.8,9.3,54.4
|
||||
full-r3,full,3,clean,me,3600,0,0,1.7,3.8,4.5,51.2
|
||||
full-r3,full,3,clean,chat,2700,0,0,2.6,5.1,6.7,54.1
|
||||
full-r3,full,3,clean,download,720,0,0,6.0,9.4,12.2,61.9
|
||||
full-r3,full,3,clean,upload,45,0,0,18.0,22.2,25.8,25.8
|
||||
full-r3,full,3,clean,bad,9,0,0,9.6,10.5,10.5,10.5
|
||||
full-r3,full,3,clean,broken,18,0,0,4.5,6.3,6.3,6.3
|
||||
full-r3,full,3,fault,read,3000,0,0,3.9,7.2,10.6,60.0
|
||||
full-r3,full,3,fault,write,900,0,0,4.8,100.8,492.8,599.5
|
||||
full-r3,full,3,fault,me,1200,0,0,1.7,3.9,4.6,27.6
|
||||
full-r3,full,3,fault,chat,900,0,0,2.6,5.3,7.2,23.1
|
||||
full-r3,full,3,fault,download,240,0,0,6.2,10.7,23.2,35.8
|
||||
full-r3,full,3,fault,upload,15,0,0,20.3,52.2,52.2,52.2
|
||||
full-r3,full,3,fault,bad,3,0,0,9.4,10.0,10.0,10.0
|
||||
full-r3,full,3,fault,broken,6,0,0,4.7,6.4,6.4,6.4
|
||||
tail-r3,tail,3,clean,read,9000,0,0,4.0,7.2,9.6,57.9
|
||||
tail-r3,tail,3,clean,write,2700,0,0,4.8,7.9,9.6,59.1
|
||||
tail-r3,tail,3,clean,me,3600,0,0,1.5,3.5,4.3,34.1
|
||||
tail-r3,tail,3,clean,chat,2700,0,0,2.5,5.4,7.0,45.6
|
||||
tail-r3,tail,3,clean,download,720,0,0,5.8,9.6,12.1,26.3
|
||||
tail-r3,tail,3,clean,upload,45,0,0,18.6,24.2,28.5,28.5
|
||||
tail-r3,tail,3,clean,bad,9,0,0,10.3,11.7,11.7,11.7
|
||||
tail-r3,tail,3,clean,broken,18,0,0,4.6,6.7,6.7,6.7
|
||||
tail-r3,tail,3,fault,read,3000,0,0,4.0,7.3,9.8,69.7
|
||||
tail-r3,tail,3,fault,write,900,0,0,4.9,101.8,503.9,601.8
|
||||
tail-r3,tail,3,fault,me,1200,0,0,1.6,3.6,4.7,47.7
|
||||
tail-r3,tail,3,fault,chat,900,0,0,2.5,5.4,7.6,20.7
|
||||
tail-r3,tail,3,fault,download,240,0,0,5.9,10.3,17.9,39.9
|
||||
tail-r3,tail,3,fault,upload,15,0,0,21.7,46.1,46.1,46.1
|
||||
tail-r3,tail,3,fault,bad,3,0,0,9.8,10.9,10.9,10.9
|
||||
tail-r3,tail,3,fault,broken,6,0,0,4.9,5.8,5.8,5.8
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,324 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794826358.393,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4569.0,
|
||||
"otelcol_exporter_sent_spans": 300.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 316.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 4869.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 17.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 17.0,
|
||||
"otelcol_processor_incoming_items": 16209.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4813.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 11396.0,
|
||||
"otelcol_processor_outgoing_items": 16209.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 9112.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 2278.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 4168.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 960.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 40.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 9112.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 1691.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 1414.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 808.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 101.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 3856.0,
|
||||
"otelcol_receiver_accepted_log_records": 4813.0,
|
||||
"otelcol_receiver_accepted_spans": 11396.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 76239.0,
|
||||
"tempo_distributor_ingress_bytes_total": 76239.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 79.0,
|
||||
"tempo_distributor_push_bytes_sum": 76239.0,
|
||||
"tempo_distributor_push_bytes_count": 6.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 72.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.0017938750000000001,
|
||||
"tempo_distributor_push_duration_seconds_count": 6.0,
|
||||
"tempo_distributor_received_traces_total": 101.0,
|
||||
"tempo_distributor_spans_received_total": 300.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 44.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 101.0,
|
||||
"tempo_distributor_traces_per_batch_count": 6.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1246603.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 11.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 8333.0,
|
||||
"loki_distributor_lines_received_total": 4569.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 880635.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 26.0,
|
||||
"prometheus_tsdb_head_chunks": 128.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 128.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826357573.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826357.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826324965.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826324.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 227.0,
|
||||
"prometheus_tsdb_head_series": 128.0,
|
||||
"prometheus_tsdb_head_series_created_total": 128.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794826448.4,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26319.0,
|
||||
"otelcol_exporter_sent_metric_points": 156.0,
|
||||
"otelcol_exporter_sent_spans": 2959.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2068.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 29434.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 111.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 111.0,
|
||||
"otelcol_processor_incoming_items": 89043.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26319.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 156.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62568.0,
|
||||
"otelcol_processor_outgoing_items": 89043.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 84752.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 21188.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 22867.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 3120.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 130.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 84752.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 15585.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 233411.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 421988.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 17875.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4992.0,
|
||||
"otelcol_receiver_accepted_log_records": 26319.0,
|
||||
"otelcol_receiver_accepted_metric_points": 156.0,
|
||||
"otelcol_receiver_accepted_spans": 62568.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 744537.0,
|
||||
"tempo_distributor_ingress_bytes_total": 744537.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 654.0,
|
||||
"tempo_distributor_push_bytes_sum": 744537.0,
|
||||
"tempo_distributor_push_bytes_count": 51.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 612.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.009198959999999999,
|
||||
"tempo_distributor_push_duration_seconds_count": 51.0,
|
||||
"tempo_distributor_received_traces_total": 1036.0,
|
||||
"tempo_distributor_spans_received_total": 2959.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 364.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 1036.0,
|
||||
"tempo_distributor_traces_per_batch_count": 51.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7201168.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 56.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 29943.0,
|
||||
"loki_distributor_lines_received_total": 26319.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5095766.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 98.0,
|
||||
"prometheus_tsdb_head_chunks": 343.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 343.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826447573.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826447.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826324965.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826324.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 2269.0,
|
||||
"prometheus_tsdb_head_series": 343.0,
|
||||
"prometheus_tsdb_head_series_created_total": 343.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794826494.007,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33737.0,
|
||||
"otelcol_exporter_sent_metric_points": 260.0,
|
||||
"otelcol_exporter_sent_spans": 4259.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2824.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 38256.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 151.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 151.0,
|
||||
"otelcol_processor_incoming_items": 113993.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33737.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 260.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 113993.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 116928.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 29232.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 29232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 4222.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 8.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 176.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 116928.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 27576.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 317690.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 573288.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 24323.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4909.0,
|
||||
"otelcol_receiver_accepted_log_records": 33737.0,
|
||||
"otelcol_receiver_accepted_metric_points": 260.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1072956.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1072956.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 903.0,
|
||||
"tempo_distributor_push_bytes_sum": 1072956.0,
|
||||
"tempo_distributor_push_bytes_count": 71.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 852.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.013854671000000004,
|
||||
"tempo_distributor_push_duration_seconds_count": 71.0,
|
||||
"tempo_distributor_received_traces_total": 1491.0,
|
||||
"tempo_distributor_spans_received_total": 4259.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 506.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 1491.0,
|
||||
"tempo_distributor_traces_per_batch_count": 71.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9235679.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 72.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 36767.0,
|
||||
"loki_distributor_lines_received_total": 33737.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6536803.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 134.0,
|
||||
"prometheus_tsdb_head_chunks": 344.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 344.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826492573.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826492.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826324965.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826324.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 3300.0,
|
||||
"prometheus_tsdb_head_series": 344.0,
|
||||
"prometheus_tsdb_head_series_created_total": 344.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,324 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794827333.763,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4480.0,
|
||||
"otelcol_exporter_sent_spans": 274.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 318.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 4754.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 17.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 17.0,
|
||||
"otelcol_processor_incoming_items": 15890.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4715.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 11175.0,
|
||||
"otelcol_processor_outgoing_items": 15890.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 9628.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 2407.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 4085.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 984.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 41.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 9628.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 2028.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 1568.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 896.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 112.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 3869.0,
|
||||
"otelcol_receiver_accepted_log_records": 4715.0,
|
||||
"otelcol_receiver_accepted_spans": 11175.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 69589.0,
|
||||
"tempo_distributor_ingress_bytes_total": 69589.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 78.0,
|
||||
"tempo_distributor_push_bytes_sum": 69589.0,
|
||||
"tempo_distributor_push_bytes_count": 6.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 72.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.001835417,
|
||||
"tempo_distributor_push_duration_seconds_count": 6.0,
|
||||
"tempo_distributor_received_traces_total": 101.0,
|
||||
"tempo_distributor_spans_received_total": 274.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 46.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 101.0,
|
||||
"tempo_distributor_traces_per_batch_count": 6.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1222545.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 11.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 2516.0,
|
||||
"loki_distributor_lines_received_total": 4480.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 863281.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 26.0,
|
||||
"prometheus_tsdb_head_chunks": 130.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 130.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827328321.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827328.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827298130.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827298.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 228.0,
|
||||
"prometheus_tsdb_head_series": 130.0,
|
||||
"prometheus_tsdb_head_series_created_total": 130.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794827423.758,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26113.0,
|
||||
"otelcol_exporter_sent_metric_points": 156.0,
|
||||
"otelcol_exporter_sent_spans": 3081.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2177.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 29350.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 116.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 116.0,
|
||||
"otelcol_processor_incoming_items": 89182.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26352.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 156.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62674.0,
|
||||
"otelcol_processor_outgoing_items": 89182.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 84904.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 21226.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 22905.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 3144.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 131.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 84904.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 15777.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 233972.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 416201.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 17915.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4990.0,
|
||||
"otelcol_receiver_accepted_log_records": 26352.0,
|
||||
"otelcol_receiver_accepted_metric_points": 156.0,
|
||||
"otelcol_receiver_accepted_spans": 62674.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 774922.0,
|
||||
"tempo_distributor_ingress_bytes_total": 774922.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 646.0,
|
||||
"tempo_distributor_push_bytes_sum": 774922.0,
|
||||
"tempo_distributor_push_bytes_count": 51.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 612.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.010585249,
|
||||
"tempo_distributor_push_duration_seconds_count": 51.0,
|
||||
"tempo_distributor_received_traces_total": 1067.0,
|
||||
"tempo_distributor_spans_received_total": 3081.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 368.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 1067.0,
|
||||
"tempo_distributor_traces_per_batch_count": 51.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7144114.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 56.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 33863.0,
|
||||
"loki_distributor_lines_received_total": 26113.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5055222.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 98.0,
|
||||
"prometheus_tsdb_head_chunks": 343.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 343.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827418323.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827418.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827298130.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827298.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 2257.0,
|
||||
"prometheus_tsdb_head_series": 343.0,
|
||||
"prometheus_tsdb_head_series_created_total": 343.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794827469.367,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33738.0,
|
||||
"otelcol_exporter_sent_metric_points": 260.0,
|
||||
"otelcol_exporter_sent_spans": 4352.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2956.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 38350.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 157.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 157.0,
|
||||
"otelcol_processor_incoming_items": 113994.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33738.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 260.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 113994.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 116928.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 29232.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 29232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 4224.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 5.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 176.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 116928.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 24670.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 317621.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 564385.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 24317.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4915.0,
|
||||
"otelcol_receiver_accepted_log_records": 33738.0,
|
||||
"otelcol_receiver_accepted_metric_points": 260.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1093619.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1093619.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 897.0,
|
||||
"tempo_distributor_push_bytes_sum": 1093619.0,
|
||||
"tempo_distributor_push_bytes_count": 71.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 852.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.015341664,
|
||||
"tempo_distributor_push_duration_seconds_count": 71.0,
|
||||
"tempo_distributor_received_traces_total": 1500.0,
|
||||
"tempo_distributor_spans_received_total": 4352.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 513.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 1500.0,
|
||||
"tempo_distributor_traces_per_batch_count": 71.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9235291.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 72.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 42934.0,
|
||||
"loki_distributor_lines_received_total": 33738.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6536375.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 134.0,
|
||||
"prometheus_tsdb_head_chunks": 345.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 345.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827463324.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827463.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827298130.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827298.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 3290.0,
|
||||
"prometheus_tsdb_head_series": 345.0,
|
||||
"prometheus_tsdb_head_series_created_total": 345.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,329 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794828502.134,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4537.0,
|
||||
"otelcol_exporter_sent_metric_points": 88.0,
|
||||
"otelcol_exporter_sent_spans": 331.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 402.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 4956.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 21.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 21.0,
|
||||
"otelcol_processor_incoming_items": 16137.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4775.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 88.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 11274.0,
|
||||
"otelcol_processor_outgoing_items": 16137.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 8912.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 2228.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 4123.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 960.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 40.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 8912.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 2076.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 1568.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 896.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 112.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 3802.0,
|
||||
"otelcol_receiver_accepted_log_records": 4775.0,
|
||||
"otelcol_receiver_accepted_metric_points": 88.0,
|
||||
"otelcol_receiver_accepted_spans": 11274.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 82859.0,
|
||||
"tempo_distributor_ingress_bytes_total": 82859.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 77.0,
|
||||
"tempo_distributor_push_bytes_sum": 82859.0,
|
||||
"tempo_distributor_push_bytes_count": 6.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 72.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.004834000000000001,
|
||||
"tempo_distributor_push_duration_seconds_count": 6.0,
|
||||
"tempo_distributor_received_traces_total": 112.0,
|
||||
"tempo_distributor_spans_received_total": 331.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 44.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 112.0,
|
||||
"tempo_distributor_traces_per_batch_count": 6.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1241528.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 12.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 7665.0,
|
||||
"loki_distributor_lines_received_total": 4537.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 878383.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 25.0,
|
||||
"prometheus_tsdb_head_chunks": 513.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 513.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828497997.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828497.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828467997.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828467.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 988.0,
|
||||
"prometheus_tsdb_head_series": 513.0,
|
||||
"prometheus_tsdb_head_series_created_total": 513.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794828592.135,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26203.0,
|
||||
"otelcol_exporter_sent_metric_points": 244.0,
|
||||
"otelcol_exporter_sent_spans": 2872.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2210.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 29319.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 117.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 117.0,
|
||||
"otelcol_processor_incoming_items": 89059.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26319.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 244.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62496.0,
|
||||
"otelcol_processor_outgoing_items": 89059.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 83800.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 20950.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 22840.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 3120.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 130.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 83800.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 17140.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 232928.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 420640.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 17840.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4995.0,
|
||||
"otelcol_receiver_accepted_log_records": 26319.0,
|
||||
"otelcol_receiver_accepted_metric_points": 244.0,
|
||||
"otelcol_receiver_accepted_spans": 62496.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 724486.0,
|
||||
"tempo_distributor_ingress_bytes_total": 724486.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 647.0,
|
||||
"tempo_distributor_push_bytes_sum": 724486.0,
|
||||
"tempo_distributor_push_bytes_count": 51.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 612.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.013535416,
|
||||
"tempo_distributor_push_duration_seconds_count": 51.0,
|
||||
"tempo_distributor_received_traces_total": 1008.0,
|
||||
"tempo_distributor_spans_received_total": 2872.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 368.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 1008.0,
|
||||
"tempo_distributor_traces_per_batch_count": 51.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7194655.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 57.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 17480.0,
|
||||
"loki_distributor_lines_received_total": 26203.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5098560.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 97.0,
|
||||
"prometheus_tsdb_head_chunks": 691.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 691.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828587997.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828587.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828467997.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828467.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 4962.0,
|
||||
"prometheus_tsdb_head_series": 691.0,
|
||||
"prometheus_tsdb_head_series_created_total": 691.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794828637.723,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33745.0,
|
||||
"otelcol_exporter_sent_metric_points": 348.0,
|
||||
"otelcol_exporter_sent_spans": 4210.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2964.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 38303.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 157.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 157.0,
|
||||
"otelcol_processor_incoming_items": 114089.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33745.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 348.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 114089.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 116928.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 29232.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 29232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 4223.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 7.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 176.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 116928.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 28490.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 318138.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 573144.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 24358.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4874.0,
|
||||
"otelcol_receiver_accepted_log_records": 33745.0,
|
||||
"otelcol_receiver_accepted_metric_points": 348.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1067709.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1067709.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 897.0,
|
||||
"tempo_distributor_push_bytes_sum": 1067709.0,
|
||||
"tempo_distributor_push_bytes_count": 71.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 852.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.019092709999999995,
|
||||
"tempo_distributor_push_duration_seconds_count": 71.0,
|
||||
"tempo_distributor_received_traces_total": 1484.0,
|
||||
"tempo_distributor_spans_received_total": 4210.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 508.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 1484.0,
|
||||
"tempo_distributor_traces_per_batch_count": 71.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9270367.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 73.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 19924.0,
|
||||
"loki_distributor_lines_received_total": 33745.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6571156.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 133.0,
|
||||
"prometheus_tsdb_head_chunks": 691.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 691.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828633004.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828633.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828467997.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828467.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 7035.0,
|
||||
"prometheus_tsdb_head_series": 691.0,
|
||||
"prometheus_tsdb_head_series_created_total": 691.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794827093.64,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4505.0,
|
||||
"otelcol_exporter_sent_metric_points": 51.0,
|
||||
"otelcol_exporter_sent_spans": 11256.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 557.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 15812.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 33.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 19.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 14.0,
|
||||
"otelcol_processor_incoming_items": 16054.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4747.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 51.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 11256.0,
|
||||
"otelcol_processor_outgoing_items": 16054.0,
|
||||
"otelcol_receiver_accepted_log_records": 4747.0,
|
||||
"otelcol_receiver_accepted_metric_points": 51.0,
|
||||
"otelcol_receiver_accepted_spans": 11256.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 2148097.0,
|
||||
"tempo_distributor_ingress_bytes_total": 2148097.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 201.0,
|
||||
"tempo_distributor_push_bytes_sum": 2148097.0,
|
||||
"tempo_distributor_push_bytes_count": 20.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 240.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.019747959,
|
||||
"tempo_distributor_push_duration_seconds_count": 20.0,
|
||||
"tempo_distributor_received_traces_total": 4130.0,
|
||||
"tempo_distributor_spans_received_total": 11256.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 81.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 4130.0,
|
||||
"tempo_distributor_traces_per_batch_count": 20.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1229165.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 11.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 10629.0,
|
||||
"loki_distributor_lines_received_total": 4505.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 868282.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 26.0,
|
||||
"prometheus_tsdb_head_chunks": 3308.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3308.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827090644.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827090.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827059262.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827059.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 6505.0,
|
||||
"prometheus_tsdb_head_series": 3308.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3308.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794827183.652,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26262.0,
|
||||
"otelcol_exporter_sent_metric_points": 363.0,
|
||||
"otelcol_exporter_sent_spans": 62451.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3001.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 89076.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 179.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 108.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 71.0,
|
||||
"otelcol_processor_incoming_items": 89314.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26500.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 363.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62451.0,
|
||||
"otelcol_processor_outgoing_items": 89314.0,
|
||||
"otelcol_receiver_accepted_log_records": 26500.0,
|
||||
"otelcol_receiver_accepted_metric_points": 363.0,
|
||||
"otelcol_receiver_accepted_spans": 62451.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 11938650.0,
|
||||
"tempo_distributor_ingress_bytes_total": 11938650.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 1091.0,
|
||||
"tempo_distributor_push_bytes_sum": 11938650.0,
|
||||
"tempo_distributor_push_bytes_count": 109.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 1308.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.111071919,
|
||||
"tempo_distributor_push_duration_seconds_count": 109.0,
|
||||
"tempo_distributor_received_traces_total": 22907.0,
|
||||
"tempo_distributor_spans_received_total": 62451.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 437.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 22907.0,
|
||||
"tempo_distributor_traces_per_batch_count": 109.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7185540.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 56.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 41905.0,
|
||||
"loki_distributor_lines_received_total": 26262.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5084608.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 98.0,
|
||||
"prometheus_tsdb_head_chunks": 3412.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3412.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827180644.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827180.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827059262.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827059.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 26842.0,
|
||||
"prometheus_tsdb_head_series": 3412.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3412.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794827229.271,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33736.0,
|
||||
"otelcol_exporter_sent_metric_points": 519.0,
|
||||
"otelcol_exporter_sent_spans": 79996.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3900.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 114251.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 232.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 138.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 94.0,
|
||||
"otelcol_processor_incoming_items": 114251.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33736.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 519.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 114251.0,
|
||||
"otelcol_receiver_accepted_log_records": 33736.0,
|
||||
"otelcol_receiver_accepted_metric_points": 519.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 15297946.0,
|
||||
"tempo_distributor_ingress_bytes_total": 15297946.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 1402.0,
|
||||
"tempo_distributor_push_bytes_sum": 15297946.0,
|
||||
"tempo_distributor_push_bytes_count": 140.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 1680.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.14485987800000003,
|
||||
"tempo_distributor_push_duration_seconds_count": 140.0,
|
||||
"tempo_distributor_received_traces_total": 29378.0,
|
||||
"tempo_distributor_spans_received_total": 79996.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 562.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 29378.0,
|
||||
"tempo_distributor_traces_per_batch_count": 140.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9235294.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 72.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 52601.0,
|
||||
"loki_distributor_lines_received_total": 33736.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6536403.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 134.0,
|
||||
"prometheus_tsdb_head_chunks": 3413.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3413.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827225655.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827225.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827059262.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827059.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 37079.0,
|
||||
"prometheus_tsdb_head_series": 3413.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3413.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794828065.843,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4398.0,
|
||||
"otelcol_exporter_sent_metric_points": 139.0,
|
||||
"otelcol_exporter_sent_spans": 10971.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 675.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 15508.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 38.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 19.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 19.0,
|
||||
"otelcol_processor_incoming_items": 15750.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4638.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 139.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 10973.0,
|
||||
"otelcol_processor_outgoing_items": 15750.0,
|
||||
"otelcol_receiver_accepted_log_records": 4638.0,
|
||||
"otelcol_receiver_accepted_metric_points": 139.0,
|
||||
"otelcol_receiver_accepted_spans": 10973.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 2098232.0,
|
||||
"tempo_distributor_ingress_bytes_total": 2098232.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 205.0,
|
||||
"tempo_distributor_push_bytes_sum": 2098232.0,
|
||||
"tempo_distributor_push_bytes_count": 20.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 240.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.023393832,
|
||||
"tempo_distributor_push_duration_seconds_count": 20.0,
|
||||
"tempo_distributor_received_traces_total": 4026.0,
|
||||
"tempo_distributor_spans_received_total": 10971.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 84.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 4026.0,
|
||||
"tempo_distributor_traces_per_batch_count": 20.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1203282.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 12.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 9538.0,
|
||||
"loki_distributor_lines_received_total": 4398.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 851314.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 31.0,
|
||||
"prometheus_tsdb_head_chunks": 3609.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3609.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828064875.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828064.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828031079.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828031.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 8400.0,
|
||||
"prometheus_tsdb_head_series": 3609.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3609.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794828155.872,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26155.0,
|
||||
"otelcol_exporter_sent_metric_points": 451.0,
|
||||
"otelcol_exporter_sent_spans": 62755.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3160.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 89361.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 186.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 109.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 77.0,
|
||||
"otelcol_processor_incoming_items": 89601.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26395.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 451.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62755.0,
|
||||
"otelcol_processor_outgoing_items": 89601.0,
|
||||
"otelcol_receiver_accepted_log_records": 26395.0,
|
||||
"otelcol_receiver_accepted_metric_points": 451.0,
|
||||
"otelcol_receiver_accepted_spans": 62755.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 12019204.0,
|
||||
"tempo_distributor_ingress_bytes_total": 12019204.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 1105.0,
|
||||
"tempo_distributor_push_bytes_sum": 12019204.0,
|
||||
"tempo_distributor_push_bytes_count": 110.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 1320.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.12282033900000007,
|
||||
"tempo_distributor_push_duration_seconds_count": 110.0,
|
||||
"tempo_distributor_received_traces_total": 23022.0,
|
||||
"tempo_distributor_spans_received_total": 62755.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 444.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 23022.0,
|
||||
"tempo_distributor_traces_per_batch_count": 110.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7180603.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 57.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 31781.0,
|
||||
"loki_distributor_lines_received_total": 26155.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5088851.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 103.0,
|
||||
"prometheus_tsdb_head_chunks": 3716.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3716.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828154877.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828154.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828031079.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828031.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 30694.0,
|
||||
"prometheus_tsdb_head_series": 3716.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3716.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794828201.395,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33747.0,
|
||||
"otelcol_exporter_sent_metric_points": 607.0,
|
||||
"otelcol_exporter_sent_spans": 79996.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 4108.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 114350.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 241.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 139.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 102.0,
|
||||
"otelcol_processor_incoming_items": 114350.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33747.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 607.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 114350.0,
|
||||
"otelcol_receiver_accepted_log_records": 33747.0,
|
||||
"otelcol_receiver_accepted_metric_points": 607.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 15325820.0,
|
||||
"tempo_distributor_ingress_bytes_total": 15325820.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 1421.0,
|
||||
"tempo_distributor_push_bytes_sum": 15325820.0,
|
||||
"tempo_distributor_push_bytes_count": 141.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 1692.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.15598625500000013,
|
||||
"tempo_distributor_push_duration_seconds_count": 141.0,
|
||||
"tempo_distributor_received_traces_total": 29352.0,
|
||||
"tempo_distributor_spans_received_total": 79996.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 575.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 29352.0,
|
||||
"tempo_distributor_traces_per_batch_count": 141.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9270360.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 73.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 37151.0,
|
||||
"loki_distributor_lines_received_total": 33747.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6571186.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 139.0,
|
||||
"prometheus_tsdb_head_chunks": 3759.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3759.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828199811.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828199.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828031079.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828031.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 41881.0,
|
||||
"prometheus_tsdb_head_series": 3759.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3759.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794828846.838,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4144.0,
|
||||
"otelcol_exporter_sent_metric_points": 51.0,
|
||||
"otelcol_exporter_sent_spans": 10948.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 522.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 15143.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 31.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 19.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 12.0,
|
||||
"otelcol_processor_incoming_items": 15628.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4627.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 51.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 10950.0,
|
||||
"otelcol_processor_outgoing_items": 15628.0,
|
||||
"otelcol_receiver_accepted_log_records": 4627.0,
|
||||
"otelcol_receiver_accepted_metric_points": 51.0,
|
||||
"otelcol_receiver_accepted_spans": 10950.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 2094377.0,
|
||||
"tempo_distributor_ingress_bytes_total": 2094377.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 190.0,
|
||||
"tempo_distributor_push_bytes_sum": 2094377.0,
|
||||
"tempo_distributor_push_bytes_count": 19.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 228.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.022012622999999995,
|
||||
"tempo_distributor_push_duration_seconds_count": 19.0,
|
||||
"tempo_distributor_received_traces_total": 4017.0,
|
||||
"tempo_distributor_spans_received_total": 10948.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 76.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 4017.0,
|
||||
"tempo_distributor_traces_per_batch_count": 19.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1134417.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 10.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 5575.0,
|
||||
"loki_distributor_lines_received_total": 4144.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 802396.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 26.0,
|
||||
"prometheus_tsdb_head_chunks": 3311.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3311.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828841096.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828841.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828810736.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828810.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 7275.0,
|
||||
"prometheus_tsdb_head_series": 3311.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3311.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794828936.843,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 25936.0,
|
||||
"otelcol_exporter_sent_metric_points": 363.0,
|
||||
"otelcol_exporter_sent_spans": 62750.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2985.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 89049.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 178.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 109.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 69.0,
|
||||
"otelcol_processor_incoming_items": 89531.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26418.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 363.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62750.0,
|
||||
"otelcol_processor_outgoing_items": 89531.0,
|
||||
"otelcol_receiver_accepted_log_records": 26418.0,
|
||||
"otelcol_receiver_accepted_metric_points": 363.0,
|
||||
"otelcol_receiver_accepted_spans": 62750.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 12018166.0,
|
||||
"tempo_distributor_ingress_bytes_total": 12018166.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 1090.0,
|
||||
"tempo_distributor_push_bytes_sum": 12018166.0,
|
||||
"tempo_distributor_push_bytes_count": 109.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 1308.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.11378191899999998,
|
||||
"tempo_distributor_push_duration_seconds_count": 109.0,
|
||||
"tempo_distributor_received_traces_total": 23019.0,
|
||||
"tempo_distributor_spans_received_total": 62750.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 436.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 23019.0,
|
||||
"tempo_distributor_traces_per_batch_count": 109.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7121531.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 55.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 26878.0,
|
||||
"loki_distributor_lines_received_total": 25936.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5046521.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 98.0,
|
||||
"prometheus_tsdb_head_chunks": 3412.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3412.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828931096.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828931.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828810736.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828810.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 27741.0,
|
||||
"prometheus_tsdb_head_series": 3412.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3412.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794828982.459,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33737.0,
|
||||
"otelcol_exporter_sent_metric_points": 519.0,
|
||||
"otelcol_exporter_sent_spans": 79996.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3909.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 114252.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 232.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 139.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 93.0,
|
||||
"otelcol_processor_incoming_items": 114252.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33737.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 519.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 114252.0,
|
||||
"otelcol_receiver_accepted_log_records": 33737.0,
|
||||
"otelcol_receiver_accepted_metric_points": 519.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 15325318.0,
|
||||
"tempo_distributor_ingress_bytes_total": 15325318.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 1405.0,
|
||||
"tempo_distributor_push_bytes_sum": 15325318.0,
|
||||
"tempo_distributor_push_bytes_count": 140.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 1680.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.14371667099999996,
|
||||
"tempo_distributor_push_duration_seconds_count": 140.0,
|
||||
"tempo_distributor_received_traces_total": 29342.0,
|
||||
"tempo_distributor_spans_received_total": 79996.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 567.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 29342.0,
|
||||
"tempo_distributor_traces_per_batch_count": 140.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9268456.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 72.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 31977.0,
|
||||
"loki_distributor_lines_received_total": 33737.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6569514.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 134.0,
|
||||
"prometheus_tsdb_head_chunks": 3413.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3413.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828976096.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828976.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828810736.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828810.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 37978.0,
|
||||
"prometheus_tsdb_head_series": 3413.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3413.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,287 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794826554.415,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4582.0,
|
||||
"otelcol_exporter_sent_metric_points": 139.0,
|
||||
"otelcol_exporter_sent_spans": 1122.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 506.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 5843.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 27.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 27.0,
|
||||
"otelcol_processor_incoming_items": 6018.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4702.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 139.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 1177.0,
|
||||
"otelcol_processor_outgoing_items": 6018.0,
|
||||
"otelcol_receiver_accepted_log_records": 4702.0,
|
||||
"otelcol_receiver_accepted_metric_points": 139.0,
|
||||
"otelcol_receiver_accepted_spans": 1177.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 220318.0,
|
||||
"tempo_distributor_ingress_bytes_total": 220318.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 122.0,
|
||||
"tempo_distributor_push_bytes_sum": 220318.0,
|
||||
"tempo_distributor_push_bytes_count": 10.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 120.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.003404751,
|
||||
"tempo_distributor_push_duration_seconds_count": 10.0,
|
||||
"tempo_distributor_received_traces_total": 402.0,
|
||||
"tempo_distributor_spans_received_total": 1122.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 62.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 402.0,
|
||||
"tempo_distributor_traces_per_batch_count": 10.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1249121.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 12.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 4108.0,
|
||||
"loki_distributor_lines_received_total": 4582.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 882479.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 24.0,
|
||||
"prometheus_tsdb_head_chunks": 3164.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3164.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826546949.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826546.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826526190.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826526.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 6095.0,
|
||||
"prometheus_tsdb_head_series": 3164.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3164.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794826644.429,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26094.0,
|
||||
"otelcol_exporter_sent_metric_points": 451.0,
|
||||
"otelcol_exporter_sent_spans": 6262.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2349.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 32807.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 129.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 129.0,
|
||||
"otelcol_processor_incoming_items": 33112.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26332.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 451.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 6329.0,
|
||||
"otelcol_processor_outgoing_items": 33112.0,
|
||||
"otelcol_receiver_accepted_log_records": 26332.0,
|
||||
"otelcol_receiver_accepted_metric_points": 451.0,
|
||||
"otelcol_receiver_accepted_spans": 6329.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1230933.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1230933.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 663.0,
|
||||
"tempo_distributor_push_bytes_sum": 1230933.0,
|
||||
"tempo_distributor_push_bytes_count": 55.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 660.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.017187619999999997,
|
||||
"tempo_distributor_push_duration_seconds_count": 55.0,
|
||||
"tempo_distributor_received_traces_total": 2276.0,
|
||||
"tempo_distributor_spans_received_total": 6262.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 336.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2276.0,
|
||||
"tempo_distributor_traces_per_batch_count": 55.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7137824.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 57.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 28978.0,
|
||||
"loki_distributor_lines_received_total": 26094.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5050782.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 96.0,
|
||||
"prometheus_tsdb_head_chunks": 3583.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3583.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826636949.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826636.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826526190.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826526.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 27572.0,
|
||||
"prometheus_tsdb_head_series": 3583.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3583.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794826690.041,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33746.0,
|
||||
"otelcol_exporter_sent_metric_points": 607.0,
|
||||
"otelcol_exporter_sent_spans": 7974.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3045.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 42327.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 167.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 167.0,
|
||||
"otelcol_processor_incoming_items": 42327.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33746.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 607.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 7974.0,
|
||||
"otelcol_processor_outgoing_items": 42327.0,
|
||||
"otelcol_receiver_accepted_log_records": 33746.0,
|
||||
"otelcol_receiver_accepted_metric_points": 607.0,
|
||||
"otelcol_receiver_accepted_spans": 7974.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1567726.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1567726.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 856.0,
|
||||
"tempo_distributor_push_bytes_sum": 1567726.0,
|
||||
"tempo_distributor_push_bytes_count": 71.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 852.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.022955164,
|
||||
"tempo_distributor_push_duration_seconds_count": 71.0,
|
||||
"tempo_distributor_received_traces_total": 2905.0,
|
||||
"tempo_distributor_spans_received_total": 7974.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 434.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2905.0,
|
||||
"tempo_distributor_traces_per_batch_count": 71.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9236317.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 73.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 40948.0,
|
||||
"loki_distributor_lines_received_total": 33746.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6537154.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 136.0,
|
||||
"prometheus_tsdb_head_chunks": 3584.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3584.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826689747.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826689.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826526190.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826526.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 38326.0,
|
||||
"prometheus_tsdb_head_series": 3584.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3584.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,287 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794827872.111,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4459.0,
|
||||
"otelcol_exporter_sent_metric_points": 51.0,
|
||||
"otelcol_exporter_sent_spans": 1079.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 423.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 5589.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 23.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 23.0,
|
||||
"otelcol_processor_incoming_items": 5914.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4698.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 51.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 1165.0,
|
||||
"otelcol_processor_outgoing_items": 5914.0,
|
||||
"otelcol_receiver_accepted_log_records": 4698.0,
|
||||
"otelcol_receiver_accepted_metric_points": 51.0,
|
||||
"otelcol_receiver_accepted_spans": 1165.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 211765.0,
|
||||
"tempo_distributor_ingress_bytes_total": 211765.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 124.0,
|
||||
"tempo_distributor_push_bytes_sum": 211765.0,
|
||||
"tempo_distributor_push_bytes_count": 10.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 120.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.0043912510000000005,
|
||||
"tempo_distributor_push_duration_seconds_count": 10.0,
|
||||
"tempo_distributor_received_traces_total": 394.0,
|
||||
"tempo_distributor_spans_received_total": 1079.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 64.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 394.0,
|
||||
"tempo_distributor_traces_per_batch_count": 10.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1216792.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 11.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 5622.0,
|
||||
"loki_distributor_lines_received_total": 4459.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 859440.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 26.0,
|
||||
"prometheus_tsdb_head_chunks": 3312.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3312.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827869931.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827869.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827837979.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827837.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 7295.0,
|
||||
"prometheus_tsdb_head_series": 3312.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3312.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794827962.126,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26217.0,
|
||||
"otelcol_exporter_sent_metric_points": 363.0,
|
||||
"otelcol_exporter_sent_spans": 6185.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2265.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 32765.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 125.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 125.0,
|
||||
"otelcol_processor_incoming_items": 33064.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26460.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 363.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 6241.0,
|
||||
"otelcol_processor_outgoing_items": 33064.0,
|
||||
"otelcol_receiver_accepted_log_records": 26460.0,
|
||||
"otelcol_receiver_accepted_metric_points": 363.0,
|
||||
"otelcol_receiver_accepted_spans": 6241.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1217009.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1217009.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 665.0,
|
||||
"tempo_distributor_push_bytes_sum": 1217009.0,
|
||||
"tempo_distributor_push_bytes_count": 55.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 660.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.019010837000000003,
|
||||
"tempo_distributor_push_duration_seconds_count": 55.0,
|
||||
"tempo_distributor_received_traces_total": 2247.0,
|
||||
"tempo_distributor_spans_received_total": 6185.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 337.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2247.0,
|
||||
"tempo_distributor_traces_per_batch_count": 55.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7173012.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 56.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 16923.0,
|
||||
"loki_distributor_lines_received_total": 26217.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5075686.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 98.0,
|
||||
"prometheus_tsdb_head_chunks": 3368.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3368.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827959934.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827959.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827837979.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827837.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 27497.0,
|
||||
"prometheus_tsdb_head_series": 3368.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3368.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794828007.663,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33737.0,
|
||||
"otelcol_exporter_sent_metric_points": 519.0,
|
||||
"otelcol_exporter_sent_spans": 7987.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2979.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 42243.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 164.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 164.0,
|
||||
"otelcol_processor_incoming_items": 42243.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33737.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 519.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 7987.0,
|
||||
"otelcol_processor_outgoing_items": 42243.0,
|
||||
"otelcol_receiver_accepted_log_records": 33737.0,
|
||||
"otelcol_receiver_accepted_metric_points": 519.0,
|
||||
"otelcol_receiver_accepted_spans": 7987.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1571171.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1571171.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 857.0,
|
||||
"tempo_distributor_push_bytes_sum": 1571171.0,
|
||||
"tempo_distributor_push_bytes_count": 71.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 852.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.023134379,
|
||||
"tempo_distributor_push_duration_seconds_count": 71.0,
|
||||
"tempo_distributor_received_traces_total": 2905.0,
|
||||
"tempo_distributor_spans_received_total": 7987.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 434.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2905.0,
|
||||
"tempo_distributor_traces_per_batch_count": 71.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9235415.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 73.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 21589.0,
|
||||
"loki_distributor_lines_received_total": 33737.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6536491.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 134.0,
|
||||
"prometheus_tsdb_head_chunks": 3411.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3411.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828004935.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828004.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827837979.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827837.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 37687.0,
|
||||
"prometheus_tsdb_head_series": 3411.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3411.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794828307.821,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4269.0,
|
||||
"otelcol_exporter_sent_metric_points": 51.0,
|
||||
"otelcol_exporter_sent_spans": 1014.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 405.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 5334.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 22.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 1.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 21.0,
|
||||
"otelcol_processor_incoming_items": 5774.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4629.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 51.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 1094.0,
|
||||
"otelcol_processor_outgoing_items": 5774.0,
|
||||
"otelcol_receiver_accepted_log_records": 4629.0,
|
||||
"otelcol_receiver_accepted_metric_points": 51.0,
|
||||
"otelcol_receiver_accepted_spans": 1094.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 199348.0,
|
||||
"tempo_distributor_ingress_bytes_total": 199348.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 109.0,
|
||||
"tempo_distributor_push_bytes_sum": 199348.0,
|
||||
"tempo_distributor_push_bytes_count": 9.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 108.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.003345374,
|
||||
"tempo_distributor_push_duration_seconds_count": 9.0,
|
||||
"tempo_distributor_received_traces_total": 368.0,
|
||||
"tempo_distributor_spans_received_total": 1014.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 55.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 368.0,
|
||||
"tempo_distributor_traces_per_batch_count": 9.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1168800.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 11.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 2981.0,
|
||||
"loki_distributor_lines_received_total": 4269.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 826733.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 25.0,
|
||||
"prometheus_tsdb_head_chunks": 3250.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3250.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828303593.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828303.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828273593.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828273.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 5851.0,
|
||||
"prometheus_tsdb_head_series": 3250.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3250.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794828397.826,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 25906.0,
|
||||
"otelcol_exporter_sent_metric_points": 363.0,
|
||||
"otelcol_exporter_sent_spans": 6255.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2312.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 32524.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 127.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 1.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 126.0,
|
||||
"otelcol_processor_incoming_items": 33043.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26385.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 363.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 6295.0,
|
||||
"otelcol_processor_outgoing_items": 33043.0,
|
||||
"otelcol_receiver_accepted_log_records": 26385.0,
|
||||
"otelcol_receiver_accepted_metric_points": 363.0,
|
||||
"otelcol_receiver_accepted_spans": 6295.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1232239.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1232239.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 651.0,
|
||||
"tempo_distributor_push_bytes_sum": 1232239.0,
|
||||
"tempo_distributor_push_bytes_count": 54.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 648.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.017166501,
|
||||
"tempo_distributor_push_duration_seconds_count": 54.0,
|
||||
"tempo_distributor_received_traces_total": 2268.0,
|
||||
"tempo_distributor_spans_received_total": 6255.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 328.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2268.0,
|
||||
"tempo_distributor_traces_per_batch_count": 54.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7113539.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 56.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 28384.0,
|
||||
"loki_distributor_lines_received_total": 25906.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5040935.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 97.0,
|
||||
"prometheus_tsdb_head_chunks": 3369.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3369.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828393593.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828393.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828273593.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828273.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 26058.0,
|
||||
"prometheus_tsdb_head_series": 3369.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3369.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794828443.421,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33737.0,
|
||||
"otelcol_exporter_sent_metric_points": 519.0,
|
||||
"otelcol_exporter_sent_spans": 8140.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3065.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 42396.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 168.0,
|
||||
"otelcol_processor_batch_batch_size_trigger_send": 1.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 167.0,
|
||||
"otelcol_processor_incoming_items": 42396.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33737.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 519.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 8140.0,
|
||||
"otelcol_processor_outgoing_items": 42396.0,
|
||||
"otelcol_receiver_accepted_log_records": 33737.0,
|
||||
"otelcol_receiver_accepted_metric_points": 519.0,
|
||||
"otelcol_receiver_accepted_spans": 8140.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1602718.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1602718.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 843.0,
|
||||
"tempo_distributor_push_bytes_sum": 1602718.0,
|
||||
"tempo_distributor_push_bytes_count": 70.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 840.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.022165835000000002,
|
||||
"tempo_distributor_push_duration_seconds_count": 70.0,
|
||||
"tempo_distributor_received_traces_total": 2958.0,
|
||||
"tempo_distributor_spans_received_total": 8140.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 424.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2958.0,
|
||||
"tempo_distributor_traces_per_batch_count": 70.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9268652.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 73.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 34981.0,
|
||||
"loki_distributor_lines_received_total": 33737.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6569736.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 134.0,
|
||||
"prometheus_tsdb_head_chunks": 3412.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3412.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794828443306.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794828443.0,
|
||||
"prometheus_tsdb_head_min_time": 1794828273593.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794828273.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 37734.0,
|
||||
"prometheus_tsdb_head_series": 3412.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3412.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,326 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794826749.081,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4362.0,
|
||||
"otelcol_exporter_sent_metric_points": 139.0,
|
||||
"otelcol_exporter_sent_spans": 497.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 416.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 4998.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 22.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 22.0,
|
||||
"otelcol_processor_incoming_items": 15608.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4603.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 139.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 10866.0,
|
||||
"otelcol_processor_outgoing_items": 15608.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 5610.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 1870.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 3973.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 984.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 41.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 5610.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 663.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 3973.0,
|
||||
"otelcol_receiver_accepted_log_records": 4603.0,
|
||||
"otelcol_receiver_accepted_metric_points": 139.0,
|
||||
"otelcol_receiver_accepted_spans": 10866.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 124344.0,
|
||||
"tempo_distributor_ingress_bytes_total": 124344.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 61.0,
|
||||
"tempo_distributor_push_bytes_sum": 124344.0,
|
||||
"tempo_distributor_push_bytes_count": 5.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 60.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.004131584000000001,
|
||||
"tempo_distributor_push_duration_seconds_count": 5.0,
|
||||
"tempo_distributor_received_traces_total": 173.0,
|
||||
"tempo_distributor_spans_received_total": 497.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 32.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 173.0,
|
||||
"tempo_distributor_traces_per_batch_count": 5.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1188973.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 12.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 10017.0,
|
||||
"loki_distributor_lines_received_total": 4362.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 839958.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 24.0,
|
||||
"prometheus_tsdb_head_chunks": 3694.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3694.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826743140.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826743.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826721061.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826721.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 6845.0,
|
||||
"prometheus_tsdb_head_series": 3694.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3694.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794826839.092,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26140.0,
|
||||
"otelcol_exporter_sent_metric_points": 451.0,
|
||||
"otelcol_exporter_sent_spans": 6330.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2273.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 32921.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 125.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 125.0,
|
||||
"otelcol_processor_incoming_items": 89478.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26381.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 451.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62646.0,
|
||||
"otelcol_processor_outgoing_items": 89478.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 62385.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 20795.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 22895.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 3144.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 1.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 131.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 62385.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 8709.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 232635.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 425482.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 17895.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 5000.0,
|
||||
"otelcol_receiver_accepted_log_records": 26381.0,
|
||||
"otelcol_receiver_accepted_metric_points": 451.0,
|
||||
"otelcol_receiver_accepted_spans": 62646.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1592577.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1592577.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 577.0,
|
||||
"tempo_distributor_push_bytes_sum": 1592577.0,
|
||||
"tempo_distributor_push_bytes_count": 50.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 600.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.018243751,
|
||||
"tempo_distributor_push_duration_seconds_count": 50.0,
|
||||
"tempo_distributor_received_traces_total": 2197.0,
|
||||
"tempo_distributor_spans_received_total": 6330.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 304.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2197.0,
|
||||
"tempo_distributor_traces_per_batch_count": 50.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7150582.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 57.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 40543.0,
|
||||
"loki_distributor_lines_received_total": 26140.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5059909.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 96.0,
|
||||
"prometheus_tsdb_head_chunks": 3779.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3779.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826833138.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826833.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826721061.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826721.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 29506.0,
|
||||
"prometheus_tsdb_head_series": 3779.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3779.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794826884.694,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33747.0,
|
||||
"otelcol_exporter_sent_metric_points": 607.0,
|
||||
"otelcol_exporter_sent_spans": 8865.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3054.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 43219.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 168.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 168.0,
|
||||
"otelcol_processor_incoming_items": 114350.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33747.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 607.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 114350.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 87696.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 29232.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 29232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 4224.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 5.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 176.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 87696.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 14482.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 315016.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 576214.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 24232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 5000.0,
|
||||
"otelcol_receiver_accepted_log_records": 33747.0,
|
||||
"otelcol_receiver_accepted_metric_points": 607.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 2232760.0,
|
||||
"tempo_distributor_ingress_bytes_total": 2232760.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 824.0,
|
||||
"tempo_distributor_push_bytes_sum": 2232760.0,
|
||||
"tempo_distributor_push_bytes_count": 71.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 852.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.026559750999999996,
|
||||
"tempo_distributor_push_duration_seconds_count": 71.0,
|
||||
"tempo_distributor_received_traces_total": 3104.0,
|
||||
"tempo_distributor_spans_received_total": 8865.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 432.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 3104.0,
|
||||
"tempo_distributor_traces_per_batch_count": 71.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9236783.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 73.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 48379.0,
|
||||
"loki_distributor_lines_received_total": 33747.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6537573.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 132.0,
|
||||
"prometheus_tsdb_head_chunks": 3822.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3822.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794826878138.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794826878.0,
|
||||
"prometheus_tsdb_head_min_time": 1794826721061.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794826721.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 40886.0,
|
||||
"prometheus_tsdb_head_series": 3822.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3822.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,326 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794827530.25,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4425.0,
|
||||
"otelcol_exporter_sent_metric_points": 139.0,
|
||||
"otelcol_exporter_sent_spans": 463.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 444.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 5027.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 23.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 23.0,
|
||||
"otelcol_processor_incoming_items": 15847.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4665.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 139.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 11043.0,
|
||||
"otelcol_processor_outgoing_items": 15847.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 5808.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 1936.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 4038.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 984.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 41.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 5808.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 792.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4038.0,
|
||||
"otelcol_receiver_accepted_log_records": 4665.0,
|
||||
"otelcol_receiver_accepted_metric_points": 139.0,
|
||||
"otelcol_receiver_accepted_spans": 11043.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 116194.0,
|
||||
"tempo_distributor_ingress_bytes_total": 116194.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 63.0,
|
||||
"tempo_distributor_push_bytes_sum": 116194.0,
|
||||
"tempo_distributor_push_bytes_count": 5.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 60.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.0023256659999999997,
|
||||
"tempo_distributor_push_duration_seconds_count": 5.0,
|
||||
"tempo_distributor_received_traces_total": 166.0,
|
||||
"tempo_distributor_spans_received_total": 463.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 34.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 166.0,
|
||||
"tempo_distributor_traces_per_batch_count": 5.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1206550.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 12.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 3537.0,
|
||||
"loki_distributor_lines_received_total": 4425.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 852411.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 33.0,
|
||||
"prometheus_tsdb_head_chunks": 3210.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3210.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827529747.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827529.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827495322.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827495.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 7532.0,
|
||||
"prometheus_tsdb_head_series": 3210.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3210.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794827620.269,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 25955.0,
|
||||
"otelcol_exporter_sent_metric_points": 451.0,
|
||||
"otelcol_exporter_sent_spans": 5826.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2282.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 32232.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 125.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 125.0,
|
||||
"otelcol_processor_incoming_items": 89718.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26436.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 451.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62831.0,
|
||||
"otelcol_processor_outgoing_items": 89718.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 61944.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 20648.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 22963.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 3144.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 131.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 61944.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 8821.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 233519.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 427156.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 17963.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 5000.0,
|
||||
"otelcol_receiver_accepted_log_records": 26436.0,
|
||||
"otelcol_receiver_accepted_metric_points": 451.0,
|
||||
"otelcol_receiver_accepted_spans": 62831.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1465516.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1465516.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 590.0,
|
||||
"tempo_distributor_push_bytes_sum": 1465516.0,
|
||||
"tempo_distributor_push_bytes_count": 50.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 600.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.014365006000000001,
|
||||
"tempo_distributor_push_duration_seconds_count": 50.0,
|
||||
"tempo_distributor_received_traces_total": 2035.0,
|
||||
"tempo_distributor_spans_received_total": 5826.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 306.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2035.0,
|
||||
"tempo_distributor_traces_per_batch_count": 50.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7100209.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 57.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 18474.0,
|
||||
"loki_distributor_lines_received_total": 25955.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5024296.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 105.0,
|
||||
"prometheus_tsdb_head_chunks": 3602.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3602.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827619747.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827619.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827495322.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827495.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 29123.0,
|
||||
"prometheus_tsdb_head_series": 3602.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3602.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794827665.898,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33746.0,
|
||||
"otelcol_exporter_sent_metric_points": 607.0,
|
||||
"otelcol_exporter_sent_spans": 8412.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3082.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 42765.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 169.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 169.0,
|
||||
"otelcol_processor_incoming_items": 114349.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33746.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 607.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 114349.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 87696.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 29232.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 29232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 4248.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 4.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 177.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 87696.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 15318.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 315016.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 576199.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 24232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 5000.0,
|
||||
"otelcol_receiver_accepted_log_records": 33746.0,
|
||||
"otelcol_receiver_accepted_metric_points": 607.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 2118361.0,
|
||||
"tempo_distributor_ingress_bytes_total": 2118361.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 834.0,
|
||||
"tempo_distributor_push_bytes_sum": 2118361.0,
|
||||
"tempo_distributor_push_bytes_count": 71.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 852.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.022259338999999993,
|
||||
"tempo_distributor_push_duration_seconds_count": 71.0,
|
||||
"tempo_distributor_received_traces_total": 2942.0,
|
||||
"tempo_distributor_spans_received_total": 8412.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 432.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2942.0,
|
||||
"tempo_distributor_traces_per_batch_count": 71.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9236767.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 74.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 31452.0,
|
||||
"loki_distributor_lines_received_total": 33746.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6537632.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 141.0,
|
||||
"prometheus_tsdb_head_chunks": 3645.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3645.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794827664747.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794827664.0,
|
||||
"prometheus_tsdb_head_min_time": 1794827495322.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794827495.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 40015.0,
|
||||
"prometheus_tsdb_head_series": 3645.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3645.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,326 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794829065.45,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4397.0,
|
||||
"otelcol_exporter_sent_metric_points": 139.0,
|
||||
"otelcol_exporter_sent_spans": 491.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 402.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 5027.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 21.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 21.0,
|
||||
"otelcol_processor_incoming_items": 15750.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4638.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 139.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 10973.0,
|
||||
"otelcol_processor_outgoing_items": 15750.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 5709.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 1903.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 4010.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 984.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 41.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 5709.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 657.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4009.0,
|
||||
"otelcol_receiver_accepted_log_records": 4638.0,
|
||||
"otelcol_receiver_accepted_metric_points": 139.0,
|
||||
"otelcol_receiver_accepted_spans": 10973.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 122284.0,
|
||||
"tempo_distributor_ingress_bytes_total": 122284.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 46.0,
|
||||
"tempo_distributor_push_bytes_sum": 122284.0,
|
||||
"tempo_distributor_push_bytes_count": 4.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 48.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.003535791,
|
||||
"tempo_distributor_push_duration_seconds_count": 4.0,
|
||||
"tempo_distributor_received_traces_total": 159.0,
|
||||
"tempo_distributor_spans_received_total": 491.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 25.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 159.0,
|
||||
"tempo_distributor_traces_per_batch_count": 4.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1203226.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 12.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 10705.0,
|
||||
"loki_distributor_lines_received_total": 4397.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 851308.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 34.0,
|
||||
"prometheus_tsdb_head_chunks": 3662.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3662.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794829063144.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794829063.0,
|
||||
"prometheus_tsdb_head_min_time": 1794829030800.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794829030.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 8111.0,
|
||||
"prometheus_tsdb_head_series": 3662.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3662.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794829155.442,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26158.0,
|
||||
"otelcol_exporter_sent_metric_points": 451.0,
|
||||
"otelcol_exporter_sent_spans": 5862.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2287.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 32471.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 125.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 125.0,
|
||||
"otelcol_processor_incoming_items": 89590.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26398.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 451.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62741.0,
|
||||
"otelcol_processor_outgoing_items": 89590.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 62484.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 20828.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 22930.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 3144.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 131.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 62484.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 7876.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 233090.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 426320.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 17930.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 5000.0,
|
||||
"otelcol_receiver_accepted_log_records": 26398.0,
|
||||
"otelcol_receiver_accepted_metric_points": 451.0,
|
||||
"otelcol_receiver_accepted_spans": 62741.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1474580.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1474580.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 572.0,
|
||||
"tempo_distributor_push_bytes_sum": 1474580.0,
|
||||
"tempo_distributor_push_bytes_count": 49.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 588.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.017554829000000004,
|
||||
"tempo_distributor_push_duration_seconds_count": 49.0,
|
||||
"tempo_distributor_received_traces_total": 2038.0,
|
||||
"tempo_distributor_spans_received_total": 5862.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 299.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2038.0,
|
||||
"tempo_distributor_traces_per_batch_count": 49.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7181983.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 57.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 32784.0,
|
||||
"loki_distributor_lines_received_total": 26158.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5089884.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 106.0,
|
||||
"prometheus_tsdb_head_chunks": 3777.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3777.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794829153131.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794829153.0,
|
||||
"prometheus_tsdb_head_min_time": 1794829030800.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794829030.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 30766.0,
|
||||
"prometheus_tsdb_head_series": 3777.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3777.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794829201.025,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33745.0,
|
||||
"otelcol_exporter_sent_metric_points": 607.0,
|
||||
"otelcol_exporter_sent_spans": 8337.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3115.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 42689.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 170.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 170.0,
|
||||
"otelcol_processor_incoming_items": 114348.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33745.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 607.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 114348.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 87696.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 29232.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 29232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 4224.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 3.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 176.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 87696.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 13798.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 315016.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 576208.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 24232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 5000.0,
|
||||
"otelcol_receiver_accepted_log_records": 33745.0,
|
||||
"otelcol_receiver_accepted_metric_points": 607.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 2100221.0,
|
||||
"tempo_distributor_ingress_bytes_total": 2100221.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 819.0,
|
||||
"tempo_distributor_push_bytes_sum": 2100221.0,
|
||||
"tempo_distributor_push_bytes_count": 70.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 840.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.025638496000000004,
|
||||
"tempo_distributor_push_duration_seconds_count": 70.0,
|
||||
"tempo_distributor_received_traces_total": 2895.0,
|
||||
"tempo_distributor_spans_received_total": 8337.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 426.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2895.0,
|
||||
"tempo_distributor_traces_per_batch_count": 70.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9270514.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 73.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 37939.0,
|
||||
"loki_distributor_lines_received_total": 33745.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6571340.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 143.0,
|
||||
"prometheus_tsdb_head_chunks": 3820.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3820.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794829200841.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794829200.0,
|
||||
"prometheus_tsdb_head_min_time": 1794829030800.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794829030.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 43009.0,
|
||||
"prometheus_tsdb_head_series": 3820.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3820.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
run,variant,repeat,order,clean_s,light_rps,light_p50_ms,light_p95_ms,light_p99_ms,light_unexpected,dropped,api_cores,api_cpu_ms_per_req,worker_cores,relay_cores,collector_cores,prometheus_cores,loki_cores,tempo_cores,telemetry_cores,api_peak_mib,worker_peak_mib,relay_peak_mib,collector_peak_mib,prometheus_peak_mib,loki_peak_mib,tempo_peak_mib,spans_in_per_s,spans_out_per_s,tempo_spans_per_s,tempo_bytes_per_s,loki_lines_per_s,loki_bytes_per_s,points_in_per_s,prom_series,prom_samples_per_s,collector_lost,dropped_too_early,sdk_warnings,span_gap,broken_n,broken_kept,slow_n,slow_kept,slow_mid_n,slow_mid_kept,bad_n,bad_kept,upload_n,upload_kept,me_n,me_kept,logs_share,log_to_trace_n,log_to_trace_kept,uploads_ready,bad_failed,uploads_other,ttr_p50_s,ttr_p95_s,locks,flags
|
||||
balanced-r1,balanced,1,1,90.0,200.0,3.0,5.8,7.2,0,0,0.3982,1.9071,0.0879,0.0048,0.0048,0.0021,0.0066,0.0031,0.0166,168.6,121.4,77.5,82.1,48.5,137.4,354.1,568.534,29.542,29.542,7424.956,241.648,66156.688,1.733,344.0,22.687,0,0,0,0.0,28,28,33,33,24,24,14,14,70,4,60,4,1.0,75,75,70,14,0,0.387,0.642,3,
|
||||
head-r1,head,1,2,90.0,200.0,3.2,6.3,8.0,0,0,0.3885,1.8606,0.0886,0.0047,0.0033,0.0023,0.007,0.004,0.0166,167.5,121.2,77.8,63.8,57.1,136.1,335.6,57.236,57.102,57.102,11227.309,238.985,65419.857,3.466,3584.0,238.596,0,0,0,0.0,28,5,32,3,23,2,14,1,70,9,60,8,1.0,74,9,70,14,0,0.412,0.637,3,
|
||||
tail-r1,tail,1,3,90.0,200.0,3.4,6.8,8.7,0,0,0.4137,1.9813,0.0894,0.0049,0.005,0.0022,0.007,0.0037,0.0179,167.2,108.7,77.7,81.9,49.0,162.4,367.1,575.263,64.803,64.803,16311.706,241.948,66232.005,3.466,3822.0,251.758,0,0,0,0.0,28,28,33,12,22,1,14,14,70,25,60,5,1.0,75,54,70,14,0,0.417,0.635,3,
|
||||
off-r1,off,1,4,90.0,200.0,3.4,7.0,8.5,0,0,0.3712,1.7778,0.0901,0.0041,,,,,0.0,162.3,115.3,72.7,,,,,,,,,,,,,,,,0,,,,,,,,,,,,,,,,,70,14,0,0.44,0.649,3,
|
||||
full-r1,full,1,5,90.0,200.0,3.3,6.7,8.5,0,0,0.4099,1.9631,0.0887,0.005,0.005,0.0021,0.0068,0.0119,0.0258,168.1,121.5,77.8,69.7,51.3,139.0,474.1,568.757,568.757,568.757,108769.42,241.712,66173.121,3.466,3413.0,225.937,0,0,0,0.0,28,28,33,33,22,22,14,14,70,70,60,60,1.0,75,75,70,14,0,0.375,0.649,3,
|
||||
balanced-r2,balanced,2,6,90.0,200.0,3.3,6.8,8.7,0,0,0.4107,1.967,0.0896,0.005,0.0051,0.0021,0.0071,0.0034,0.0177,168.1,121.3,77.2,78.1,51.1,153.3,378.4,572.243,31.191,31.191,7837.469,240.38,65798.867,1.733,345.0,22.546,0,0,0,0.0,28,28,33,33,24,24,14,14,70,9,60,0,1.0,75,75,70,14,0,0.4,0.651,3,
|
||||
tail-r2,tail,2,7,90.0,200.0,3.4,7.1,9.1,0,0,0.414,1.9828,0.0889,0.0049,0.005,0.0022,0.0066,0.0035,0.0173,168.1,120.6,77.5,78.4,56.0,140.2,311.4,575.301,59.576,59.576,14989.302,239.172,65471.278,3.466,3645.0,239.849,0,0,0,0.0,28,28,34,14,22,2,14,14,70,23,60,5,1.0,76,56,70,14,0,0.371,0.637,3,
|
||||
off-r2,off,2,8,90.0,200.0,3.6,7.2,8.9,0,0,0.3769,1.8051,0.0902,0.0042,,,,,0.0,162.1,114.0,72.7,,,,,,,,,,,,,,,,0,,,,,,,,,,,,,,,,,70,14,0,0.396,0.64,3,
|
||||
head-r2,head,2,9,90.0,200.0,3.4,6.8,8.5,0,0,0.3949,1.8913,0.0895,0.0049,0.0034,0.0021,0.0072,0.0037,0.0164,167.3,121.3,77.3,61.8,57.1,130.4,317.7,56.391,56.724,56.724,11167.517,241.715,66169.194,3.466,3411.0,224.429,0,0,0,0.0,28,3,32,3,21,1,14,2,70,8,60,6,1.0,74,8,70,14,0,0.371,0.637,3,
|
||||
full-r2,full,2,10,90.0,200.0,3.3,7.0,9.1,0,0,0.413,1.978,0.089,0.0047,0.0053,0.0023,0.007,0.0119,0.0265,168.2,108.7,77.4,73.3,58.0,144.7,464.4,575.17,575.192,575.192,110197.514,241.667,66393.284,3.466,3759.0,247.631,0,0,0,0.0,28,28,33,33,22,22,14,14,70,70,60,60,1.0,75,75,70,14,0,0.391,0.634,3,
|
||||
head-r3,head,3,11,90.0,200.0,3.4,6.8,8.4,0,0,0.3993,1.9124,0.0893,0.0049,0.0034,0.0023,0.0068,0.0039,0.0164,168.3,121.4,77.4,62.6,50.9,146.9,310.2,57.786,58.23,58.23,11475.929,240.398,66048.986,3.466,3412.0,224.51,0,0,0,0.0,28,5,33,3,22,2,14,1,70,10,60,7,1.0,75,9,70,14,0,0.406,0.647,3,
|
||||
balanced-r3,balanced,3,12,90.0,200.0,3.3,6.9,9.1,0,0,0.4108,1.9674,0.0888,0.0048,0.0053,0.0023,0.0074,0.0032,0.0182,167.8,121.4,77.3,79.3,49.2,157.7,372.4,569.127,28.233,28.233,7129.11,240.731,66145.121,1.733,691.0,44.155,0,0,0,0.0,28,28,33,33,23,23,14,14,70,3,60,4,1.0,75,75,70,14,0,0.39,0.648,3,
|
||||
off-r3,off,3,13,90.0,200.0,3.6,7.3,8.9,0,0,0.3785,1.8127,0.089,0.0041,,,,,0.0,162.3,115.0,70.9,,,,,,,,,,,,,,,,0,,,,,,,,,,,,,,,,,70,14,0,0.415,0.64,3,
|
||||
full-r3,full,3,14,90.0,200.0,3.4,7.0,9.1,0,0,0.4138,1.9818,0.0898,0.0049,0.0046,0.0022,0.0064,0.0124,0.0256,168.2,121.1,77.5,70.6,53.9,145.0,487.4,575.524,575.546,575.546,110258.197,242.12,66519.793,3.466,3413.0,227.387,0,0,0,0.0,28,28,33,33,24,24,14,14,70,70,60,60,1.0,75,75,70,14,0,0.42,0.642,3,
|
||||
tail-r3,tail,3,15,90.0,200.0,3.5,7.0,8.9,0,0,0.4154,1.9895,0.0896,0.005,0.0053,0.0022,0.0069,0.0036,0.018,167.8,121.3,77.7,79.4,53.8,148.7,308.2,575.251,59.683,59.683,15026.847,241.81,66436.539,3.467,3820.0,251.745,0,0,0,0.0,28,28,33,12,23,2,14,14,70,27,60,4,1.0,75,54,70,14,0,0.392,0.662,3,
|
||||
|
@@ -0,0 +1,75 @@
|
||||
# Цена наблюдаемости: метка `baseline-after-restart`
|
||||
|
||||
- Статус: **готово**; прогонов 15 из 15
|
||||
- Код (`src_sha256` образа): `81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a`
|
||||
- Профиль `telemetry`: варианты off, full, head, tail, balanced × 3 повтора кругами; окна — разогрев 20 с, чистое 90 с (цена), отказы 30 с (блокировка `messages` на 0.6 с в моменты 5, 15, 25 с окна)
|
||||
- Нагрузка (открытая, запросов/с): read 100, write 30, me 40, chat 30, download 8, upload 0.5, bad 0.1, broken 0.2
|
||||
- Варианты: `off` — SDK выключен, сервисов телеметрии нет; `full` — как рабочий стенд: все трассы, 15 с, default; `head` — доля корней 0,1 в SDK; `tail` — Collector: ошибки, трасса ≥ 500 мс, 10 % остальных; `balanced` — Collector: ошибки, исход задания, server span ≥ 250 мс, 5 %; метрики 30 с, coarse, отбор рядов хранилищ
|
||||
- Источники: задержки — журнал генератора (от момента по расписанию); CPU — сэмплер cgroup за чистое окно, CPU реплик на запрос — по всем ответам окна; пики — `memory.peak` контейнеров прогона; приём и потери — собственные метрики Collector, Tempo, Loki, Prometheus по краям чистого окна и в конце; сохранённые трассы — запись доступа в Loki по `X-Request-Id` и её trace_id в Tempo. Значения — медиана (min–max) повторов
|
||||
|
||||
## Задержки и CPU (чистое окно)
|
||||
|
||||
| Вариант | p50 лёгких, мс | p95, мс | p99, мс | CPU реплик, ядер | CPU на запрос, мс | к off | worker, ядер | телеметрия, ядер | пик Collector, МиБ | пик Tempo, МиБ | пик реплики, МиБ |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `off` | 3.60 (3.40–3.60) | 7.20 (7.00–7.30) | 8.90 (8.50–8.90) | 0.377 (0.371–0.379) | 1.805 (1.778–1.813) | +0% | 0.090 (0.089–0.090) | 0.000 (0.000–0.000) | — | — | 162 (162–162) |
|
||||
| `full` | 3.30 (3.30–3.40) | 7.00 (6.70–7.00) | 9.10 (8.50–9.10) | 0.413 (0.410–0.414) | 1.978 (1.963–1.982) | +10% | 0.089 (0.089–0.090) | 0.026 (0.026–0.026) | 71 (70–73) | 474 (464–487) | 168 (168–168) |
|
||||
| `head` | 3.40 (3.20–3.40) | 6.80 (6.30–6.80) | 8.40 (8.00–8.50) | 0.395 (0.389–0.399) | 1.891 (1.861–1.912) | +5% | 0.089 (0.089–0.089) | 0.016 (0.016–0.017) | 63 (62–64) | 318 (310–336) | 168 (167–168) |
|
||||
| `tail` | 3.40 (3.40–3.50) | 7.00 (6.80–7.10) | 8.90 (8.70–9.10) | 0.414 (0.414–0.415) | 1.983 (1.981–1.990) | +10% | 0.089 (0.089–0.090) | 0.018 (0.017–0.018) | 79 (78–82) | 311 (308–367) | 168 (167–168) |
|
||||
| `balanced` | 3.30 (3.00–3.30) | 6.80 (5.80–6.90) | 8.70 (7.20–9.10) | 0.411 (0.398–0.411) | 1.967 (1.907–1.967) | +9% | 0.089 (0.088–0.090) | 0.018 (0.017–0.018) | 79 (78–82) | 372 (354–378) | 168 (168–169) |
|
||||
|
||||
## p95 по классам, мс (чистое окно; `write` — и окно отказов)
|
||||
|
||||
| Вариант | read | write | me | chat | download | upload | bad | broken | write (отказы) |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `off` | 7.5 | 8.0 | 3.5 | 5.4 | 9.3 | 22.0 | 11.7 | 6.7 | 110.0 |
|
||||
| `full` | 7.2 | 7.8 | 3.7 | 5.1 | 9.2 | 21.5 | 12.0 | 7.8 | 108.1 |
|
||||
| `head` | 7.0 | 7.6 | 3.3 | 5.2 | 9.0 | 22.8 | 12.5 | 6.8 | 105.3 |
|
||||
| `tail` | 7.2 | 7.9 | 3.5 | 5.1 | 9.5 | 22.0 | 11.7 | 6.7 | 113.9 |
|
||||
| `balanced` | 6.9 | 7.8 | 3.3 | 5.0 | 9.0 | 21.7 | 12.7 | 7.6 | 102.0 |
|
||||
|
||||
## Приём (чистое окно) и пересчёт на сутки
|
||||
|
||||
| Вариант | span в Collector, /с | span в Tempo, /с | Tempo, КиБ/с | Tempo, ГиБ/сутки | строк Loki, /с | Loki, КиБ/с | Loki, ГиБ/сутки | точек метрик в Collector, /с | рядов Prometheus | отсчётов/с |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `full` | 575.2 (568.8–575.5) | 575.2 (568.8–575.5) | 107.6 (106.2–107.7) | 8.87 (8.75–8.87) | 241.7 (241.7–242.1) | 64.8 (64.6–65.0) | 5.34 (5.32–5.35) | 3.5 (3.5–3.5) | 3413 (3413–3759) | 227.4 (225.9–247.6) |
|
||||
| `head` | 57.2 (56.4–57.8) | 57.1 (56.7–58.2) | 11.0 (10.9–11.2) | 0.90 (0.90–0.92) | 240.4 (239.0–241.7) | 64.5 (63.9–64.6) | 5.31 (5.26–5.32) | 3.5 (3.5–3.5) | 3412 (3411–3584) | 224.5 (224.4–238.6) |
|
||||
| `tail` | 575.3 (575.3–575.3) | 59.7 (59.6–64.8) | 14.7 (14.6–15.9) | 1.21 (1.21–1.31) | 241.8 (239.2–241.9) | 64.7 (63.9–64.9) | 5.33 (5.27–5.35) | 3.5 (3.5–3.5) | 3820 (3645–3822) | 251.7 (239.8–251.8) |
|
||||
| `balanced` | 569.1 (568.5–572.2) | 29.5 (28.2–31.2) | 7.3 (7.0–7.7) | 0.60 (0.57–0.63) | 240.7 (240.4–241.6) | 64.6 (64.3–64.6) | 5.32 (5.29–5.32) | 1.7 (1.7–1.7) | 345 (344–691) | 22.7 (22.5–44.2) |
|
||||
|
||||
## Что сохраняет вариант (сумма повторов) и потери
|
||||
|
||||
| Вариант | 500: трасс | медленные записи (≥ 250 мс на сервере) | из них 250–500 мс | failed: цепочек | загрузки: цепочек | `me`: трасс | записи журнала | запись → трасса (редкие) | потери Collector / до решения / SDK | Collector → Tempo, расхождение |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `full` | 84/84 | 99/99 | 68/68 | 42/42 | 210/210 | 180/180 | 100% | 225/225 | 0 / 0 / 0 | 0.00 % |
|
||||
| `head` | 13/84 | 9/97 | 5/66 | 4/42 | 27/210 | 21/180 | 100% | 26/223 | 0 / 0 / 0 | 0.00 % |
|
||||
| `tail` | 84/84 | 38/100 | 5/67 | 42/42 | 75/210 | 14/180 | 100% | 164/226 | 0 / 0 / 0 | 0.00 % |
|
||||
| `balanced` | 84/84 | 99/99 | 71/71 | 42/42 | 16/210 | 8/180 | 100% | 225/225 | 0 / 0 / 0 | 0.00 % |
|
||||
|
||||
## Загрузки
|
||||
|
||||
| Вариант | ready | failed (`bad`) | время до ready p50 / p95, с |
|
||||
|---|---:|---:|---:|
|
||||
| `off` | 210 | 42 | 0.41 (0.40–0.44) / 0.64 (0.64–0.65) |
|
||||
| `full` | 210 | 42 | 0.39 (0.38–0.42) / 0.64 (0.63–0.65) |
|
||||
| `head` | 210 | 42 | 0.41 (0.37–0.41) / 0.64 (0.64–0.65) |
|
||||
| `tail` | 210 | 42 | 0.39 (0.37–0.42) / 0.64 (0.64–0.66) |
|
||||
| `balanced` | 210 | 42 | 0.39 (0.39–0.40) / 0.65 (0.64–0.65) |
|
||||
|
||||
## Гипотезы и критерии balanced
|
||||
|
||||
Тексты и пороги — `REPORT.md`, «Трек 1. Цена наблюдаемости» (записаны до замеров). Эффект — |Δ медиан| больше размаха повторов `full` и разбросы не пересекаются; доли редких событий — по сумме повторов, интервал Уилсона 95 %.
|
||||
|
||||
| | Итог | Числа |
|
||||
|---|---|---|
|
||||
| T1 | опровергнута | CPU реплик на запрос 1.805 → 1.978 мс (+10%, эффект: True); p99 лёгких 8.90 → 9.10 мс (эффект: False); p50 3.60 → 3.30 мс |
|
||||
| T2 | подтверждена | надбавка head 50% надбавки full; span Tempo 9.9% full; трассы 500 13/84, медленных 9/97, цепочек failed 4/42 (интервал около 0,1: [True, True, True]); записи журнала 100% |
|
||||
| T3 | опровергнута | CPU реплик против full — эффект: False; span Tempo 10.4% full; пик Collector 70.6 → 79.4 МиБ; трассы 500 84/84, цепочки failed 42/42; медленные 250–500 мс 5/67, ≥ 500 мс 33/33 |
|
||||
| T4 | подтверждена | рядов 345 из 3413 (10%), отсчётов/с 22.7 из 227.4 (10%) |
|
||||
| T5 | подтверждена | запись → трасса у редких классов: full 225/225, head 26/223 (интервал около 0,1: True), balanced 225/225 |
|
||||
| T6 | подтверждена | потери Collector 0, отброшено до решения 0, строк SDK о потерях 0; Collector → Tempo наибольшее расхождение 0.00 % |
|
||||
| T7 | подтверждена | CPU Tempo 0.012 против Loki + Prometheus 0.009 ядра; приём Tempo 107.6 против Loki 64.8 КиБ/с |
|
||||
| S1 | выполнен | трассы 500 84/84, медленных записей 99/99, цепочки failed 42/42 |
|
||||
| S2 | выполнен | span Tempo 29.5/с — 5.1% full, tail 59.7/с; рядов 10% full |
|
||||
| S3 | выполнен | потерь 0; пик Collector 82.1 МиБ (предел 154 из 256) |
|
||||
| S4 | выполнен | CPU реплик на запрос 1.967 против full 1.978 мс (к off +9%); выше full с эффектом: False; Collector 0.005 против 0.005 ядра |
|
||||
| S5 | выполнен | запись журнала → трасса у 500, медленных и failed: 225/225 |
|
||||
@@ -0,0 +1,33 @@
|
||||
run,variant,repeat,window,class,n,unexpected,dropped,p50_ms,p95_ms,p99_ms,max_ms
|
||||
balanced-r1,balanced,1,clean,read,9000,0,0,3.7,5.8,7.5,72.6
|
||||
balanced-r1,balanced,1,clean,write,2700,0,0,4.5,6.9,8.3,78.3
|
||||
balanced-r1,balanced,1,clean,me,3600,0,0,1.2,3.1,3.9,29.4
|
||||
balanced-r1,balanced,1,clean,chat,2700,0,0,2.3,3.9,4.7,66.3
|
||||
balanced-r1,balanced,1,clean,download,720,0,0,5.7,8.3,9.6,19.1
|
||||
balanced-r1,balanced,1,clean,upload,45,0,0,18.5,21.4,21.8,21.8
|
||||
balanced-r1,balanced,1,clean,bad,9,0,0,10.3,11.3,11.3,11.3
|
||||
balanced-r1,balanced,1,clean,broken,18,0,0,4.8,6.7,6.7,6.7
|
||||
balanced-r1,balanced,1,fault,read,3000,0,0,3.7,5.8,7.7,65.3
|
||||
balanced-r1,balanced,1,fault,write,900,0,0,4.6,111.4,509.1,608.3
|
||||
balanced-r1,balanced,1,fault,me,1200,0,0,1.2,3.0,4.0,40.4
|
||||
balanced-r1,balanced,1,fault,chat,900,0,0,2.3,3.9,4.8,25.7
|
||||
balanced-r1,balanced,1,fault,download,240,0,0,6.0,8.4,10.5,21.5
|
||||
balanced-r1,balanced,1,fault,upload,15,0,0,16.8,30.6,30.6,30.6
|
||||
balanced-r1,balanced,1,fault,bad,3,0,0,9.2,10.6,10.6,10.6
|
||||
balanced-r1,balanced,1,fault,broken,6,0,0,3.6,5.0,5.0,5.0
|
||||
head-r1,head,1,clean,read,9000,0,0,3.8,6.4,8.2,13.7
|
||||
head-r1,head,1,clean,write,2700,0,0,4.7,7.6,8.5,14.6
|
||||
head-r1,head,1,clean,me,3600,0,0,1.6,3.4,4.1,5.7
|
||||
head-r1,head,1,clean,chat,2700,0,0,2.3,4.5,5.6,8.4
|
||||
head-r1,head,1,clean,download,720,0,0,5.9,8.9,10.8,13.8
|
||||
head-r1,head,1,clean,upload,45,0,0,19.0,22.0,24.6,24.6
|
||||
head-r1,head,1,clean,bad,9,0,0,11.3,12.8,12.8,12.8
|
||||
head-r1,head,1,clean,broken,18,0,0,3.3,6.8,6.8,6.8
|
||||
head-r1,head,1,fault,read,3000,0,0,4.0,6.9,9.2,60.0
|
||||
head-r1,head,1,fault,write,900,0,0,5.0,109.2,506.3,605.3
|
||||
head-r1,head,1,fault,me,1200,0,0,1.7,3.7,4.7,25.4
|
||||
head-r1,head,1,fault,chat,900,0,0,2.4,4.8,6.6,27.6
|
||||
head-r1,head,1,fault,download,240,0,0,6.4,10.0,14.1,30.9
|
||||
head-r1,head,1,fault,upload,15,0,0,20.4,36.1,36.1,36.1
|
||||
head-r1,head,1,fault,bad,3,0,0,11.1,11.6,11.6,11.6
|
||||
head-r1,head,1,fault,broken,6,0,0,4.4,6.3,6.3,6.3
|
||||
|
@@ -0,0 +1,680 @@
|
||||
{
|
||||
"kind": "telemetry-cost",
|
||||
"label": "baseline",
|
||||
"started": "2026-11-16T10:34:12Z",
|
||||
"profile": {
|
||||
"name": "telemetry",
|
||||
"variants": [
|
||||
"off",
|
||||
"full",
|
||||
"head",
|
||||
"tail",
|
||||
"balanced"
|
||||
],
|
||||
"repeats": 3,
|
||||
"warmup_s": 20.0,
|
||||
"clean_s": 90.0,
|
||||
"fault_s": 30.0,
|
||||
"locks": [
|
||||
5.0,
|
||||
15.0,
|
||||
25.0
|
||||
],
|
||||
"lock_s": 0.6,
|
||||
"rates": [
|
||||
[
|
||||
"read",
|
||||
100.0
|
||||
],
|
||||
[
|
||||
"write",
|
||||
30.0
|
||||
],
|
||||
[
|
||||
"me",
|
||||
40.0
|
||||
],
|
||||
[
|
||||
"chat",
|
||||
30.0
|
||||
],
|
||||
[
|
||||
"download",
|
||||
8.0
|
||||
],
|
||||
[
|
||||
"upload",
|
||||
0.5
|
||||
],
|
||||
[
|
||||
"bad",
|
||||
0.1
|
||||
],
|
||||
[
|
||||
"broken",
|
||||
0.2
|
||||
]
|
||||
],
|
||||
"settle_s": 15.0,
|
||||
"drain_timeout_s": 180.0,
|
||||
"users": 4,
|
||||
"read_messages": 200,
|
||||
"warm_uploads": 3,
|
||||
"upload_width": 480,
|
||||
"upload_height": 320,
|
||||
"seed": 20261116,
|
||||
"sample_interval_s": 1.0,
|
||||
"api_replicas": 2,
|
||||
"api_cpus": 1.0,
|
||||
"api_memory": "512m",
|
||||
"db_cpus": 1.0,
|
||||
"db_memory": "768m",
|
||||
"lb_cpus": 0.5,
|
||||
"lb_memory": "256m",
|
||||
"worker_cpus": 1.0,
|
||||
"worker_memory": "768m",
|
||||
"gen_cpus": 1.0,
|
||||
"gen_memory": "256m",
|
||||
"sampler_memory": "128m",
|
||||
"session_ttl": 21600
|
||||
},
|
||||
"host": {
|
||||
"platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
|
||||
"machine": "arm64",
|
||||
"cpu_model": "Apple M4",
|
||||
"cpu_count": 10,
|
||||
"ram_gb": 16.0,
|
||||
"swap_used_mib": 5668.75,
|
||||
"power": "AC Power",
|
||||
"memory_pressure": null,
|
||||
"memory_free_percent": 36,
|
||||
"swapouts": 2932993,
|
||||
"loadavg_1m": 2.14
|
||||
},
|
||||
"docker": {
|
||||
"ServerVersion": "28.0.4",
|
||||
"OperatingSystem": "Docker Desktop",
|
||||
"KernelVersion": "6.10.14-linuxkit",
|
||||
"Architecture": "aarch64",
|
||||
"NCPU": 10,
|
||||
"MemTotal": 8218034176,
|
||||
"CgroupVersion": "2",
|
||||
"CgroupDriver": "cgroupfs",
|
||||
"compose_version": "5.6.1",
|
||||
"other_running_containers": []
|
||||
},
|
||||
"budget": {
|
||||
"limits_cpus": 9.75,
|
||||
"limits_memory_gib": 6.12,
|
||||
"vm_cpus": 10,
|
||||
"vm_memory_gib": 7.65
|
||||
},
|
||||
"host_warnings": [
|
||||
"host swapped out 17036 pages during the run"
|
||||
],
|
||||
"image": {
|
||||
"tag": "mtusi-messenger-vladimirceva:bench-baseline",
|
||||
"id": "sha256:eea0aeeb3914b91fc13065cef6e15b6873e92792e75c4827aaf32c7d7896ae6e",
|
||||
"created": "2026-11-16T10:00:19.531602924Z",
|
||||
"src_sha256": "81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a",
|
||||
"versions": {
|
||||
"python": "3.13.15",
|
||||
"fastapi": "0.142.1",
|
||||
"starlette": "1.7.0",
|
||||
"uvicorn": "0.54.0",
|
||||
"pydantic": "2.13.5",
|
||||
"sqlalchemy": "2.1.1",
|
||||
"asyncpg": "0.31.0",
|
||||
"alembic": "1.20.0",
|
||||
"redis": "8.1.0",
|
||||
"argon2-cffi": "25.1.0",
|
||||
"aiobotocore": "3.10.0",
|
||||
"botocore": "1.43.117",
|
||||
"aiohttp": "3.14.5"
|
||||
},
|
||||
"app_defaults": {
|
||||
"pool_size": 10,
|
||||
"pool_overflow": 5,
|
||||
"pool_timeout": 5.0,
|
||||
"operation_timeout": 6.0,
|
||||
"statement_timeout_ms": 5000,
|
||||
"kdf_concurrency": 4,
|
||||
"keep_alive": 60,
|
||||
"shutdown_timeout": 5,
|
||||
"s3_timeout": 5.0,
|
||||
"s3_max_connections": 10,
|
||||
"uploads": {
|
||||
"max_concurrent": 4,
|
||||
"max_waiting": 16,
|
||||
"wait_timeout": 5.0,
|
||||
"body_timeout": 30.0,
|
||||
"max_unfinished": 300
|
||||
},
|
||||
"cleaner": {
|
||||
"interval": 60.0,
|
||||
"grace": 900,
|
||||
"batch": 100,
|
||||
"reconcile_interval": 3600,
|
||||
"reconcile_page": 1000,
|
||||
"reconcile_max_changes": 100,
|
||||
"reconcile_rate": 2000.0,
|
||||
"staging_retention": 86400
|
||||
},
|
||||
"pipeline": {
|
||||
"concurrency": 2,
|
||||
"prefetch": 2,
|
||||
"max_attempts": 5,
|
||||
"job_timeout": 60.0,
|
||||
"lease_margin": 20.0,
|
||||
"retry_base": 2.0,
|
||||
"retry_max": 120.0,
|
||||
"render_memory_mb": 768,
|
||||
"stop_timeout": 8.0,
|
||||
"fault": ""
|
||||
},
|
||||
"relay": {
|
||||
"interval": 0.5,
|
||||
"batch": 100,
|
||||
"republish_after": 120.0,
|
||||
"fault": ""
|
||||
},
|
||||
"malloc_mmap_threshold": "131072"
|
||||
}
|
||||
},
|
||||
"code": {
|
||||
"src_sha256": "81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a",
|
||||
"git_commit": "470d9d6f1e4fe4f594e37c2ba59550ee5ca54fc1",
|
||||
"git_dirty": true
|
||||
},
|
||||
"plan": [
|
||||
{
|
||||
"run": "balanced-r1",
|
||||
"variant": "balanced",
|
||||
"repeat": 1,
|
||||
"order": 1
|
||||
},
|
||||
{
|
||||
"run": "head-r1",
|
||||
"variant": "head",
|
||||
"repeat": 1,
|
||||
"order": 2
|
||||
},
|
||||
{
|
||||
"run": "tail-r1",
|
||||
"variant": "tail",
|
||||
"repeat": 1,
|
||||
"order": 3
|
||||
},
|
||||
{
|
||||
"run": "off-r1",
|
||||
"variant": "off",
|
||||
"repeat": 1,
|
||||
"order": 4
|
||||
},
|
||||
{
|
||||
"run": "full-r1",
|
||||
"variant": "full",
|
||||
"repeat": 1,
|
||||
"order": 5
|
||||
},
|
||||
{
|
||||
"run": "balanced-r2",
|
||||
"variant": "balanced",
|
||||
"repeat": 2,
|
||||
"order": 6
|
||||
},
|
||||
{
|
||||
"run": "tail-r2",
|
||||
"variant": "tail",
|
||||
"repeat": 2,
|
||||
"order": 7
|
||||
},
|
||||
{
|
||||
"run": "off-r2",
|
||||
"variant": "off",
|
||||
"repeat": 2,
|
||||
"order": 8
|
||||
},
|
||||
{
|
||||
"run": "head-r2",
|
||||
"variant": "head",
|
||||
"repeat": 2,
|
||||
"order": 9
|
||||
},
|
||||
{
|
||||
"run": "full-r2",
|
||||
"variant": "full",
|
||||
"repeat": 2,
|
||||
"order": 10
|
||||
},
|
||||
{
|
||||
"run": "head-r3",
|
||||
"variant": "head",
|
||||
"repeat": 3,
|
||||
"order": 11
|
||||
},
|
||||
{
|
||||
"run": "balanced-r3",
|
||||
"variant": "balanced",
|
||||
"repeat": 3,
|
||||
"order": 12
|
||||
},
|
||||
{
|
||||
"run": "off-r3",
|
||||
"variant": "off",
|
||||
"repeat": 3,
|
||||
"order": 13
|
||||
},
|
||||
{
|
||||
"run": "full-r3",
|
||||
"variant": "full",
|
||||
"repeat": 3,
|
||||
"order": 14
|
||||
},
|
||||
{
|
||||
"run": "tail-r3",
|
||||
"variant": "tail",
|
||||
"repeat": 3,
|
||||
"order": 15
|
||||
}
|
||||
],
|
||||
"telemetry_config": {
|
||||
"collector_image": "otel/opentelemetry-collector-contrib:0.164.0@sha256:340c9ca6a36617084c6661bdc4f0fe92b7cda5a805d61673ec8db375fddc522b",
|
||||
"prometheus_image": "prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2",
|
||||
"collector_yaml_sha256": "2f50a1de00af174d5ea14301a4ea78711a74522c6db364cb5becdcc2b71cfec1",
|
||||
"prometheus_yml_sha256": "8d43d514874812ede7c66065dacc84e3752e7d88fc543367593f09c5dcd433b6",
|
||||
"variant_files_sha256": {
|
||||
"tail-typical.yaml": "5d91c86978ceaeccde2fd1f36c6676a02ecf912eec6c363ab16edbf3b1940f88",
|
||||
"tail-balanced.yaml": "85141de134a004c5513c70f34ca26b86adf6c8d18b1e039729b3209a9c91e9af",
|
||||
"prometheus-lean.yml": "b59d49210eef2d6ff14836bb1e6f0e30310d3f5e94245a7cba30238896575375"
|
||||
}
|
||||
},
|
||||
"variants": {
|
||||
"off": {
|
||||
"env": {
|
||||
"OTEL_SDK_DISABLED": "true",
|
||||
"OTEL_TRACES_SAMPLER_ARG": "1",
|
||||
"OTEL_METRIC_EXPORT_INTERVAL": "15000",
|
||||
"TELEMETRY_HISTOGRAM_BUCKETS": "default"
|
||||
},
|
||||
"startup": "telemetry=off",
|
||||
"collector_layer": null,
|
||||
"prometheus": null
|
||||
},
|
||||
"full": {
|
||||
"env": {
|
||||
"OTEL_SDK_DISABLED": "false",
|
||||
"OTEL_TRACES_SAMPLER_ARG": "1",
|
||||
"OTEL_METRIC_EXPORT_INTERVAL": "15000",
|
||||
"TELEMETRY_HISTOGRAM_BUCKETS": "default"
|
||||
},
|
||||
"startup": "telemetry=on sample_ratio=1 buckets=default metric_interval=15000ms",
|
||||
"collector_layer": null,
|
||||
"prometheus": null
|
||||
},
|
||||
"head": {
|
||||
"env": {
|
||||
"OTEL_SDK_DISABLED": "false",
|
||||
"OTEL_TRACES_SAMPLER_ARG": "0.1",
|
||||
"OTEL_METRIC_EXPORT_INTERVAL": "15000",
|
||||
"TELEMETRY_HISTOGRAM_BUCKETS": "default"
|
||||
},
|
||||
"startup": "telemetry=on sample_ratio=0.1 buckets=default metric_interval=15000ms",
|
||||
"collector_layer": null,
|
||||
"prometheus": null
|
||||
},
|
||||
"tail": {
|
||||
"env": {
|
||||
"OTEL_SDK_DISABLED": "false",
|
||||
"OTEL_TRACES_SAMPLER_ARG": "1",
|
||||
"OTEL_METRIC_EXPORT_INTERVAL": "15000",
|
||||
"TELEMETRY_HISTOGRAM_BUCKETS": "default"
|
||||
},
|
||||
"startup": "telemetry=on sample_ratio=1 buckets=default metric_interval=15000ms",
|
||||
"collector_layer": "tail-typical.yaml",
|
||||
"prometheus": null
|
||||
},
|
||||
"balanced": {
|
||||
"env": {
|
||||
"OTEL_SDK_DISABLED": "false",
|
||||
"OTEL_TRACES_SAMPLER_ARG": "1",
|
||||
"OTEL_METRIC_EXPORT_INTERVAL": "30000",
|
||||
"TELEMETRY_HISTOGRAM_BUCKETS": "coarse"
|
||||
},
|
||||
"startup": "telemetry=on sample_ratio=1 buckets=coarse metric_interval=30000ms",
|
||||
"collector_layer": "tail-balanced.yaml",
|
||||
"prometheus": "prometheus-lean.yml"
|
||||
}
|
||||
},
|
||||
"runs": {
|
||||
"balanced-r1": {
|
||||
"variant": "balanced",
|
||||
"gen": {
|
||||
"start": 1794825298.893,
|
||||
"duration_s": 140.0,
|
||||
"finished": 1794825438.896,
|
||||
"rates": {
|
||||
"read": 100.0,
|
||||
"write": 30.0,
|
||||
"me": 40.0,
|
||||
"chat": 30.0,
|
||||
"download": 8.0,
|
||||
"upload": 0.5,
|
||||
"bad": 0.1,
|
||||
"broken": 0.2
|
||||
},
|
||||
"scheduled": {
|
||||
"read": 14000,
|
||||
"chat": 4200,
|
||||
"me": 5600,
|
||||
"write": 4200,
|
||||
"download": 1120,
|
||||
"bad": 14,
|
||||
"broken": 28,
|
||||
"upload": 70
|
||||
},
|
||||
"dropped": 0,
|
||||
"statuses": {
|
||||
"read": {
|
||||
"200": 14000
|
||||
},
|
||||
"write": {
|
||||
"201": 4200
|
||||
},
|
||||
"me": {
|
||||
"200": 5600
|
||||
},
|
||||
"chat": {
|
||||
"200": 4200
|
||||
},
|
||||
"download": {
|
||||
"200": 1120
|
||||
},
|
||||
"upload": {
|
||||
"202": 70
|
||||
},
|
||||
"bad": {
|
||||
"202": 14
|
||||
},
|
||||
"broken": {
|
||||
"500": 28
|
||||
}
|
||||
},
|
||||
"peak_inflight": 45,
|
||||
"gen_cpu_s": 3.756
|
||||
},
|
||||
"windows": {
|
||||
"clean": [
|
||||
1794825318.893,
|
||||
1794825408.893
|
||||
],
|
||||
"fault": [
|
||||
1794825408.893,
|
||||
1794825438.893
|
||||
]
|
||||
},
|
||||
"locks_at": [
|
||||
1794825413.890544,
|
||||
1794825423.882113,
|
||||
1794825433.890523
|
||||
],
|
||||
"telemetry_down": [],
|
||||
"startup": {
|
||||
"47fad14eb001": "telemetry=on sample_ratio=1 buckets=coarse metric_interval=30000ms",
|
||||
"be26c6597689": "telemetry=on sample_ratio=1 buckets=coarse metric_interval=30000ms",
|
||||
"vlad-bench-worker": "telemetry=on sample_ratio=1 buckets=coarse metric_interval=30000ms",
|
||||
"vlad-bench-relay": "telemetry=on sample_ratio=1 buckets=coarse metric_interval=30000ms"
|
||||
},
|
||||
"app_env": {
|
||||
"OTEL_EXPORTER_OTLP_ENDPOINT": "http://otel-collector:4318",
|
||||
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
|
||||
"OTEL_METRIC_EXPORT_INTERVAL": "30000",
|
||||
"OTEL_RESOURCE_ATTRIBUTES": "deployment.environment.name=lab",
|
||||
"OTEL_SDK_DISABLED": "false",
|
||||
"OTEL_TRACES_SAMPLER_ARG": "1",
|
||||
"TELEMETRY_HISTOGRAM_BUCKETS": "coarse"
|
||||
},
|
||||
"snap_ts": {
|
||||
"clean_start": 1794825318.891,
|
||||
"clean_end": 1794825408.893,
|
||||
"end": 1794825454.529
|
||||
},
|
||||
"prepare_s": 20.9,
|
||||
"run_s": 186.7
|
||||
},
|
||||
"head-r1": {
|
||||
"variant": "head",
|
||||
"gen": {
|
||||
"start": 1794825496.449,
|
||||
"duration_s": 140.0,
|
||||
"finished": 1794825636.453,
|
||||
"rates": {
|
||||
"read": 100.0,
|
||||
"write": 30.0,
|
||||
"me": 40.0,
|
||||
"chat": 30.0,
|
||||
"download": 8.0,
|
||||
"upload": 0.5,
|
||||
"bad": 0.1,
|
||||
"broken": 0.2
|
||||
},
|
||||
"scheduled": {
|
||||
"read": 14000,
|
||||
"chat": 4200,
|
||||
"me": 5600,
|
||||
"write": 4200,
|
||||
"download": 1120,
|
||||
"bad": 14,
|
||||
"broken": 28,
|
||||
"upload": 70
|
||||
},
|
||||
"dropped": 0,
|
||||
"statuses": {
|
||||
"read": {
|
||||
"200": 14000
|
||||
},
|
||||
"write": {
|
||||
"201": 4200
|
||||
},
|
||||
"me": {
|
||||
"200": 5600
|
||||
},
|
||||
"chat": {
|
||||
"200": 4200
|
||||
},
|
||||
"download": {
|
||||
"200": 1120
|
||||
},
|
||||
"upload": {
|
||||
"202": 70
|
||||
},
|
||||
"bad": {
|
||||
"202": 14
|
||||
},
|
||||
"broken": {
|
||||
"500": 28
|
||||
}
|
||||
},
|
||||
"peak_inflight": 35,
|
||||
"gen_cpu_s": 3.709
|
||||
},
|
||||
"windows": {
|
||||
"clean": [
|
||||
1794825516.449,
|
||||
1794825606.449
|
||||
],
|
||||
"fault": [
|
||||
1794825606.449,
|
||||
1794825636.449
|
||||
]
|
||||
},
|
||||
"locks_at": [
|
||||
1794825611.427998,
|
||||
1794825621.434063,
|
||||
1794825631.444553
|
||||
],
|
||||
"telemetry_down": [],
|
||||
"startup": {
|
||||
"50c346240bb4": "telemetry=on sample_ratio=0.1 buckets=default metric_interval=15000ms",
|
||||
"8e05c181edce": "telemetry=on sample_ratio=0.1 buckets=default metric_interval=15000ms",
|
||||
"vlad-bench-worker": "telemetry=on sample_ratio=0.1 buckets=default metric_interval=15000ms",
|
||||
"vlad-bench-relay": "telemetry=on sample_ratio=0.1 buckets=default metric_interval=15000ms"
|
||||
},
|
||||
"app_env": {
|
||||
"OTEL_EXPORTER_OTLP_ENDPOINT": "http://otel-collector:4318",
|
||||
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
|
||||
"OTEL_METRIC_EXPORT_INTERVAL": "15000",
|
||||
"OTEL_RESOURCE_ATTRIBUTES": "deployment.environment.name=lab",
|
||||
"OTEL_SDK_DISABLED": "false",
|
||||
"OTEL_TRACES_SAMPLER_ARG": "0.1",
|
||||
"TELEMETRY_HISTOGRAM_BUCKETS": "default"
|
||||
},
|
||||
"snap_ts": {
|
||||
"clean_start": 1794825516.432,
|
||||
"clean_end": 1794825606.449,
|
||||
"end": 1794825652.128
|
||||
},
|
||||
"prepare_s": 31.7,
|
||||
"run_s": 195.5
|
||||
}
|
||||
},
|
||||
"bodies": {
|
||||
"upload": {
|
||||
"width": 480,
|
||||
"height": 320,
|
||||
"bytes": 461328,
|
||||
"sha256": "04cb62f5171b12acec0eaa0963fbe29263db2323973ca9e407988ac3fdcc0fd9"
|
||||
},
|
||||
"bad": {
|
||||
"bytes": 8666,
|
||||
"sha256": "4810c6c105e59afdeb3679f2ffe8ec160be4d5eddefcc24f3fe3427dc8cc55e1"
|
||||
}
|
||||
},
|
||||
"stand": {
|
||||
"postgres": {
|
||||
"image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722",
|
||||
"version": "18.6 (Debian 18.6-1.pgdg13+2)",
|
||||
"settings": {
|
||||
"checkpoint_timeout": "5min",
|
||||
"fsync": "on",
|
||||
"jit": "on",
|
||||
"max_connections": "100",
|
||||
"max_wal_size": "1GB",
|
||||
"password_encryption": "scram-sha-256",
|
||||
"shared_buffers": "128MB",
|
||||
"synchronous_commit": "on",
|
||||
"wal_level": "replica"
|
||||
}
|
||||
},
|
||||
"valkey": {
|
||||
"image": "valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd",
|
||||
"version": "9.1.2"
|
||||
},
|
||||
"haproxy": {
|
||||
"image": "haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26"
|
||||
},
|
||||
"limits": {
|
||||
"api": {
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 536870912,
|
||||
"memory_swap": 536870912,
|
||||
"published_ports": {}
|
||||
},
|
||||
"postgres": {
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 805306368,
|
||||
"memory_swap": 805306368,
|
||||
"published_ports": {}
|
||||
},
|
||||
"valkey": {
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 134217728,
|
||||
"memory_swap": 134217728,
|
||||
"published_ports": {}
|
||||
},
|
||||
"haproxy": {
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"memory_swap": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
"s3": {
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 536870912,
|
||||
"memory_swap": 536870912,
|
||||
"published_ports": {}
|
||||
},
|
||||
"rabbitmq": {
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 536870912,
|
||||
"memory_swap": 536870912,
|
||||
"published_ports": {}
|
||||
},
|
||||
"relay": {
|
||||
"nano_cpus": 250000000,
|
||||
"memory": 201326592,
|
||||
"memory_swap": 201326592,
|
||||
"published_ports": {}
|
||||
},
|
||||
"worker": {
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 805306368,
|
||||
"memory_swap": 805306368,
|
||||
"published_ports": {}
|
||||
}
|
||||
},
|
||||
"api_replicas": 2,
|
||||
"app_env": {
|
||||
"APP_HOST": "0.0.0.0",
|
||||
"APP_PORT": "8080",
|
||||
"CACHE_HOST": "valkey",
|
||||
"CACHE_PORT": "6379",
|
||||
"DB_HOST": "postgres",
|
||||
"DB_NAME": "bench",
|
||||
"DB_PORT": "5432",
|
||||
"DB_USER": "bench",
|
||||
"IDEMPOTENCY_TTL_SECONDS": "86400",
|
||||
"LOG_LEVEL": "INFO",
|
||||
"MALLOC_MMAP_THRESHOLD_": "131072",
|
||||
"S3_BUCKET": "bench",
|
||||
"S3_ENDPOINT": "http://s3:8333",
|
||||
"SESSION_TTL_SECONDS": "21600",
|
||||
"SHUTDOWN_TIMEOUT": "5",
|
||||
"UPLOAD_MAX_UNFINISHED": "0"
|
||||
},
|
||||
"api_tcp_rmem": "4096 131072 524288",
|
||||
"s3": {
|
||||
"image": "chrislusf/seaweedfs:4.48@sha256:4e61d15fd35994cb1e43e1e553dff106794841fd9a99ade2fc8c8bfce4d7872d",
|
||||
"command": [
|
||||
"server",
|
||||
"-ip=127.0.0.1",
|
||||
"-ip.bind=127.0.0.1",
|
||||
"-master.telemetry=false",
|
||||
"-master.electionTimeout=1s",
|
||||
"-volume.preStopSeconds=0",
|
||||
"-filer",
|
||||
"-s3",
|
||||
"-s3.ip.bind=0.0.0.0",
|
||||
"-s3.port=8333",
|
||||
"-s3.port.iceberg=0",
|
||||
"-s3.port.lance=0",
|
||||
"-s3.iam=false",
|
||||
"-s3.concurrentUploadLimitMB=64"
|
||||
]
|
||||
},
|
||||
"rabbitmq": {
|
||||
"image": "rabbitmq:4.3.7-alpine@sha256:b1f997f74103d08fc1f20a13890dc44fe6cfa51d528cf521b480ada988d3ffa5",
|
||||
"version": "4.3.7"
|
||||
}
|
||||
},
|
||||
"aborted": "KeyboardInterrupt: ",
|
||||
"finished": "2026-11-16T10:41:53Z",
|
||||
"duration_s": 462.3,
|
||||
"host_state_end": {
|
||||
"slept_seconds": 0.0,
|
||||
"swapouts_start": 2932993,
|
||||
"swapouts_end": 2950029,
|
||||
"power_end": "AC Power",
|
||||
"swapouts_delta": 17036
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,324 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794825318.891,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4388.0,
|
||||
"otelcol_exporter_sent_spans": 330.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 315.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 4718.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 17.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 17.0,
|
||||
"otelcol_processor_incoming_items": 15591.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4627.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 10964.0,
|
||||
"otelcol_processor_outgoing_items": 15591.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 8468.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 2117.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 4010.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 960.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 40.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 8468.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 1673.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 1694.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 968.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 121.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 3678.0,
|
||||
"otelcol_receiver_accepted_log_records": 4627.0,
|
||||
"otelcol_receiver_accepted_spans": 10964.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 83516.0,
|
||||
"tempo_distributor_ingress_bytes_total": 83516.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 78.0,
|
||||
"tempo_distributor_push_bytes_sum": 83516.0,
|
||||
"tempo_distributor_push_bytes_count": 6.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 72.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.0037037510000000004,
|
||||
"tempo_distributor_push_duration_seconds_count": 6.0,
|
||||
"tempo_distributor_received_traces_total": 121.0,
|
||||
"tempo_distributor_spans_received_total": 330.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 44.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 121.0,
|
||||
"tempo_distributor_traces_per_batch_count": 6.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1197088.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 11.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 5991.0,
|
||||
"loki_distributor_lines_received_total": 4388.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 845550.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 32.0,
|
||||
"prometheus_tsdb_head_chunks": 135.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 135.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794825318799.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794825318.0,
|
||||
"prometheus_tsdb_head_min_time": 1794825288801.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794825288.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 225.0,
|
||||
"prometheus_tsdb_head_series": 135.0,
|
||||
"prometheus_tsdb_head_series_created_total": 135.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794825408.893,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26166.0,
|
||||
"otelcol_exporter_sent_metric_points": 156.0,
|
||||
"otelcol_exporter_sent_spans": 3113.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2109.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 29435.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 113.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 113.0,
|
||||
"otelcol_processor_incoming_items": 89311.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26408.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 156.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 62747.0,
|
||||
"otelcol_processor_outgoing_items": 89311.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 84160.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 21040.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 22932.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 3120.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 130.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 84160.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 16706.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 234220.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 422735.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 17932.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4985.0,
|
||||
"otelcol_receiver_accepted_log_records": 26408.0,
|
||||
"otelcol_receiver_accepted_metric_points": 156.0,
|
||||
"otelcol_receiver_accepted_spans": 62747.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 783448.0,
|
||||
"tempo_distributor_ingress_bytes_total": 783448.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 648.0,
|
||||
"tempo_distributor_push_bytes_sum": 783448.0,
|
||||
"tempo_distributor_push_bytes_count": 51.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 612.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.013310668000000001,
|
||||
"tempo_distributor_push_duration_seconds_count": 51.0,
|
||||
"tempo_distributor_received_traces_total": 1104.0,
|
||||
"tempo_distributor_spans_received_total": 3113.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 363.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 1104.0,
|
||||
"tempo_distributor_traces_per_batch_count": 51.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7158809.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 56.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 36835.0,
|
||||
"loki_distributor_lines_received_total": 26166.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5065611.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 104.0,
|
||||
"prometheus_tsdb_head_chunks": 344.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 344.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794825408801.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794825408.0,
|
||||
"prometheus_tsdb_head_min_time": 1794825288801.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794825288.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 2273.0,
|
||||
"prometheus_tsdb_head_series": 344.0,
|
||||
"prometheus_tsdb_head_series_created_total": 344.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794825454.529,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33737.0,
|
||||
"otelcol_exporter_sent_metric_points": 260.0,
|
||||
"otelcol_exporter_sent_spans": 4409.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2865.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 38406.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 153.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 153.0,
|
||||
"otelcol_processor_incoming_items": 113993.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33737.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 260.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 79996.0,
|
||||
"otelcol_processor_outgoing_items": 113993.0,
|
||||
"otelcol_processor_tail_sampling_count_traces_sampled": 116928.0,
|
||||
"otelcol_processor_tail_sampling_global_count_traces_sampled": 29232.0,
|
||||
"otelcol_processor_tail_sampling_new_trace_id_received": 29232.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_bucket": 4224.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_sum": 6.0,
|
||||
"otelcol_processor_tail_sampling_sampling_decision_timer_latency_count": 176.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_evaluation_error": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_count": 116928.0,
|
||||
"otelcol_processor_tail_sampling_sampling_policy_execution_time_sum": 26494.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_dropped_too_early": 0.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_bucket": 318084.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_sum": 573259.0,
|
||||
"otelcol_processor_tail_sampling_sampling_trace_removal_age_count": 24348.0,
|
||||
"otelcol_processor_tail_sampling_sampling_traces_on_memory": 4884.0,
|
||||
"otelcol_receiver_accepted_log_records": 33737.0,
|
||||
"otelcol_receiver_accepted_metric_points": 260.0,
|
||||
"otelcol_receiver_accepted_spans": 79996.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1109242.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1109242.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 901.0,
|
||||
"tempo_distributor_push_bytes_sum": 1109242.0,
|
||||
"tempo_distributor_push_bytes_count": 71.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 852.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.018717001,
|
||||
"tempo_distributor_push_duration_seconds_count": 71.0,
|
||||
"tempo_distributor_received_traces_total": 1560.0,
|
||||
"tempo_distributor_spans_received_total": 4409.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 504.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 1560.0,
|
||||
"tempo_distributor_traces_per_batch_count": 71.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9235153.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 72.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 44582.0,
|
||||
"loki_distributor_lines_received_total": 33737.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6536235.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 140.0,
|
||||
"prometheus_tsdb_head_chunks": 345.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 345.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794825453801.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794825453.0,
|
||||
"prometheus_tsdb_head_min_time": 1794825288801.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794825288.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 3306.0,
|
||||
"prometheus_tsdb_head_series": 345.0,
|
||||
"prometheus_tsdb_head_series_created_total": 345.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,287 @@
|
||||
{
|
||||
"clean_start": {
|
||||
"ts": 1794825516.432,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 4383.0,
|
||||
"otelcol_exporter_sent_metric_points": 139.0,
|
||||
"otelcol_exporter_sent_spans": 930.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 495.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 5452.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 26.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 26.0,
|
||||
"otelcol_processor_incoming_items": 5752.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 4623.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 139.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 990.0,
|
||||
"otelcol_processor_outgoing_items": 5752.0,
|
||||
"otelcol_receiver_accepted_log_records": 4623.0,
|
||||
"otelcol_receiver_accepted_metric_points": 139.0,
|
||||
"otelcol_receiver_accepted_spans": 990.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 183345.0,
|
||||
"tempo_distributor_ingress_bytes_total": 183345.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 109.0,
|
||||
"tempo_distributor_push_bytes_sum": 183345.0,
|
||||
"tempo_distributor_push_bytes_count": 9.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 107.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.008294168000000001,
|
||||
"tempo_distributor_push_duration_seconds_count": 9.0,
|
||||
"tempo_distributor_received_traces_total": 344.0,
|
||||
"tempo_distributor_spans_received_total": 930.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 56.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 344.0,
|
||||
"tempo_distributor_traces_per_batch_count": 9.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 1194822.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 12.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 9118.0,
|
||||
"loki_distributor_lines_received_total": 4383.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 844119.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 26.0,
|
||||
"prometheus_tsdb_head_chunks": 3494.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3494.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794825515917.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794825515.0,
|
||||
"prometheus_tsdb_head_min_time": 1794825483455.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794825483.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 6557.0,
|
||||
"prometheus_tsdb_head_series": 3494.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3494.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"clean_end": {
|
||||
"ts": 1794825606.449,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 26140.0,
|
||||
"otelcol_exporter_sent_metric_points": 451.0,
|
||||
"otelcol_exporter_sent_spans": 6191.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 2334.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 32782.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 128.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 128.0,
|
||||
"otelcol_processor_incoming_items": 33063.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 26380.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 451.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 6232.0,
|
||||
"otelcol_processor_outgoing_items": 33063.0,
|
||||
"otelcol_receiver_accepted_log_records": 26380.0,
|
||||
"otelcol_receiver_accepted_metric_points": 451.0,
|
||||
"otelcol_receiver_accepted_spans": 6232.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1215896.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1215896.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 649.0,
|
||||
"tempo_distributor_push_bytes_sum": 1215896.0,
|
||||
"tempo_distributor_push_bytes_count": 54.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 647.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.024996048000000003,
|
||||
"tempo_distributor_push_duration_seconds_count": 54.0,
|
||||
"tempo_distributor_received_traces_total": 2278.0,
|
||||
"tempo_distributor_spans_received_total": 6191.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 326.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2278.0,
|
||||
"tempo_distributor_traces_per_batch_count": 54.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 7150849.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 57.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 30588.0,
|
||||
"loki_distributor_lines_received_total": 26140.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 5060137.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 98.0,
|
||||
"prometheus_tsdb_head_chunks": 3540.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3540.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794825605917.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794825605.0,
|
||||
"prometheus_tsdb_head_min_time": 1794825483455.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794825483.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 27795.0,
|
||||
"prometheus_tsdb_head_series": 3540.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3540.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
},
|
||||
"end": {
|
||||
"ts": 1794825652.128,
|
||||
"collector": {
|
||||
"otelcol_exporter_in_flight_requests": 0.0,
|
||||
"otelcol_exporter_queue_capacity": 40000.0,
|
||||
"otelcol_exporter_queue_size": 0.0,
|
||||
"otelcol_exporter_sent_log_records": 33747.0,
|
||||
"otelcol_exporter_sent_metric_points": 607.0,
|
||||
"otelcol_exporter_sent_spans": 8105.0,
|
||||
"otelcol_processor_batch_batch_send_size_bucket": 3047.0,
|
||||
"otelcol_processor_batch_batch_send_size_sum": 42459.0,
|
||||
"otelcol_processor_batch_batch_send_size_count": 167.0,
|
||||
"otelcol_processor_batch_metadata_cardinality": 3.0,
|
||||
"otelcol_processor_batch_timeout_trigger_send": 167.0,
|
||||
"otelcol_processor_incoming_items": 42459.0,
|
||||
"otelcol_processor_memory_limiter_accepted_log_records": 33747.0,
|
||||
"otelcol_processor_memory_limiter_accepted_metric_points": 607.0,
|
||||
"otelcol_processor_memory_limiter_accepted_spans": 8105.0,
|
||||
"otelcol_processor_outgoing_items": 42459.0,
|
||||
"otelcol_receiver_accepted_log_records": 33747.0,
|
||||
"otelcol_receiver_accepted_metric_points": 607.0,
|
||||
"otelcol_receiver_accepted_spans": 8105.0,
|
||||
"otelcol_receiver_failed_log_records": 0.0,
|
||||
"otelcol_receiver_failed_metric_points": 0.0,
|
||||
"otelcol_receiver_failed_spans": 0.0,
|
||||
"otelcol_receiver_refused_log_records": 0.0,
|
||||
"otelcol_receiver_refused_metric_points": 0.0,
|
||||
"otelcol_receiver_refused_spans": 0.0
|
||||
},
|
||||
"tempo": {
|
||||
"tempo_distributor_bytes_received_total": 1591742.0,
|
||||
"tempo_distributor_ingress_bytes_total": 1591742.0,
|
||||
"tempo_distributor_kafka_records_per_request_bucket": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_sum": 0.0,
|
||||
"tempo_distributor_kafka_records_per_request_count": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_bucket": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_sum": 0.0,
|
||||
"tempo_distributor_kafka_write_latency_seconds_count": 0.0,
|
||||
"tempo_distributor_push_bytes_bucket": 841.0,
|
||||
"tempo_distributor_push_bytes_sum": 1591742.0,
|
||||
"tempo_distributor_push_bytes_count": 70.0,
|
||||
"tempo_distributor_push_duration_seconds_bucket": 839.0,
|
||||
"tempo_distributor_push_duration_seconds_sum": 0.03301696500000001,
|
||||
"tempo_distributor_push_duration_seconds_count": 70.0,
|
||||
"tempo_distributor_received_traces_total": 2978.0,
|
||||
"tempo_distributor_spans_received_total": 8105.0,
|
||||
"tempo_distributor_traces_per_batch_bucket": 422.0,
|
||||
"tempo_distributor_traces_per_batch_sum": 2978.0,
|
||||
"tempo_distributor_traces_per_batch_count": 70.0
|
||||
},
|
||||
"loki": {
|
||||
"loki_distributor_bytes_received_total": 9236939.0,
|
||||
"loki_distributor_inflight_bytes": 0.0,
|
||||
"loki_distributor_ingester_appends_total": 74.0,
|
||||
"loki_distributor_ingester_clients": 2.0,
|
||||
"loki_distributor_kafka_latency_seconds_bucket": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_sum": 0.0,
|
||||
"loki_distributor_kafka_latency_seconds_count": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_bucket": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_sum": 0.0,
|
||||
"loki_distributor_kafka_records_per_write_request_count": 0.0,
|
||||
"loki_distributor_kafka_sent_bytes_total": 0.0,
|
||||
"loki_distributor_lag_ms_total": 38152.0,
|
||||
"loki_distributor_lines_received_total": 33747.0,
|
||||
"loki_distributor_replication_factor": 1.0,
|
||||
"loki_distributor_structured_metadata_bytes_received_total": 6537751.0
|
||||
},
|
||||
"prometheus": {
|
||||
"prometheus_tsdb_head_active_appenders": 0.0,
|
||||
"prometheus_tsdb_head_appenders_created_total": 135.0,
|
||||
"prometheus_tsdb_head_chunks": 3583.0,
|
||||
"prometheus_tsdb_head_chunks_created_total": 3583.0,
|
||||
"prometheus_tsdb_head_chunks_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_chunks_storage_size_bytes": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_sum": 0.0,
|
||||
"prometheus_tsdb_head_gc_duration_seconds_count": 0.0,
|
||||
"prometheus_tsdb_head_max_time": 1794825651850.0,
|
||||
"prometheus_tsdb_head_max_time_seconds": 1794825651.0,
|
||||
"prometheus_tsdb_head_min_time": 1794825483455.0,
|
||||
"prometheus_tsdb_head_min_time_seconds": 1794825483.0,
|
||||
"prometheus_tsdb_head_native_histogram_buckets": 0.0,
|
||||
"prometheus_tsdb_head_native_histogram_series": 0.0,
|
||||
"prometheus_tsdb_head_out_of_order_samples_appended_total": 0.0,
|
||||
"prometheus_tsdb_head_samples_appended_total": 39323.0,
|
||||
"prometheus_tsdb_head_series": 3583.0,
|
||||
"prometheus_tsdb_head_series_created_total": 3583.0,
|
||||
"prometheus_tsdb_head_series_not_found_total": 0.0,
|
||||
"prometheus_tsdb_head_series_pending_commit_underflow_total": 0.0,
|
||||
"prometheus_tsdb_head_series_removed_total": 0.0,
|
||||
"prometheus_tsdb_head_stale_series": 0.0,
|
||||
"prometheus_tsdb_head_truncations_failed_total": 0.0,
|
||||
"prometheus_tsdb_head_truncations_total": 0.0
|
||||
},
|
||||
"prom_relabel": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
run,variant,repeat,order,clean_s,light_rps,light_p50_ms,light_p95_ms,light_p99_ms,light_unexpected,dropped,api_cores,api_cpu_ms_per_req,worker_cores,relay_cores,collector_cores,prometheus_cores,loki_cores,tempo_cores,telemetry_cores,api_peak_mib,worker_peak_mib,relay_peak_mib,collector_peak_mib,prometheus_peak_mib,loki_peak_mib,tempo_peak_mib,spans_in_per_s,spans_out_per_s,tempo_spans_per_s,tempo_bytes_per_s,loki_lines_per_s,loki_bytes_per_s,points_in_per_s,prom_series,prom_samples_per_s,collector_lost,dropped_too_early,sdk_warnings,span_gap,broken_n,broken_kept,slow_n,slow_kept,slow_mid_n,slow_mid_kept,bad_n,bad_kept,upload_n,upload_kept,me_n,me_kept,logs_share,log_to_trace_n,log_to_trace_kept,uploads_ready,bad_failed,uploads_other,ttr_p50_s,ttr_p95_s,locks,flags
|
||||
balanced-r1,balanced,1,1,90.0,200.0,3.2,5.8,7.4,0,0,0.4067,1.9478,0.0898,0.005,0.0053,0.0022,0.0072,0.0038,0.0185,167.9,121.2,77.2,78.3,54.5,146.7,304.3,575.354,30.922,30.922,7776.849,241.972,66239.873,1.733,345.0,22.755,0,0,0,0.0,28,28,33,33,22,22,14,14,70,0,60,3,1.0,75,75,70,14,0,0.454,0.646,3,
|
||||
head-r1,head,1,2,90.0,200.0,3.3,6.5,8.0,0,0,0.3953,1.8932,0.0912,0.0052,0.0041,0.0026,0.0079,0.0048,0.0194,167.5,108.7,77.4,63.5,52.5,142.5,358.2,58.233,58.445,58.445,11470.622,241.699,66165.58,3.466,3583.0,235.933,0,0,0,0.0,28,1,33,5,23,5,14,2,70,6,60,6,1.0,75,8,70,14,0,0.41,0.637,3,
|
||||
|
@@ -0,0 +1,66 @@
|
||||
# Цена наблюдаемости: метка `baseline`
|
||||
|
||||
- Статус: **прерван: KeyboardInterrupt: **; прогонов 2 из 15
|
||||
- Код (`src_sha256` образа): `81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a`
|
||||
- Профиль `telemetry`: варианты off, full, head, tail, balanced × 3 повтора кругами; окна — разогрев 20 с, чистое 90 с (цена), отказы 30 с (блокировка `messages` на 0.6 с в моменты 5, 15, 25 с окна)
|
||||
- Нагрузка (открытая, запросов/с): read 100, write 30, me 40, chat 30, download 8, upload 0.5, bad 0.1, broken 0.2
|
||||
- Варианты: `off` — SDK выключен, сервисов телеметрии нет; `full` — как рабочий стенд: все трассы, 15 с, default; `head` — доля корней 0,1 в SDK; `tail` — Collector: ошибки, трасса ≥ 500 мс, 10 % остальных; `balanced` — Collector: ошибки, исход задания, server span ≥ 250 мс, 5 %; метрики 30 с, coarse, отбор рядов хранилищ
|
||||
- Источники: задержки — журнал генератора (от момента по расписанию); CPU — сэмплер cgroup за чистое окно, CPU реплик на запрос — по всем ответам окна; пики — `memory.peak` контейнеров прогона; приём и потери — собственные метрики Collector, Tempo, Loki, Prometheus по краям чистого окна и в конце; сохранённые трассы — запись доступа в Loki по `X-Request-Id` и её trace_id в Tempo. Значения — медиана (min–max) повторов
|
||||
|
||||
## Задержки и CPU (чистое окно)
|
||||
|
||||
| Вариант | p50 лёгких, мс | p95, мс | p99, мс | CPU реплик, ядер | CPU на запрос, мс | к off | worker, ядер | телеметрия, ядер | пик Collector, МиБ | пик Tempo, МиБ | пик реплики, МиБ |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `head` | 3.30 | 6.50 | 8.00 | 0.395 | 1.893 | — | 0.091 | 0.019 | 64 | 358 | 168 |
|
||||
| `balanced` | 3.20 | 5.80 | 7.40 | 0.407 | 1.948 | — | 0.090 | 0.018 | 78 | 304 | 168 |
|
||||
|
||||
## p95 по классам, мс (чистое окно; `write` — и окно отказов)
|
||||
|
||||
| Вариант | read | write | me | chat | download | upload | bad | broken | write (отказы) |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `head` | 6.4 | 7.6 | 3.4 | 4.5 | 8.9 | 22.0 | 12.8 | 6.8 | 109.2 |
|
||||
| `balanced` | 5.8 | 6.9 | 3.1 | 3.9 | 8.3 | 21.4 | 11.3 | 6.7 | 111.4 |
|
||||
|
||||
## Приём (чистое окно) и пересчёт на сутки
|
||||
|
||||
| Вариант | span в Collector, /с | span в Tempo, /с | Tempo, КиБ/с | Tempo, ГиБ/сутки | строк Loki, /с | Loki, КиБ/с | Loki, ГиБ/сутки | точек метрик в Collector, /с | рядов Prometheus | отсчётов/с |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `head` | 58.2 | 58.4 | 11.2 | 0.92 | 241.7 | 64.6 | 5.32 | 3.5 | 3583 | 235.9 |
|
||||
| `balanced` | 575.4 | 30.9 | 7.6 | 0.63 | 242.0 | 64.7 | 5.33 | 1.7 | 345 | 22.8 |
|
||||
|
||||
## Что сохраняет вариант (сумма повторов) и потери
|
||||
|
||||
| Вариант | 500: трасс | медленные записи (≥ 250 мс на сервере) | из них 250–500 мс | failed: цепочек | загрузки: цепочек | `me`: трасс | записи журнала | запись → трасса (редкие) | потери Collector / до решения / SDK | Collector → Tempo, расхождение |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| `head` | 1/28 | 5/33 | 5/23 | 2/14 | 6/70 | 6/60 | 100% | 8/75 | 0 / 0 / 0 | 0.00 % |
|
||||
| `balanced` | 28/28 | 33/33 | 22/22 | 14/14 | 0/70 | 3/60 | 100% | 75/75 | 0 / 0 / 0 | 0.00 % |
|
||||
|
||||
## Загрузки
|
||||
|
||||
| Вариант | ready | failed (`bad`) | время до ready p50 / p95, с |
|
||||
|---|---:|---:|---:|
|
||||
| `head` | 70 | 14 | 0.41 / 0.64 |
|
||||
| `balanced` | 70 | 14 | 0.45 / 0.65 |
|
||||
|
||||
## Гипотезы и критерии balanced
|
||||
|
||||
Тексты и пороги — `REPORT.md`, «Трек 1. Цена наблюдаемости» (записаны до замеров). Эффект — |Δ медиан| больше размаха повторов `full` и разбросы не пересекаются; доли редких событий — по сумме повторов, интервал Уилсона 95 %.
|
||||
|
||||
| | Итог | Числа |
|
||||
|---|---|---|
|
||||
| T1 | нет данных | нужны off и full, ≥ 2 повтора full |
|
||||
| T2 | нет данных | нужны off, full и head с редкими событиями |
|
||||
| T3 | нет данных | нужны tail и full, медленные записи 250–500 мс |
|
||||
| T4 | нет данных | нужны balanced и full |
|
||||
| T5 | нет данных | нужны full, head и balanced с редкими событиями |
|
||||
| T6 | подтверждена | потери Collector 0, отброшено до решения 0, строк SDK о потерях 0; Collector → Tempo наибольшее расхождение 0.00 % |
|
||||
| T7 | нет данных | нужен full |
|
||||
| S1 | выполнен | трассы 500 28/28, медленных записей 33/33, цепочки failed 14/14 |
|
||||
| S2 | нет данных | нужны full и tail |
|
||||
| S3 | выполнен | потерь 0; пик Collector 78.3 МиБ (предел 154 из 256) |
|
||||
| S4 | нет данных | нужны full, off и ≥ 2 повтора full |
|
||||
| S5 | выполнен | запись журнала → трасса у 500, медленных и failed: 75/75 |
|
||||
|
||||
## Предупреждения о хосте
|
||||
|
||||
- host swapped out 17036 pages during the run
|
||||
@@ -0,0 +1,43 @@
|
||||
# Доказывает (уровни 3–4): стек наблюдаемости работает на рабочем стенде —
|
||||
# Grafana с тремя источниками и dashboard (26 панелей); у контрольного
|
||||
# запроса одна трасса в Tempo, запись в Loki и строка stdout с тем же
|
||||
# trace_id; трасса загрузки доходит до worker (consumer span, outcome ready);
|
||||
# метрики API, worker, relay, resource attributes; метки без id, URL и имён
|
||||
# файлов; в телеметрии нет пароля, токена, текста сообщения, filename.
|
||||
# Дата: 2026-11-15, 22:21 UTC.
|
||||
# Окружение: macOS 26.7.1, Docker 29.9.2, Compose 5.6.1, Python хоста 3.11.9.
|
||||
# Стенд: рабочий (make up); LB 127.0.0.1:8180, Grafana 127.0.0.1:3180.
|
||||
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Повторить: make up && make telemetry-check
|
||||
|
||||
$ make telemetry-check
|
||||
python3 scripts/lab6.py telemetry-check --base-url "http://localhost:8180"
|
||||
PASS grafana /api/health: status 200
|
||||
PASS datasources provisioned: ['logs', 'metrics', 'traces']
|
||||
PASS dashboard messenger-lab6 provisioned: status 200, panels 26
|
||||
PASS controlled request GET /api/v1/users/me: status 200, X-Request-Id tcheck-7eaa7b98-me
|
||||
PASS upload accepted: status 202
|
||||
PASS attachment ready: ready
|
||||
PASS message with attachment: status 201
|
||||
PASS API trace found by request id: 60e5d0f213673aa90c8f6f69e4dcd077
|
||||
PASS server span with route template: 2 spans: GET /api/v1/users/me, postgresql read
|
||||
PASS no spans from FastAPI native telemetry: []
|
||||
PASS API log record in Loki with the same trace_id: GET /api/v1/users/me -> 200 (1.2 ms)
|
||||
PASS API stdout line carries the same trace_id: 2026-11-15T22:21:42.677Z INFO src.http [rid=tcheck-7eaa7b98-me] GET /api/v1/users/me -> 200 (1.2 ms) trace_id=60e5d0f2...
|
||||
PASS upload trace has PostgreSQL and S3 child spans: POST /api/v1/chats/{chat_id}/attachments, S3 get_object, S3 put_object, postgresql read, postgresql transaction, process messenger.attachment-jobs
|
||||
PASS worker consumer span with outcome ready: ... process messenger.attachment-jobs, publi...
|
||||
PASS worker log 'attachment processed' with the job trace_id: attachment processed attachment_id=b28e18e8-... job_id=a1b6e40c-... trace_id=...
|
||||
PASS HTTP duration histogram (API): count 3
|
||||
PASS job duration histogram (worker, ready): count 2
|
||||
PASS relay published counter: 2
|
||||
PASS resource attributes (target_info): messenger-api@0.6.0/lab, messenger-relay@0.6.0/lab, messenger-worker@0.6.0/lab
|
||||
PASS HTTP histogram has a single source: rate 0
|
||||
PASS metric labels without ids, raw URLs and filenames: 35 series
|
||||
PASS no password, token, message text, filename or Authorization in telemetry: 84 log records, 63821 bytes of traces
|
||||
telemetry-check: PASS (22/22 checks)
|
||||
|
||||
# Итог: 22/22. Пара «трасса — запись журнала» у контрольного запроса:
|
||||
# trace_id 60e5d0f2… в Tempo, в Loki и в stdout API (1 пара запрос → трасса →
|
||||
# лог); у загрузки — трасса с PostgreSQL, S3 и consumer span worker и строка
|
||||
# worker `attachment processed` с trace_id задания (вторая пара). Утечек
|
||||
# секретов и текстов в 84 записях журнала и 63 821 байте трасс нет.
|
||||
@@ -0,0 +1,25 @@
|
||||
# Доказывает (уровень 4, телеметрия не ломает приложение): Tempo остановлен
|
||||
# на 120 с под нагрузкой — API отвечает, загрузки принимаются и доходят до
|
||||
# ready, память Collector ограничена очередью экспорта (20000 элементов),
|
||||
# потери span считает сам Collector, после возврата Tempo экспорт
|
||||
# возобновляется и очередь опустошается.
|
||||
# Дата: 2026-11-15, 22:40 UTC; длительность 146 с.
|
||||
# Окружение: macOS 26.7.1, Docker 29.9.2, Compose 5.6.1, Python хоста 3.11.9.
|
||||
# Стенд: рабочий (make up); LB 127.0.0.1:8180.
|
||||
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Повторить: make up && make telemetry-outage [OUTAGE_SECONDS=120]
|
||||
|
||||
$ make telemetry-outage
|
||||
python3 scripts/lab6.py telemetry-outage --base-url "http://localhost:8180" --seconds 120
|
||||
before: collector 58 MiB, spans lost so far 0
|
||||
PASS API answers during 120 s without Tempo: GET /users/me statuses {200: 1178}
|
||||
PASS uploads accepted and processed without Tempo: 11 uploads, ready 11
|
||||
PASS Collector memory bounded: peak 63 MiB of 256 MiB limit; export queue peak 2060 of 20000 items
|
||||
PASS lost spans are counted by the Collector: 128 spans (send_failed + enqueue_failed, otlp_http/tempo)
|
||||
PASS Tempo back: export resumes, queue drained: queue now 37 items
|
||||
telemetry-outage: PASS (5/5 checks, 146 s)
|
||||
|
||||
# Итог: 5/5. За 120 с без Tempo: 1178 ответов 200, 11 из 11 загрузок ready,
|
||||
# пик Collector 63 МиБ из 256, очередь экспорта пик 2060 из 20000, потеряно
|
||||
# 128 span (учтены метрикой Collector), после возврата Tempo очередь 37.
|
||||
# Потери SDK (до Collector) метрикой не считаются — KNOWN_ISSUES.md.
|
||||
@@ -0,0 +1,196 @@
|
||||
# Доказывает: готовность уровней 3–4, диагностика двух отказов по реальным
|
||||
# трассам/логам, retry и ограниченное поведение при недоступном Tempo.
|
||||
# Дата UTC: 2026-11-20; ОС macOS 26.6.2 arm64, Docker 28.0.4,
|
||||
# Compose 5.6.1; Python хоста и окружения проверок 3.13.7.
|
||||
# Стенд: рабочий проект vladimirceva-lab6, LB 127.0.0.1:8080;
|
||||
# перед началом других работающих контейнеров не было.
|
||||
# Код приложения: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Подготовка: sh tools/docker-compat/setup.sh;
|
||||
# export PATH="$PWD/tools/docker-compat:$PATH"; make up.
|
||||
# Здесь явно разделены два запуска: первый — smoke/telemetry/promtool,
|
||||
# второй — подтверждённый audit-incidents, trace-chain и telemetry-outage.
|
||||
# Первая версия нового аудиторского скрипта ошибочно сравнивала строковый
|
||||
# intValue из JSON Tempo с числом: audit-incidents FAIL (4/7), при этом
|
||||
# alerts-check PASS (6/6). Разбор типа исправлен, приложение не менялось;
|
||||
# ниже приведён повтор с audit-incidents PASS (7/7). Первый журнал сохранён
|
||||
# в /private/tmp/lab6-submission-audit-20261120.log.
|
||||
# Пробелы в конце строк вывода удалены; значения и порядок строк сохранены.
|
||||
# ... строки сборки/старта/остановки контейнеров опущены. Технические ID
|
||||
# относятся только к синтетическим данным. Секреты/пароли/токены не выводились.
|
||||
|
||||
$ make test
|
||||
$ make telemetry-check
|
||||
$ make alerts-test
|
||||
python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
|
||||
python3 scripts/lab6.py telemetry-check --base-url "http://localhost:8080"
|
||||
PASS grafana /api/health: status 200
|
||||
PASS datasources provisioned: ['logs', 'metrics', 'traces']
|
||||
PASS dashboard messenger-lab6 provisioned: status 200, panels 26
|
||||
PASS controlled request GET /api/v1/users/me: status 200, X-Request-Id tcheck-3cffbfdd-me
|
||||
PASS upload accepted: status 202
|
||||
PASS attachment ready: ready
|
||||
PASS message with attachment: status 201
|
||||
PASS API trace found by request id: caf39580633effcd01941f9f45654c5a
|
||||
PASS server span with route template: 2 spans: GET /api/v1/users/me, postgresql read
|
||||
PASS no spans from FastAPI native telemetry: []
|
||||
PASS API log record in Loki with the same trace_id: GET /api/v1/users/me -> 200 (1.0 ms)
|
||||
PASS API stdout line carries the same trace_id: 2026-11-20T11:13:01.414Z INFO src.http [rid=tcheck-3cffbfdd-me] GET /api/v1/users/me -> 200 (1.0 ms) trace_id=caf39580633effcd01941f9f456
|
||||
PASS upload trace has PostgreSQL and S3 child spans: POST /api/v1/chats/{chat_id}/attachments, S3 get_object, S3 put_object, postgresql read, postgresql transaction, process messenger.attachment-jobs, publish messenger.attachment-jobs, render variants
|
||||
PASS worker consumer span with outcome ready: POST /api/v1/chats/{chat_id}/attachments, S3 get_object, S3 put_object, postgresql read, postgresql transaction, process messenger.attachment-jobs, publish messenger.attachment-jobs, render variants
|
||||
PASS worker log 'attachment processed' with the job trace_id: attachment processed attachment_id=a892c56a-af35-4441-a509-702c4045deac job_id=1b115b67-2e4a-4cec-af
|
||||
PASS HTTP duration histogram (API): count 3
|
||||
PASS job duration histogram (worker, ready): count 2
|
||||
PASS relay published counter: 2
|
||||
PASS resource attributes (target_info): messenger-api@0.6.0/lab, messenger-relay@0.6.0/lab, messenger-worker@0.6.0/lab
|
||||
PASS HTTP histogram has a single source: rate 0
|
||||
PASS metric labels without ids, raw URLs and filenames: 35 series
|
||||
PASS no password, token, message text, filename or Authorization in telemetry: 84 log records, 44201 bytes of traces
|
||||
telemetry-check: PASS (22/22 checks)
|
||||
docker run --rm -v "<репозиторий>/infra/otel/prometheus:/rules:ro" -w /rules \
|
||||
--entrypoint promtool prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2 check rules rules.yml
|
||||
Checking rules.yml
|
||||
SUCCESS: 7 rules found
|
||||
|
||||
docker run --rm -v "<репозиторий>/infra/otel/prometheus:/rules:ro" -w /rules \
|
||||
--entrypoint promtool prom/prometheus:v3.15.1@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2 test rules rules.test.yml
|
||||
SUCCESS
|
||||
|
||||
# Подтверждённый повтор диагностики после исправления формата атрибута:
|
||||
$ python3 tools/audit_incidents.py
|
||||
PASS alert rules loaded in Prometheus: MessengerHighErrorRate, MessengerQueueLagGrowing, MessengerTelemetryTargetDown
|
||||
(a) worker stopped: oldest job age grows
|
||||
PASS 3 uploads accepted with worker stopped
|
||||
0 s MessengerQueueLagGrowing: inactive
|
||||
90 s MessengerQueueLagGrowing: pending
|
||||
150 s MessengerQueueLagGrowing: firing
|
||||
PASS worker stopped: producer exists, consumer absent
|
||||
DIAGNOSTIC worker stopped trace_id=5abc3f9fb065793d443f35331bf823b7
|
||||
messenger-api: POST /api/v1/chats/{chat_id}/attachments [server] 13.6 ms
|
||||
messenger-api: postgresql read [client] 0.5 ms
|
||||
messenger-api: postgresql read [client] 5.9 ms
|
||||
messenger-api: postgresql transaction [client] 0.8 ms
|
||||
messenger-api: S3 put_object [client] 2.2 ms
|
||||
messenger-api: postgresql transaction [client] 1.6 ms
|
||||
messenger-relay: publish messenger.attachment-jobs [producer] 3.6 ms attempt=1
|
||||
PASS incident log linked to trace: messenger-api
|
||||
Loki trace_id=5abc3f9fb065793d443f35331bf823b7: attachment accepted attachment_id=018c64c5-4259-4ae1-92eb-986da064bd19 chat_id=0bd78a71-9737-42ac-bca0-e115ca6f860d size=111817 content_type=image/png width=320 height=200 waited=0ms took=12ms
|
||||
Loki trace_id=5abc3f9fb065793d443f35331bf823b7: POST /api/v1/chats/0bd78a71-9737-42ac-bca0-e115ca6f860d/attachments -> 202 (13.5 ms)
|
||||
PASS MessengerQueueLagGrowing firing: after 150 s; backlog 3 jobs, oldest 144 s
|
||||
0 s MessengerQueueLagGrowing: firing
|
||||
25 s MessengerQueueLagGrowing: inactive
|
||||
PASS worker restored: same trace has ready consumer
|
||||
DIAGNOSTIC worker restored trace_id=5abc3f9fb065793d443f35331bf823b7
|
||||
messenger-api: POST /api/v1/chats/{chat_id}/attachments [server] 13.6 ms
|
||||
messenger-api: postgresql read [client] 0.5 ms
|
||||
messenger-api: postgresql read [client] 5.9 ms
|
||||
messenger-api: postgresql transaction [client] 0.8 ms
|
||||
messenger-api: S3 put_object [client] 2.2 ms
|
||||
messenger-api: postgresql transaction [client] 1.6 ms
|
||||
messenger-relay: publish messenger.attachment-jobs [producer] 3.6 ms attempt=1
|
||||
messenger-worker: process messenger.attachment-jobs [consumer] 130.3 ms attempt=1 outcome=ready
|
||||
messenger-worker: postgresql transaction [client] 1.1 ms
|
||||
messenger-worker: S3 get_object [client] 1.1 ms
|
||||
messenger-worker: render variants [client] 119.9 ms
|
||||
messenger-worker: S3 put_object [client] 2.2 ms
|
||||
messenger-worker: S3 put_object [client] 1.1 ms
|
||||
messenger-worker: S3 put_object [client] 0.9 ms
|
||||
messenger-worker: S3 put_object [client] 1.0 ms
|
||||
messenger-worker: postgresql transaction [client] 2.3 ms
|
||||
PASS incident log linked to trace: messenger-worker
|
||||
Loki trace_id=5abc3f9fb065793d443f35331bf823b7: attachment processed attachment_id=018c64c5-4259-4ae1-92eb-986da064bd19 job_id=19888d1f-5cc0-48d5-b292-628d69254cdb attempt=1 variants=3 render_peak_kib=106976 took=130ms waited=155766ms
|
||||
PASS worker started: backlog drained, alert resolved: after 25 s; backlog 3 -> 0
|
||||
phase (a): 181 s
|
||||
(b) sessions table locked: authenticated requests wait and get 503
|
||||
baseline statuses: {200: 188}
|
||||
0 s MessengerHighErrorRate: inactive
|
||||
80 s MessengerHighErrorRate: pending
|
||||
140 s MessengerHighErrorRate: firing
|
||||
PASS DB incident: real 503 trace with slow SQL span
|
||||
PASS DB span explains at least 90% of server latency: server=5006.6 ms SQL=5005.3 ms
|
||||
DIAGNOSTIC database locked trace_id=5390f80c0e4a6a0c82ef45412f1ecb43
|
||||
messenger-api: GET /api/v1/users/me [server] 5006.6 ms ERROR
|
||||
messenger-api: postgresql read [client] 5005.3 ms ERROR
|
||||
PASS incident log linked to trace: messenger-api
|
||||
Loki trace_id=5390f80c0e4a6a0c82ef45412f1ecb43: GET /api/v1/users/me -> 503 (5006.3 ms)
|
||||
Loki trace_id=5390f80c0e4a6a0c82ef45412f1ecb43: database unavailable error_type=DBAPIError error=(sqlalchemy.dialects.postgresql.asyncpg.Error) canceling statement due to statement timeout [SQL: SELECT sessions.id AS session_id, users.id, users.username, users.display_name, users.created_at FROM sessions JOIN users ON sessions.user_id = users.id WHERE sessions.token_hash = $1::BYTEA AND session
|
||||
PASS MessengerHighErrorRate firing: after 140 s; 5xx ratio 1.00, pool used 4, waiting 0; statuses {200: 4, 503: 104}
|
||||
statuses around release: {200: 152}
|
||||
0 s MessengerHighErrorRate: firing
|
||||
70 s MessengerHighErrorRate: inactive
|
||||
PASS lock released: errors stopped, alert resolved: after 70 s; statuses after release {200: 1324}
|
||||
phase (b): 229 s
|
||||
alerts-check: PASS (6/6 checks, 410 s)
|
||||
audit-incidents: PASS (7/7 checks)
|
||||
|
||||
$ make trace-chain
|
||||
python3 scripts/lab6.py trace-chain --base-url "http://localhost:8080"
|
||||
PASS upload accepted, worker stopped: status 202
|
||||
attachment_id=b5406cc0-26b9-487c-a1f3-776d9fb0f870
|
||||
PASS attempt 1 failed (S3 stopped), job back to queued: 1 queued s3_read
|
||||
PASS attachment ready on a later attempt: ready
|
||||
job: 2 ready -
|
||||
PASS one trace for the upload in Tempo: trace ids found: 1
|
||||
trace_id=2ce706fcd77da347c027ddfbf1e82d08 (Grafana → Explore → Tempo → 2ce706fcd77da347c027ddfbf1e82d08)
|
||||
messenger-api: POST /api/v1/chats/{chat_id}/attachments [server] 24.9 ms
|
||||
messenger-api: postgresql read [client] 0.7 ms
|
||||
messenger-api: postgresql read [client] 0.7 ms
|
||||
messenger-api: postgresql transaction [client] 2.8 ms
|
||||
messenger-api: S3 put_object [client] 7.6 ms
|
||||
messenger-api: postgresql transaction [client] 6.9 ms
|
||||
messenger-relay: publish messenger.attachment-jobs [producer] 2.9 ms attempt=1
|
||||
messenger-worker: process messenger.attachment-jobs [consumer] 149.9 ms attempt=1 outcome=retry
|
||||
messenger-worker: postgresql transaction [client] 15.9 ms
|
||||
messenger-worker: S3 get_object [client] 126.7 ms ERROR
|
||||
messenger-worker: postgresql transaction [client] 3.3 ms
|
||||
messenger-relay: publish messenger.attachment-jobs [producer] 2.4 ms attempt=2
|
||||
messenger-worker: process messenger.attachment-jobs [consumer] 160.0 ms attempt=2 outcome=ready
|
||||
messenger-worker: postgresql transaction [client] 14.9 ms
|
||||
messenger-worker: S3 get_object [client] 5.6 ms
|
||||
messenger-worker: render variants [client] 125.9 ms
|
||||
messenger-worker: S3 put_object [client] 3.0 ms
|
||||
messenger-worker: S3 put_object [client] 1.1 ms
|
||||
messenger-worker: S3 put_object [client] 0.8 ms
|
||||
messenger-worker: S3 put_object [client] 1.0 ms
|
||||
messenger-worker: postgresql transaction [client] 3.5 ms
|
||||
PASS root: API server span of the upload: POST /api/v1/chats/{chat_id}/attachments
|
||||
PASS relay producer spans are children of the upload span: 2 publish spans
|
||||
PASS worker consumer spans are children of the producer of the same attempt: attempts [1, 2]
|
||||
PASS attempt 1 outcome retry in the same trace: retry
|
||||
PASS ready attempt reaches S3 and PostgreSQL: S3 get_object, S3 put_object, postgresql transaction, render variants
|
||||
trace-chain: PASS (9/9 checks, 34 s)
|
||||
|
||||
$ make telemetry-outage
|
||||
python3 scripts/lab6.py telemetry-outage --base-url "http://localhost:8080" \
|
||||
--seconds 120
|
||||
before: collector 64 MiB, spans lost so far 0
|
||||
PASS API answers during 120 s without Tempo: GET /users/me statuses {200: 1230}
|
||||
PASS uploads accepted and processed without Tempo: 11 uploads, ready 11
|
||||
PASS Collector memory bounded: peak 64 MiB of 256 MiB limit; export queue peak 2110 of 20000 items
|
||||
PASS lost spans are counted by the Collector: 152 spans (send_failed + enqueue_failed, otlp_http/tempo)
|
||||
PASS Tempo back: export resumes, queue drained: queue now 0 items
|
||||
telemetry-outage: PASS (5/5 checks, 157 s)
|
||||
|
||||
# Итог: smoke PASS; telemetry-check 22/22; promtool 7 правил и SUCCESS;
|
||||
# alerts 6/6 и реальные диагностические снимки 7/7; trace-chain 9/9;
|
||||
# telemetry-outage 5/5. Сервисы восстановлены сценариями и остановлены make stop.
|
||||
|
||||
# Повтор после уточнения подписей SLO в Grafana (тот же день):
|
||||
$ make lint
|
||||
$ make check
|
||||
$ make up
|
||||
$ make telemetry-check
|
||||
$ make alerts-test
|
||||
# ... индивидуальные пункты telemetry-check и запуск/остановка контейнеров опущены.
|
||||
uv run ruff format --check .
|
||||
137 files already formatted
|
||||
uv run ruff check .
|
||||
All checks passed!
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
telemetry-check: PASS (22/22 checks)
|
||||
SUCCESS: 7 rules found
|
||||
SUCCESS
|
||||
|
||||
# Сигналы, PromQL и конфигурации измеренных вариантов совпадают с паспортом.
|
||||
# Для повторения двух инцидентов: python3 tools/audit_incidents.py после make up.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Доказывает (уровень 4, перенос контекста через очередь): загрузка вложения
|
||||
# даёт ОДНУ трассу от API через outbox, relay и RabbitMQ до worker; при
|
||||
# сбое S3 первая попытка worker (outcome=retry, S3 get_object ERROR) и
|
||||
# вторая (outcome=ready) лежат в той же трассе, каждый consumer span —
|
||||
# ребёнок producer span своей попытки (parent, не link).
|
||||
# Дата: 2026-11-15, 22:22 UTC.
|
||||
# Окружение: macOS 26.7.1, Docker 29.9.2, Compose 5.6.1, Python хоста 3.11.9.
|
||||
# Стенд: рабочий (make up); LB на 127.0.0.1:8180, Tempo — внутри сети compose.
|
||||
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
|
||||
# Повторить: make up && make trace-chain
|
||||
|
||||
$ make trace-chain
|
||||
python3 scripts/lab6.py trace-chain --base-url "http://localhost:8180"
|
||||
PASS upload accepted, worker stopped: status 202
|
||||
attachment_id=4c43f2f1-460f-4b68-a802-c2383ade1e00
|
||||
PASS attempt 1 failed (S3 stopped), job back to queued: 1 queued s3_read
|
||||
PASS attachment ready on a later attempt: ready
|
||||
job: 2 ready -
|
||||
PASS one trace for the upload in Tempo: trace ids found: 1
|
||||
trace_id=46d5f182d2a0166f605d4babd09b853b (Grafana → Explore → Tempo → 46d5f182d2a0166f605d4babd09b853b)
|
||||
messenger-api: POST /api/v1/chats/{chat_id}/attachments [server] 66.3 ms
|
||||
messenger-api: postgresql read [client] 2.7 ms
|
||||
messenger-api: postgresql read [client] 4.7 ms
|
||||
messenger-api: postgresql transaction [client] 6.4 ms
|
||||
messenger-api: S3 put_object [client] 30.0 ms
|
||||
messenger-api: postgresql transaction [client] 10.5 ms
|
||||
messenger-relay: publish messenger.attachment-jobs [producer] 10.4 ms attempt=1
|
||||
messenger-worker: process messenger.attachment-jobs [consumer] 664.4 ms attempt=1 outcome=retry
|
||||
messenger-worker: postgresql transaction [client] 20.6 ms
|
||||
messenger-worker: S3 get_object [client] 623.2 ms ERROR
|
||||
messenger-worker: postgresql transaction [client] 11.8 ms
|
||||
messenger-relay: publish messenger.attachment-jobs [producer] 3.6 ms attempt=2
|
||||
messenger-worker: process messenger.attachment-jobs [consumer] 201.2 ms attempt=2 outcome=ready
|
||||
messenger-worker: postgresql transaction [client] 18.6 ms
|
||||
messenger-worker: S3 get_object [client] 7.7 ms
|
||||
messenger-worker: render variants [client] 156.1 ms
|
||||
messenger-worker: S3 put_object [client] 4.6 ms
|
||||
messenger-worker: S3 put_object [client] 1.6 ms
|
||||
messenger-worker: S3 put_object [client] 1.4 ms
|
||||
messenger-worker: S3 put_object [client] 1.6 ms
|
||||
messenger-worker: postgresql transaction [client] 4.3 ms
|
||||
PASS root: API server span of the upload: POST /api/v1/chats/{chat_id}/attachments
|
||||
PASS relay producer spans are children of the upload span: 2 publish spans
|
||||
PASS worker consumer spans are children of the producer of the same attempt: attempts [1, 2]
|
||||
PASS attempt 1 outcome retry in the same trace: retry
|
||||
PASS ready attempt reaches S3 and PostgreSQL: S3 get_object, S3 put_object, postgresql transaction, render variants
|
||||
trace-chain: PASS (9/9 checks, 33 s)
|
||||
|
||||
# Итог: 9/9. Одна трасса (46d5f182…) содержит server span API, два producer
|
||||
# span relay (попытки 1 и 2) и два consumer span worker: попытка 1 — retry с
|
||||
# ошибкой S3, попытка 2 — ready. Контекст идёт через строку задания в
|
||||
# PostgreSQL и заголовки AMQP, не через тело сообщения.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user