nginxinc / nginx-otel

Apache License 2.0
168 stars 19 forks source link

OTel export failure: DNS resolution failed when using an `http://` exporter endpoint #60

Closed giannello closed 1 week ago

giannello commented 3 months ago

Describe the bug

The exporter endpoint is not correctly resolved when specified with a leading http://

To reproduce

otel_exporter {
    endpoint http://collector.collector.svc.cluster.local.:4317;
}

The logs will contain

OTel export failure: DNS resolution failed for http://collector.collector.svc.cluster.local.:4317: C-ares status is not ARES_SUCCESS qtype=A name=http://collector.collector.svc.cluster.local.:4317 is_balancer=0: Domain name not found

Expected behavior

Nginx sends traces to the OTEL collector

Your environment

nginx/1.27.0

Additional context

According to the OTEL documentation, the http prefix must be supported also for GRPC.