Skip to content

Commit 745d7ad

Browse files
committed
fix: get unique topic list in batch
1 parent ae227a1 commit 745d7ad

File tree

1 file changed

+4
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-aiokafka/src/opentelemetry/instrumentation/aiokafka

1 file changed

+4
-1
lines changed

instrumentation/opentelemetry-instrumentation-aiokafka/src/opentelemetry/instrumentation/aiokafka/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,10 @@ async def _traced_getmany(
526526
consumer_group = _extract_consumer_group(instance)
527527

528528
span_name = _get_span_name(
529-
"poll", ", ".join([topic.topic for topic in records.keys()])
529+
"poll",
530+
", ".join(
531+
sorted(set(topic.topic for topic in records.keys()))
532+
),
530533
)
531534
with tracer.start_as_current_span(
532535
span_name, kind=trace.SpanKind.CLIENT

0 commit comments

Comments
 (0)