Skip to content

Commit 9bfb81b

Browse files
authored
Fix CollectorIntegrationTest (#6537)
1 parent 0aacc55 commit 9bfb81b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/CollectorIntegrationTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,16 @@ void endToEnd() {
134134
// Resource attributes derived from the prometheus scrape config
135135
stringKeyValue("service.name", "app"),
136136
stringKeyValue("service.instance.id", "host.testcontainers.internal:" + prometheusPort),
137+
// net.host.name, net.host.port and http.scheme are superseded by server.address,
138+
// server.port, and url.scheme respectively and will be removed by default in a future
139+
// collector release
140+
// https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32829
137141
stringKeyValue("net.host.name", "host.testcontainers.internal"),
138142
stringKeyValue("net.host.port", String.valueOf(prometheusPort)),
139143
stringKeyValue("http.scheme", "http"),
144+
stringKeyValue("server.address", "host.testcontainers.internal"),
145+
stringKeyValue("server.port", String.valueOf(prometheusPort)),
146+
stringKeyValue("url.scheme", "http"),
140147
// Resource attributes from the metric SDK resource translated to target_info
141148
stringKeyValue(
142149
"service_name",

0 commit comments

Comments
 (0)