-
Notifications
You must be signed in to change notification settings - Fork 752
Description
Describe your environment
I'm trying to use an application that uses the OpenTelemetry library to export trace data to Jaeger. The Jaeger agent is not running in the same container as the application and there is only IPv6 connectivity to the Jaeger agent, thus, IPv6 is used. However, it does not work and leads to a traceback.
The code shown linked here is IPv4 only capable as it hard codes AF_INET:
Line 76 in bd8db6e
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as udp_socket: |
Steps to reproduce
Configure an IPv6 address as the agent export host and run your program, which will crash as the address family provided to the socket (AF_INET) is inconsistent with the address (AF_INET6).
What is the expected behavior?
Data should be exported to Jaeger as normal but over an IPv6 socket.
What is the actual behavior?
<ERROR> 27-Jan-2021::17:47:49.939 opentelemetry.sdk.trace.export MainThread: - Exception while exporting Span.
Traceback (most recent call last):
File "/var/opt/ncs/packages/opentelemetry-exporter/pyvenv/lib/python3.7/site-packages/opentelemetry/sdk/trace/export/__init__.py", line 83, in on_end
self.span_exporter.export((span,))
File "/var/opt/ncs/packages/opentelemetry-exporter/pyvenv/lib/python3.7/site-packages/opentelemetry/exporter/jaeger/__init__.py", line 181, in export
self.agent_client.emit(batch)
File "/var/opt/ncs/packages/opentelemetry-exporter/pyvenv/lib/python3.7/site-packages/opentelemetry/exporter/jaeger/__init__.py", line 427, in emit
udp_socket.sendto(buff, self.address)
socket.gaierror: [Errno -9] Address family for hostname not supported
Additional context