Skip to content

Commit 1e59b3f

Browse files
committed
Fixed problem with ports
Signed-off-by: chandr-andr (Kiselev Aleksandr) <[email protected]>
1 parent 495bade commit 1e59b3f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

otlp_psqlpy/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,18 @@ def _construct_span(
7676

7777
if hosts:
7878
span_attributes[SpanAttributes.SERVER_ADDRESS] = ", ".join(hosts)
79-
span_attributes[SpanAttributes.SERVER_PORT] = ", ".join(ports)
79+
span_attributes[SpanAttributes.SERVER_PORT] = ", ".join(
80+
[str(port) for port in ports]
81+
)
8082
span_attributes[SpanAttributes.NETWORK_TRANSPORT] = (
8183
NetTransportValues.IP_TCP.value
8284
)
8385

8486
elif host_addrs:
8587
span_attributes[SpanAttributes.SERVER_ADDRESS] = ", ".join(host_addrs)
86-
span_attributes[SpanAttributes.SERVER_PORT] = ", ".join(ports)
88+
span_attributes[SpanAttributes.SERVER_PORT] = ", ".join(
89+
[str(port) for port in ports]
90+
)
8791
span_attributes[SpanAttributes.NETWORK_TRANSPORT] = (
8892
NetTransportValues.IP_TCP.value
8993
)

0 commit comments

Comments
 (0)