Skip to content

Commit 35635b0

Browse files
committed
aio-pika instrumentation: Removed check for non-sampled span when inject 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.
1 parent e318c94 commit 35635b0

File tree

1 file changed

+1
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika

1 file changed

+1
-2
lines changed

instrumentation/opentelemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/publish_decorator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ async def decorated_publish(
4545
if not span:
4646
return await publish(message, routing_key, **kwargs)
4747
with trace.use_span(span, end_on_exit=True):
48-
if span.is_recording():
49-
propagate.inject(message.properties.headers)
48+
propagate.inject(message.properties.headers)
5049
return_value = await publish(message, routing_key, **kwargs)
5150
return return_value
5251

0 commit comments

Comments
 (0)