Skip to content

gRPC OpenTelemetry can't take IPv6 endpoints #3114

@tjcw

Description

@tjcw

If you specify a server to OpenTelemetry as an IPv6 address, you get a parsing error. IPv6 servers specified by DNS name work fine, and IPv4 servers specified either by address or by DNS name work fine as well.
Describe your environment
OS: RHEL8

Steps to reproduce
exporterOtlpGrpcEndpoint: '[2620:1f7:298e:a014::2:136]:4317'

E1014 08:39:23.729563510 34187 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
2024-10-14 08:39:23.730764: BIP9570E: OpenTelemetry error: '[OTLP TRACE GRPC Exporter] Export() failed with status_code: "UNAVAILABLE" error_message: "DNS resolution failed for [2620:1: unparseable host:port"' - '[]'.
E1014 08:39:24.731289659 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
E1014 08:39:26.221792529 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
E1014 08:39:29.227147178 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
E1014 08:39:34.000113217 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.
E1014 08:39:39.460472916 34183 grpc_ares_wrapper.cc:910] Failed to parse [2620:1 to host:port while attempting to resolve as ip literal.

Also fails to take HTTP IPv6 endpoint:
exporterOtlpHttpUrl: 'http://[2620:1f7:298e:a014::2:136]:4318/v1/traces'

2024-10-14 08:51:16.002504: BIP9570E: OpenTelemetry error: '[OTLP HTTP Client] Session state: connection failed.URL rejected: Bad IPv6 address' - '[]'.
2024-10-14 08:51:16.003609: BIP9570E: OpenTelemetry error: '[OTLP HTTP Client] ERROR: Export 1 trace span(s) error: 1' - '[]'.

2024-10-14 08:51:16.003227 34501 ImbOpenTelemetryDebugLog::Handle file:/build/jenkins_swg/slot0/product-build/WMB/src/DataFlowEngine/OpenTelemetry/lib/ImbOpenTelemetryDebugLog.cpp line:79 message:9570.BIPmsgs, 'Error from open telemetry logging', '[OTLP HTTP Client] Session state: connection failed.URL rejected: Bad IPv6 address', '[]'
2024-10-14 08:51:16.003227 34501 Error BIP9570E: OpenTelemetry error: '[OTLP HTTP Client] Session state: connection failed.URL rejected: Bad IPv6 address' - '[]'.
Describe exactly how to reproduce the error. Include a code sample if applicable.

What is the expected behavior?

What did you expect to see?
Connection to the specified server
What is the actual behavior?
What did you see instead?
Parse error messages
Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions