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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:17:25 +03:00

86 lines
4.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# bench-lean: begin
# Конфигурация Prometheus вариантов `metrics` и `balanced` профиля цены
# телеметрии (design change track1-telemetry-cost, решение 7): копия
# infra/otel/prometheus/prometheus.yml плюс размеченные блоки отбора рядов у
# целей loki, tempo и prometheus. Prometheus конфигурации не сливает, поэтому
# копия; вне строк `bench-lean` файл обязан совпадать с рабочим построчно —
# это проверяют run.py до стенда и `telemetry_cost.py --selftest`. Остаются
# ряды приёма, отказов и объёма хранения (их же читает профиль) и `up`
# (синтетический, отбор его не касается); ряды приложения и Collector — все.
# Рабочий стенд забирает все ряды (решение 5).
# bench-lean: end
# Prometheus v3.15.1 — хранилище метрик (design change otel-telemetry,
# решения 3 и 15). Метрики приложения — scrape экспортёра prometheus
# Collector (honor_labels: job = service.name, instance = service.instance.id
# из OTLP; там же метрики LB с job = haproxy), плюс собственные метрики
# Collector, Loki, Tempo и самого Prometheus: по ним видно, жив ли конвейер.
# Срок и предел объёма хранения, путь данных и время начала рядов — флаги
# команды в docker-compose.yml. Приёмников remote write и OTLP, admin API и
# lifecycle нет; порт не публикуется. Правила записи и оповещения — rules.yml
# (design change slo-alerts, решения 1, 3, 4, 9); блока alerting нет:
# доставки наружу нет, состояние firing / resolved — API правил, ряды ALERTS и
# Grafana.
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
# явно прежний текстовый список Prometheus 3 по умолчанию: флаг
# created-timestamp-zero-ingestion иначе переводит на protobuf все цели, а
# время начала нужно только экспортёру Collector (решение 6)
scrape_protocols:
- OpenMetricsText1.0.0
- OpenMetricsText0.0.1
- PrometheusText1.0.0
- PrometheusText0.0.4
rule_files:
- /etc/prometheus/rules.yml
scrape_configs:
# метрики API, worker и relay, пришедшие в Collector по OTLP, и метрики LB
# с приёмника prometheus/haproxy. Protobuf первым: время начала
# cumulative-ряда экспортёр Collector отдаёт только в нём, и Prometheus
# пишет ноль в момент старта нового процесса (решение 6)
- job_name: otel-collector-exporter
honor_labels: true
scrape_protocols:
- PrometheusProto
- OpenMetricsText1.0.0
- PrometheusText0.0.4
static_configs:
- targets: ["otel-collector:8889"]
- job_name: otel-collector
static_configs:
- targets: ["otel-collector:8888"]
- job_name: loki
static_configs:
- targets: ["loki:3100"]
# bench-lean: begin
# приём (байты, строки, структурированные метаданные), объём чанков,
# отказы записи и отброшенное
metric_relabel_configs:
- source_labels: [__name__]
action: keep
regex: loki_distributor_(bytes|lines|structured_metadata_bytes)_received_total|loki_ingester_chunk_stored_bytes_total|loki_ingester_(chunks_flush_failures|wal_disk_full_failures)_total|loki_discarded_.*
# bench-lean: end
- job_name: tempo
static_configs:
- targets: ["tempo:3200"]
# bench-lean: begin
# приём (байты, span), приём live-store, его отказы и отброшенные span
metric_relabel_configs:
- source_labels: [__name__]
action: keep
regex: tempo_distributor_(bytes|spans)_received_total|tempo_live_store_bytes_received_total|tempo_live_store_.*failed.*|tempo_discarded_spans_total
# bench-lean: end
- job_name: prometheus
static_configs:
- targets: ["127.0.0.1:9090"]
# bench-lean: begin
# ряды и отсчёты головы, отказы правил, компакций и журнала предзаписи
metric_relabel_configs:
- source_labels: [__name__]
action: keep
regex: prometheus_tsdb_head_(series|samples_appended_total)|prometheus_rule_evaluation_failures_total|prometheus_tsdb_(compactions_failed|wal_corruptions)_total
# bench-lean: end