Skip to content

Commit

Permalink
End span on exception or other premature exits
Browse files Browse the repository at this point in the history
  • Loading branch information
siminn-arnorgj committed Nov 8, 2023
1 parent faac707 commit bf8919a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,8 @@ async def __call__(self, scope, receive, send):
)
if token:
context.detach(token)
if span.is_recording():
span.end()

# pylint: enable=too-many-branches

Expand Down

0 comments on commit bf8919a

Please sign in to comment.