diff --git a/infra/otel/collector.yaml b/infra/otel/collector.yaml index d6e202b..29810ad 100644 --- a/infra/otel/collector.yaml +++ b/infra/otel/collector.yaml @@ -24,14 +24,34 @@ processors: action: upsert exporters: + # Явно ограничиваем retry и время ожидания, чтобы при недоступном + # бэкенде коллектор не накапливал данные и не падал. otlphttp/tempo: endpoint: http://tempo:4318 tls: insecure: true + retry_on_failure: + enabled: true + initial_interval: 1s + max_interval: 10s + max_elapsed_time: 60s + sending_queue: + enabled: true + num_consumers: 4 + queue_size: 1000 otlphttp/loki: endpoint: http://loki:3100/otlp tls: insecure: true + retry_on_failure: + enabled: true + initial_interval: 1s + max_interval: 10s + max_elapsed_time: 60s + sending_queue: + enabled: true + num_consumers: 4 + queue_size: 1000 prometheus: endpoint: 0.0.0.0:8889 resource_to_telemetry_conversion: diff --git a/student-tests/lab6_test_level4.py b/student-tests/lab6_test_level4.py index bacc923..c505091 100644 --- a/student-tests/lab6_test_level4.py +++ b/student-tests/lab6_test_level4.py @@ -482,7 +482,10 @@ def test_telemetry_backend_down(c): time.sleep(0.2) check(ok >= 5, "API unavailable while telemetry backend is down (ok=%d)" % ok) - ps = _compose_exec("otel-collector", "true") + # В образе otel/opentelemetry-collector-contrib нет coreutils `true`, + # поэтому проверяем живость штатным бинарником самого коллектора + # (тот же приём, что в healthcheck compose.yaml). + ps = _compose_exec("otel-collector", "/otelcol-contrib", "--version") check(ps.returncode == 0, "otel-collector died while backends were unavailable")