fix: address otel-telemetry verify findings

Shutdown budget leaves room for SDK shutdown, stand-from-scratch accepts only
its throwaway project, OTLP exporters ignore proxy environment, telemetry-check
covers log/trace links, health series and worker instance id; spec deltas
match what the parser and SDK lifetime allow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 10:54:14 +03:00
co-authored by Claude Opus 5.5
parent a4497e3f32
commit 68f1e9794e
16 changed files with 486 additions and 34 deletions
+6 -1
View File
@@ -48,7 +48,12 @@ paths:
- **Закрытие со сроком** (решение 13): `shutdown()` провайдеров — в daemon-потоках
(`begin_shutdown`), ожидание не дольше срока (`wait_closed`), не `asyncio.to_thread` и не
`force_flush`: при замороженном Collector `shutdown()` ждёт до 6 с. API — после «Stopped API»,
`TELEMETRY_SHUTDOWN_TIMEOUT_SECONDS` (1 с); worker — в окне `gather` закрытия (0,5 с).
`TELEMETRY_SHUTDOWN_TIMEOUT_SECONDS` (1 с) внутри `API_STOP_BUDGET_SECONDS` (9 с) вместе с
дренажом — сочетание проверяет `Settings`; worker — в окне `gather` закрытия (0,5 с). Новый срок
в остановке — в этот бюджет, а не сверх него.
- **Отправка только в Collector:** экспортёры получают свою `requests.Session` с
`trust_env=False` (`_export_session`): прокси, `NO_PROXY` и `.netrc` окружения на неё не
действуют, как и `OTEL_*`.
- **Исход доставки** (решение 11) называет сервис (`JobDeliveryOutcome`), действие с сообщением
выводится из него; span и histogram пишет точка входа после места конкуренции, `error` — у
непредвиденного исключения.