Description
What happened?
We run a Datadog agent on each node within our Kubernetes cluster on AWS. We use the OTEL_EXPORTER_OTLP_ENDPOINT environmental variable to direct the HTTP exporter to send metrics & traces to the local agent (http://[$(HOST_IP)]:4318). In our case this ends up being a IPV6 address, which was causing metrics & traces publishing to fail with a DNS resolve error. Turns out that sendWithHttp in otlp-exporter-base parses the URL and uses the hostname for the HTTP request. This includes the square brackets which triggers the DNS request and fails. We have applied a patch to remove the square brackets when present which fixed things. Unsure if this is me doing something stupid or a bug.
I am happy to open a PR if needed. Let me know how you would like things to proceed.
Thank you all for the work on this library ❤