Files
mtusi2026lab7/infra/otel/README.md
T
2026-11-22 23:33:11 +03:00

22 lines
2.0 KiB
Markdown
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.
# Наблюдаемость lab7
Реальные конфиги находятся в `infrastructure/telemetry`. API/worker/dispatcher экспортируют OTLP/HTTP через TLS gateway 4318 в Collector. Collector применяет memory limiter 192 MiB и batch, затем:
- metrics предоставляет Prometheus exporter 8889;
- traces отправляет по mTLS в Tempo через gateway 4319;
- logs отправляет по mTLS в Loki через gateway 3100.
Prometheus scrape 8888/8889 и Grafana data sources также используют отдельные mTLS client identities. Backend plaintext listeners присутствуют только на отдельных `internal: true` local networks с TLS gateway; host ports loopback. Grafana anonymous access отключён, admin password поступает через file secret.
Collector не получает HTTP Authorization/session headers и message body из instrumentation. Queue/retry ограничены: два consumers, queue 256, max elapsed retry 30 s; переполнение не превращается в неограниченный рост RAM.
```sh
docker compose logs otel-collector
docker compose ps telemetry-gateway prometheus loki tempo grafana
make test-security-grade3
make test-security-grade4
make test-telemetry-leak-grade4
```
Ожидаемые признаки: Collector `Everything is ready`, gateway backends UP; Prometheus identity проходит scrape, а missing/LB identity к data-source port отклоняется. OTLP gateway требует разные exact-CN identities `api`, `worker`, `dispatcher`: отсутствие сертификата и same-CA intruder отклоняются. Leak-тест отправляет уникальный credential probe, затем подтверждает наличие structured events и отсутствие probe, Authorization/Basic/Bearer, request body и всех локальных secret values в Loki. Alert/incident набор lab6 сохранён.