diff --git a/bugsnag/wsgi/middleware.py b/bugsnag/wsgi/middleware.py index c215523c..45579314 100644 --- a/bugsnag/wsgi/middleware.py +++ b/bugsnag/wsgi/middleware.py @@ -3,6 +3,7 @@ from typing import Dict import bugsnag +from bugsnag.context import create_new_context from bugsnag.wsgi import request_path from bugsnag.breadcrumbs import BreadcrumbType from bugsnag.legacy import _auto_leave_breadcrumb @@ -59,6 +60,8 @@ def __init__(self, application, environ, start_response): self.environ = environ bugsnag.configure_request(wsgi_environ=self.environ) + create_new_context() + try: if bugsnag.configuration.auto_capture_sessions: bugsnag.start_session()