Skip to content

Commit 099d1ba

Browse files
committed
fix: double call to 'span.end()' when 'acknowledge' is called
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.
1 parent 239f307 commit 099d1ba

File tree

1 file changed

+0
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-pulsar/src/opentelemetry/instrumentation/pulsar

1 file changed

+0
-1
lines changed

Diff for: instrumentation/opentelemetry-instrumentation-pulsar/src/opentelemetry/instrumentation/pulsar/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def wrapper( # pylint: disable=function-redefined
142142
message.partition_key(),
143143
)
144144
_enrich_span_with_message(span, message)
145-
message._set_current_span(span)
146145
with trace.use_span(span, True):
147146
return message_listener(consumer, message, *args, **kwargs)
148147

0 commit comments

Comments
 (0)