jaegertracing / jaeger-client-python

🛑 This library is DEPRECATED!
https://jaegertracing.io/
Apache License 2.0
408 stars 155 forks source link

IPv6 support #337

Closed alvassin closed 3 years ago

alvassin commented 3 years ago

Currently jaeger_client is not flexible enough - it is not possible to specify ipv6 socket.

Could you please add such support? I could do PR by myself, but i am not sure what is the best way to implement it.

Of course, it would be much more flexible to pass socket object, that could be configured by user. But for current API perhaps it would be better to add one more parameter to the config:

config = Config(
    'local_agent': {
        'reporting_host': 'example.com',  # standard option
        'reporting_host_ipv6': 'example.com', # instead?
        'reporting_host_use_ipv6': true,  # one more way?
        'reporting_port': 6831,
    },
    ...
)
yurishkuro commented 3 years ago

I'd go with reporting_host_use_ipv6, unless it can be determined automatically from the look of the address.

alvassin commented 3 years ago

@yurishkuro, I've made PR, but perhaps ~~better way is just to use sock.AF_UNSPEC instead of sock.AF_INET? It should work out-of-the-box, what do you think?~~

UPD: sock.AF_UNSPEC unfortunately does not work well (was not able to report span to ipv6-only host)

alvassin commented 3 years ago

@yurishkuro, thank you very much for your time! Could you please release ipv6 version on pypi?

yurishkuro commented 3 years ago

https://pypi.org/project/jaeger-client/4.8.0/

alvassin commented 3 years ago

Thank you very much!