-
Notifications
You must be signed in to change notification settings - Fork 949
Description
Describe the bug
Build is failing because of test createMetricReader_Default
Steps to reproduce
./gradlew build
What did you expect to see?
I expect the test to pass
What did you see instead?
PrometheusMetricReaderProviderTest > createMetricReader_Default() FAILED
org.assertj.core.error.AssertJMultipleFailuresError:
[Extracted: httpServer] (1 failure)
-- failure 1 --
expected: "0:0:0:0:0:0:0:0"
but was: "0.0.0.0"
at PrometheusMetricReaderProviderTest.lambda$createMetricReader_Default$0(PrometheusMetricReaderProviderTest.java:62)
at app//io.opentelemetry.exporter.prometheus.internal.PrometheusMetricReaderProviderTest.createMetricReader_Default(PrometheusMetricReaderProviderTest.java:60)
129 tests completed, 1 failed, 3 skipped
It appears that the IPv4 is being returned by server.getAddress().getHostName() and not an ipv6 one.
Task :exporters:prometheus:test FAILED
What version and what artifacts are you using?
Artifacts: opentelemetry-java
Version: 1.59.0 (2026-02-06)
How did you reference these artifacts?
I cloned the repository and attempted to build
Environment
Compiler: openjdk version "21.0.10" 2026-01-20 LTS
OS: Red Hat Enterprise 9.4
Runtime (if different from JDK above): OpenJDK Runtime Environment (Red_Hat-21.0.10.0.7-1) (build 21.0.10+7-LTS)
Additional context
I think adding 0.0.0.0 to a list of accepted ip addressed by server.getAddres().getHostName() will fix this.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.