Skip to content

Commit

Permalink
Create a new context for each Django request
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Sep 4, 2023
1 parent 8c328f9 commit e93e679
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bugsnag/django/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import bugsnag
import bugsnag.django
from bugsnag.context import create_new_context
from bugsnag.legacy import _auto_leave_breadcrumb
from bugsnag.breadcrumbs import BreadcrumbType
from bugsnag.utils import remove_query_from_url
Expand All @@ -20,6 +21,7 @@ def __init__(self, get_response=None):
# pylint: disable-msg=R0201
def process_request(self, request):
bugsnag.configure_request(django_request=request)
create_new_context()

_auto_leave_breadcrumb(
'http request',
Expand Down

0 comments on commit e93e679

Please sign in to comment.