File tree Expand file tree Collapse file tree
instrumentation/opentelemetry-instrumentation-confluent-kafka
src/opentelemetry/instrumentation/confluent_kafka Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,13 +130,11 @@ def _get_links_from_records(records):
130130
131131
132132def _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
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments