Release v1.2.7: High-Concurrency Event Loop Unblocking & OTel Fixes
Release v1.2.7: High-Concurrency Event Loop Unblocking & OTel Fixes
This patch specifically targets ASGI event loop starvation under extreme concurrency (1,000+ users), resolving silent I/O blocking bottlenecks and fixing OpenTelemetry export behavior for enterprise deployments.
⚡ Performance & Telemetry Fixes
- True Asynchronous WORM Audit Logging: Refactored the core
audit_loggerto utilize a lock-freeQueueHandlerandQueueListener. SOC 2 audit logs now instantly drop into an unbounded memory queue and flush tosys.stdouton a dedicated background thread, completely decoupling disk/console I/O from the main ASGI event loop. - OpenTelemetry OTLP Exporter Override: Fixed a severe bug where
TELEMETRY_ENABLED=Truewould mistakenly instantiate aConsoleSpanExporterand block the main thread. Traces are now correctly exported asynchronously over the network via HTTP using the standardOTLPSpanExporter.
🛠️ Testing & Dependency Hardening
- Betterproto Stabilization: Pinned
betterprotodependency from the2.0.0b6beta up to the official2.0.0stable release. - Test Suite Hygiene: Quieted upstream Starlette
httpx2DeprecationWarningnoise via strictpytest.inifilter overrides. - State Leakage Fixes: Added automatic
_readyz_cache.clear()calls to thepytestconftest.pyteardown hooks to eliminatePermissionErrorstate bleeding across preflight isolation tests.
📚 Documentation
- Windows Sizing Limits: Added extensive benchmarking notes to the Enterprise Sizing Guide, establishing the absolute limit of a single Python
ProactorEventLoopcore on Windows at ~800 to 900 concurrent streaming users beforeaccept()backlog saturation triggersConnectionRefusedError. - Config Tables: Exposed the
TELEMETRY_ENABLEDflag in the primary 12-factor configuration table.
Full Changelog: v1.2.6...v1.2.7