pypi django-datadog-logger 0.9.0
v0.9.0 — Async middleware support

8 hours ago

What's new

Native async middleware support for ASGI deployments.

All three middleware classes — RequestIdMiddleware, ErrorLoggingMiddleware, and RequestLoggingMiddleware — now declare async_capable = True and implement __acall__, enabling use in async Django (ASGI) alongside traditional sync WSGI.

Details

  • __call__ delegates to __acall__ when in async mode, matching Django's MiddlewareMixin dispatch pattern
  • ErrorLoggingMiddleware.__acall__ wraps the response in try/except to replicate process_exception behavior (Django skips process_exception in async mode)
  • RequestIdMiddleware extracts shared logic into _before_request / _after_request to avoid duplication between sync and async paths

Full Changelog: v0.8.0...v0.9.0

Don't miss a new django-datadog-logger release

NewReleases is sending notifications on new releases.