Skip to content

Commit 7b82acb

Browse files
committed
Always detach token from request.META
1 parent 20d19a8 commit 7b82acb

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,7 @@ def process_response(self, request, response):
297297
activation.__exit__(None, None, None)
298298

299299
if self._environ_token in request.META.keys():
300-
if is_asgi_request:
301-
detach(request.META.get(self._environ_token))
302-
else:
303-
detach(request.environ.get(self._environ_token))
300+
detach(request.META.get(self._environ_token))
304301
request.META.pop(self._environ_token)
305302

306303
return response

0 commit comments

Comments
 (0)