Skip to content

Commit 44cd1dc

Browse files
committed
Always detach token from request.META
1 parent 4aa3f78 commit 44cd1dc

File tree

1 file changed

+1
-4
lines changed
  • instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django

1 file changed

+1
-4
lines changed

instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,7 @@ def process_response(self, request, response):
299299
activation.__exit__(None, None, None)
300300

301301
if self._environ_token in request.META.keys():
302-
if is_asgi_request:
303-
detach(request.META.get(self._environ_token))
304-
else:
305-
detach(request.environ.get(self._environ_token))
302+
detach(request.META.get(self._environ_token))
306303
request.META.pop(self._environ_token)
307304

308305
return response

0 commit comments

Comments
 (0)