Skip to content

Commit 73dd510

Browse files
committed
fix(confluent-kafka): remove deprecated messaging.url, fix CHANGELOG link
Signed-off-by: alliasgher <alliasgher123@gmail.com>
1 parent faa07e4 commit 73dd510

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,11 @@ def _get_links_from_records(records):
130130

131131

132132
def _set_bootstrap_servers_attributes(span, bootstrap_servers):
133-
"""Populate messaging.url, server.address, server.port from a
134-
bootstrap.servers string (e.g. ``host1:9092,host2:9092``)."""
133+
"""Populate server.address and server.port from a bootstrap.servers
134+
string (e.g. ``host1:9092,host2:9092``)."""
135135
if not bootstrap_servers:
136136
return
137137

138-
span.set_attribute(SpanAttributes.MESSAGING_URL, bootstrap_servers)
139-
140138
first_broker = bootstrap_servers.split(",")[0].strip()
141139
if not first_broker:
142140
return

instrumentation/opentelemetry-instrumentation-confluent-kafka/tests/test_instrumentation.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,6 @@ def test_producer_sets_bootstrap_servers_attributes(self) -> None:
465465
producer.produce(topic="topic-1", key="k", value="v")
466466

467467
span = self.memory_exporter.get_finished_spans()[0]
468-
self.assertEqual(
469-
span.attributes[SpanAttributes.MESSAGING_URL],
470-
"broker-a:9092,broker-b:9093",
471-
)
472468
self.assertEqual(span.attributes[SERVER_ADDRESS], "broker-a")
473469
self.assertEqual(span.attributes[SERVER_PORT], 9092)
474470

@@ -495,9 +491,5 @@ def test_consumer_sets_bootstrap_servers_attributes(self) -> None:
495491
for s in self.memory_exporter.get_finished_spans()
496492
if s.name == "topic-1 process"
497493
)
498-
self.assertEqual(
499-
process_span.attributes[SpanAttributes.MESSAGING_URL],
500-
"broker-1:9092",
501-
)
502494
self.assertEqual(process_span.attributes[SERVER_ADDRESS], "broker-1")
503495
self.assertEqual(process_span.attributes[SERVER_PORT], 9092)

0 commit comments

Comments
 (0)