Skip to content

ContainerState#getContainerIpAddress() returns a non-IP string #4715

@mateuszrzeszutek

Description

@mateuszrzeszutek

The getContainerIpAddress() method may return "localhost", which is not an IP address (it indirectly calls the DockerClientProviderStrategy#resolveDockerHostIpAddress() method, which uses "localhost" as a fallback value for a couple of cases). The javadoc says @return an IP address and doesn't mention that the method can return non-IP values at all.

Also see open-telemetry/opentelemetry-java-instrumentation#4745

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions