diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index 35a660d4bb6..1b2849175db 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -32,6 +32,7 @@ val mockitoVersion = "4.11.0" val slf4jVersion = "2.0.16" val opencensusVersion = "0.31.1" val prometheusClientVersion = "0.16.0" +val prometheusServerVersion = "1.3.4" val DEPENDENCIES = listOf( "com.google.auto.value:auto-value:${autoValueVersion}", @@ -52,6 +53,8 @@ val DEPENDENCIES = listOf( "org.slf4j:slf4j-simple:${slf4jVersion}", "org.slf4j:jul-to-slf4j:${slf4jVersion}", "io.prometheus:prometheus-metrics-shaded-protobuf:1.3.1", + "io.prometheus:prometheus-metrics-exporter-httpserver:${prometheusServerVersion}", + "io.prometheus:prometheus-metrics-exposition-formats:${prometheusServerVersion}", "io.prometheus:simpleclient:${prometheusClientVersion}", "io.prometheus:simpleclient_common:${prometheusClientVersion}", "io.prometheus:simpleclient_httpserver:${prometheusClientVersion}", @@ -72,7 +75,6 @@ val DEPENDENCIES = listOf( "io.opentelemetry.proto:opentelemetry-proto:1.4.0-alpha", "io.opentracing:opentracing-api:0.33.0", "io.opentracing:opentracing-noop:0.33.0", - "io.prometheus:prometheus-metrics-exporter-httpserver:1.3.3", "junit:junit:4.13.2", "nl.jqno.equalsverifier:equalsverifier:3.17.3", "org.awaitility:awaitility:4.2.2", diff --git a/exporters/prometheus/build.gradle.kts b/exporters/prometheus/build.gradle.kts index 8fe244b3f3d..3b44fad2c56 100644 --- a/exporters/prometheus/build.gradle.kts +++ b/exporters/prometheus/build.gradle.kts @@ -20,6 +20,7 @@ dependencies { testImplementation(project(":sdk:testing")) testImplementation("io.opentelemetry.proto:opentelemetry-proto") testImplementation("io.prometheus:prometheus-metrics-shaded-protobuf") + testImplementation("io.prometheus:prometheus-metrics-exposition-formats") testImplementation("com.sun.net.httpserver:http") testImplementation("com.google.guava:guava") testImplementation("com.linecorp.armeria:armeria") diff --git a/exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServerTest.java b/exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServerTest.java index 382e661b5ab..7115ff8a2b3 100644 --- a/exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServerTest.java +++ b/exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServerTest.java @@ -42,7 +42,7 @@ import io.opentelemetry.sdk.resources.Resource; import io.prometheus.metrics.exporter.httpserver.HTTPServer; import io.prometheus.metrics.exporter.httpserver.MetricsHandler; -import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_28_2.Metrics; +import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_28_3.Metrics; import io.prometheus.metrics.model.registry.PrometheusRegistry; import io.prometheus.metrics.shaded.com_google_protobuf_4_28_3.TextFormat; import java.io.ByteArrayInputStream;