Skip to content

Commit

Permalink
fix: double call to 'span.end()' when 'acknowledge' is called
Browse files Browse the repository at this point in the history
The `trace.use_span(span, True)` will already close this span,
if we store this same span in the message, it'll be closed
by a call to any of the `*acknowledge` functions, essentially
causing a double call to `span.end()`.

This change prevents this from happening by not storing the
span in the message.
  • Loading branch information
JonathanxD committed Mar 11, 2024
1 parent 239f307 commit 099d1ba
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ def wrapper( # pylint: disable=function-redefined
message.partition_key(),
)
_enrich_span_with_message(span, message)
message._set_current_span(span)
with trace.use_span(span, True):
return message_listener(consumer, message, *args, **kwargs)

Expand Down

0 comments on commit 099d1ba

Please sign in to comment.