Skip to content

Commit

Permalink
DEV-19025: codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreznikoff committed Feb 8, 2025
1 parent 66f10bc commit f35d67d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/huntflow_base_metrics/web_frameworks/litestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
self.count_request_exceptions(ctx, exception_type)

@staticmethod
def _get_send_wrapper(send: Send, span: RequestContext) -> Callable:
def _get_send_wrapper(send: Send, ctx: RequestContext) -> Callable:
@wraps(send)
async def wrapped_send(message: Message) -> None:
if message["type"] == "http.response.start":
span.status_code = message["status"]
ctx.status_code = message["status"]

if message["type"] == "http.response.body":
span.end_time = time.perf_counter()
ctx.end_time = time.perf_counter()

await send(message)

Expand Down

0 comments on commit f35d67d

Please sign in to comment.