Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
ZStriker19 committed Feb 3, 2025
1 parent 959afb1 commit d563bb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ddtrace/contrib/internal/aiohttp/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ async def attach_context(request):

# attach the context and the root span to the request; the Context
# may be freely used by the application code
request[REQUEST_CONTEXT_KEY] = request_span.context
request[REQUEST_SPAN_KEY] = request_span
request[REQUEST_CONTEXT_KEY] = req_span.context
request[REQUEST_SPAN_KEY] = req_span
request[REQUEST_CONFIG_KEY] = app[CONFIG_KEY]
try:
response = await handler(request)
Expand All @@ -64,7 +64,7 @@ async def attach_context(request):
request.task.add_done_callback(lambda _: finish_request_span(request, response))
return response
except Exception:
request_span.set_traceback()
req_span.set_traceback()
raise

return attach_context
Expand Down

0 comments on commit d563bb6

Please sign in to comment.