Skip to content

Release v1.2.6: High-Concurrency Event Loop Unblocking & OTel Fixes

Choose a tag to compare

@ninadphalak ninadphalak released this 19 Aug 06:21
· 131 commits to main since this release
e48c520

Release v1.2.6: 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_logger to utilize a lock-free QueueHandler and QueueListener. SOC 2 audit logs now instantly drop into an unbounded memory queue and flush to sys.stdout on 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=True would mistakenly instantiate a ConsoleSpanExporter and block the main thread. Traces are now correctly exported asynchronously over the network via HTTP using the standard OTLPSpanExporter.

🛠️ Testing & Dependency Hardening

  • Betterproto Stabilization: Pinned betterproto dependency from the 2.0.0b6 beta up to the official 2.0.0 stable release.
  • Test Suite Hygiene: Quieted upstream Starlette httpx2 DeprecationWarning noise via strict pytest.ini filter overrides.
  • State Leakage Fixes: Added automatic _readyz_cache.clear() calls to the pytest conftest.py teardown hooks to eliminate PermissionError state 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 ProactorEventLoop core on Windows at ~800 to 900 concurrent streaming users before accept() backlog saturation triggers ConnectionRefusedError.
  • Config Tables: Exposed the TELEMETRY_ENABLED flag in the primary 12-factor configuration table.

Full Changelog: v1.2.5...v1.2.6