Skip to content

Commit

Permalink
Create a new context for each WSGI request
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Sep 1, 2023
1 parent 7d8ae2b commit 1b76644
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bugsnag/wsgi/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 1b76644

Please sign in to comment.