Skip to content
1 change: 1 addition & 0 deletions .changelog/4563.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'opentelemetry-instrumentation-pika': pass destination to _enrich_span instead of task_name
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
'opentelemetry-instrumentation-pika': pass destination to _enrich_span instead of task_name
`opentelemetry-instrumentation-pika`: pass destination to _enrich_span instead of task_name

Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _get_span(
kind=span_kind,
)
if span.is_recording():
_enrich_span(span, channel, properties, task_name, operation)
_enrich_span(span, channel, properties, destination, operation)
return span


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ def test_get_span(
tracer.start_span.assert_called_once_with(
name=generate_span_name.return_value, kind=span_kind
)
enrich_span.assert_called_once()
enrich_span.assert_called_once_with(
tracer.start_span.return_value,
channel,
properties,
destination,
None,
)

@mock.patch("opentelemetry.context.get_value")
@mock.patch("opentelemetry.instrumentation.pika.utils._generate_span_name")
Expand Down