Skip to content

Commit

Permalink
aio-pika instrumentation: Removed check for non-sampled span when inj…
Browse files Browse the repository at this point in the history
…ect message headers. Reason to change is that sampled flag can be propagate https://www.w3.org/TR/trace-context/#sampled-flag and be useful when trace is not sampled.
  • Loading branch information
nesb1 committed Sep 25, 2023
1 parent e318c94 commit 35635b0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ async def decorated_publish(
if not span:
return await publish(message, routing_key, **kwargs)
with trace.use_span(span, end_on_exit=True):
if span.is_recording():
propagate.inject(message.properties.headers)
propagate.inject(message.properties.headers)
return_value = await publish(message, routing_key, **kwargs)
return return_value

Expand Down

0 comments on commit 35635b0

Please sign in to comment.