You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.11.9, opentelemetry-instrumentation is auto-injected via the OpenTelemetry operator, opentelemetry_util_http is 0.44b0
Steps to reproduce
fromopentelemetry.util.httpimportremove_url_credentialsliteral_ipv6_url="https://[::1]/somepath?query=foo"remove_url_credentials(literal_ipv6_url)
# 'https://::1/somepath?query=foo' -- should be 'https://[::1]/somepath?query=foo'literal_ipv6_url_with_port="https://[::1]:12345/somepath?query=foo"remove_url_credentials(literal_ipv6_url_with_port)
# 'https://::1:12345/somepath?query=foo -- should be 'https://[::1]:12345/somepath?query=foo'literal_ipv6_url_with_auth="https://someuser:somepass@[::1]:12345/somepath?query=foo"remove_url_credentials(literal_ipv6_url_with_auth)
# 'https://::1:12345/somepath?query=foo' -- should be https://[::1]:12345/somepath?query=foo
What is the expected behavior?
The ipv6 host should remain inside []
What is the actual behavior? [] are stripped from the host
Describe your environment
Python 3.11.9,
opentelemetry-instrumentation
is auto-injected via the OpenTelemetry operator,opentelemetry_util_http
is0.44b0
Steps to reproduce
What is the expected behavior?
The ipv6 host should remain inside
[]
What is the actual behavior?
[]
are stripped from the hostAdditional context
https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/util/opentelemetry-util-http/src/opentelemetry/util/http/__init__.py#L169 is the causing line. The
hostname
result onurlparse
does not contain the bracketsThe text was updated successfully, but these errors were encountered: