aws-xray-sdk-go
aws-xray-sdk-go copied to clipboard
If configured with hostnames, use hostnames when getting sampling rules
We have an interesting setup where by we would prefer that requests to get sampling rules was using the configured hostname for the daemon rather than the resolved IP address.
As per the allowed configuration we are using "udp:hostname:2000 tcp:hostname:2001"
where hostname is our internal cluster daemon hostname.
When the XRay service is constructed the endpoint resolved is setup to use the IP and Port from the resolved daemon configuration.
Is there a reason for this configuration not to use the configured hostname?
If I understand the question then probably you're asking if SDK should be able to resolve hostname
of your environment where daemon is running? If that is the case then I think SDK should be able to use that hostname and port as long as you use allowed configuration format. Here is the method of parsing such double address.
My team and I use a single xray daemon for our entire environment, hosted on Fargate. If we push a config change, that causes the IP to change and as a result upstream resources fail to send xray data because (it appears) to cache the IP which the hostname initially resolved to at launch.
This code returns a static IP address. This seems unnecessary from the start, but it would be nice to simply send the telemetry data to the actual domain and port specified rather than the IP that it initially resolves to.
Hi @edwardofclt , This looks like an enhancement. I think this is a reasonable ask. I will add this item in our backlog. Meanwhile, Feel free to contribute and let me know If I can help in any way :)
Hey @bhautikpip, just checking in here; is there anything I can do to help move this along?