Files
mtusi2026lab7/infra/otel/collector.yaml
T
HellsTomatoandCopilot 2ef0299e34
Skeleton contracts / contracts (pull_request) Canceled after 0s
Complete lab7 grade 4 implementation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-06 15:35:53 +03:00

64 lines
2.0 KiB
YAML

# OTel Collector: принимает OTLP от API и worker, ограничивает память, батчит и раскладывает сигналы
# по хранилищам. Сам ничего долго не хранит: очереди экспорта ограничены, повторы — не дольше 60 с.
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
# Первым в цепочке: при превышении лимита Collector отказывает приёмом (SDK повторит/отбросит), а не растёт в RAM.
memory_limiter:
check_interval: 1s
limit_mib: 180
spike_limit_mib: 40
batch:
send_batch_size: 1024
timeout: 2s
exporters:
otlphttp/prometheus:
endpoint: http://prometheus:9090/api/v1/otlp
sending_queue: { queue_size: 500 }
retry_on_failure: { max_elapsed_time: 60s }
otlphttp/loki:
endpoint: http://loki:3100/otlp
sending_queue: { queue_size: 500 }
retry_on_failure: { max_elapsed_time: 60s }
otlp/tempo:
endpoint: tempo:4317
tls: { insecure: true }
sending_queue: { queue_size: 500 }
retry_on_failure: { max_elapsed_time: 60s }
extensions:
health_check:
endpoint: 0.0.0.0:13133
service:
extensions: [health_check]
# Собственные метрики Collector (принято/отброшено/ошибки экспорта) — их собирает Prometheus.
telemetry:
metrics:
readers:
- pull:
exporter:
prometheus:
host: 0.0.0.0
port: 8888
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlp/tempo]
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlphttp/prometheus]
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlphttp/loki]