forked from mtusi2026/mtusi2026lab6
ЛР 6 — БВТ2301 — Курлова — на 5 (трек 1 «Цена наблюдаемости»)
Перенесён минимум lab5 без изменения API и добавлена наблюдаемость: - OTel SDK в API и worker: traces, metrics, logs по OTLP; W3C trace context API -> outbox -> RabbitMQ -> worker (producer/consumer spans, retry в той же трассе); - OTel Collector (memory_limiter, scrub, batch, ограниченные очереди, профиль tail sampling), Prometheus, Loki, Tempo, Grafana с provisioning, dashboard и 6 alert rules с runbooks; - проверки: наблюдаемость и приватность, инциденты A/B/C, насыщение worker, переполнение очереди exporter, эксперимент трека 1 (4 конфигурации x 3 прогона); - CI job со сборкой и запуском стенда; REPORT.md с доказательствами в evidence/.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# Track 1 "balanced" profile (COLLECTOR_PROFILE=tail): SDK keeps 100% head sampling, the collector decides per
|
||||
# whole trace after decision_wait. Keeps: every trace with an error, every trace slower than 500 ms, every trace of
|
||||
# the attachment pipeline (rare, async, valuable), and 10% of the remaining ordinary traffic.
|
||||
# Metrics are computed in the SDK BEFORE any sampling, so RPS/error rate/percentiles are unaffected.
|
||||
processors:
|
||||
tail_sampling:
|
||||
decision_wait: 10s
|
||||
num_traces: 20000
|
||||
expected_new_traces_per_sec: 200
|
||||
decision_cache:
|
||||
sampled_cache_size: 50000
|
||||
policies:
|
||||
- name: keep-errors
|
||||
type: status_code
|
||||
status_code: {status_codes: [ERROR]}
|
||||
- name: keep-slow
|
||||
type: latency
|
||||
latency: {threshold_ms: 500}
|
||||
- name: keep-async-pipeline
|
||||
type: string_attribute
|
||||
string_attribute: {key: messaging.system, values: [rabbitmq]}
|
||||
- name: baseline-10pct
|
||||
type: probabilistic
|
||||
probabilistic: {sampling_percentage: 10}
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, attributes/scrub, tail_sampling, batch]
|
||||
exporters: [otlp/tempo]
|
||||
Reference in New Issue
Block a user