diff --git a/pom.xml b/pom.xml index da02be263..3a84bfa96 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,6 @@ prometheus-metrics-exporter-servlet-javax prometheus-metrics-exporter-httpserver prometheus-metrics-exporter-opentelemetry - prometheus-metrics-exporter-opentelemetry-otel-agent-resources prometheus-metrics-exporter-pushgateway prometheus-metrics-instrumentation-caffeine prometheus-metrics-instrumentation-jvm diff --git a/prometheus-metrics-exporter-opentelemetry-otel-agent-resources/pom.xml b/prometheus-metrics-exporter-opentelemetry-otel-agent-resources/pom.xml deleted file mode 100644 index a1ee03d71..000000000 --- a/prometheus-metrics-exporter-opentelemetry-otel-agent-resources/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - 4.0.0 - - - io.prometheus - client_java - 10.0.0-SNAPSHOT - - - prometheus-metrics-exporter-opentelemetry-otel-agent-resources - bundle - - OpenTelemetry Agent Resource Extractor - - Reads the OpenTelemetry Agent resources the GlobalOpenTelemetry instance - - - - io.prometheus.otel.resource.attributes - - 1.29.0 - - - - - - src/main/resources - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - validate - - copy - - - - - - - io.opentelemetry - opentelemetry-api - ${otel-dynamic-load.version} - ${project.basedir}/src/main/resources/lib/ - - - io.opentelemetry - opentelemetry-context - ${otel-dynamic-load.version} - ${project.basedir}/src/main/resources/lib/ - - - - - - - diff --git a/prometheus-metrics-exporter-opentelemetry/pom.xml b/prometheus-metrics-exporter-opentelemetry/pom.xml index 5145d1504..eba0bba96 100644 --- a/prometheus-metrics-exporter-opentelemetry/pom.xml +++ b/prometheus-metrics-exporter-opentelemetry/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 @@ -19,6 +20,8 @@ io.prometheus.metrics.exporter.opentelemetry + + 1.29.0 @@ -39,11 +42,6 @@ prometheus-metrics-core ${project.version} - - io.prometheus - prometheus-metrics-exporter-opentelemetry-otel-agent-resources - ${project.version} - io.opentelemetry opentelemetry-api @@ -103,12 +101,46 @@ + + src/main/resources + src/main/resources-filtered true + + org.apache.maven.plugins + maven-dependency-plugin + + + copy + validate + + copy + + + + + + + io.opentelemetry + opentelemetry-api + ${otel-dynamic-load.version} + ${project.basedir}/src/main/resources/lib/ + + + + io.opentelemetry + opentelemetry-context + ${otel-dynamic-load.version} + ${project.basedir}/src/main/resources/lib/ + + + + + org.codehaus.mojo build-helper-maven-plugin @@ -128,6 +160,16 @@ + + org.jacoco + jacoco-maven-plugin + + + **/lib/*.jar + **/ResourceAttributesFromOtelAgent* + + + org.apache.maven.plugins maven-shade-plugin @@ -200,7 +242,7 @@ + implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> diff --git a/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OtelAutoConfig.java b/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OtelAutoConfig.java index fb6ebff7e..c9efb447d 100644 --- a/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OtelAutoConfig.java +++ b/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OtelAutoConfig.java @@ -11,7 +11,6 @@ import io.prometheus.metrics.config.ExporterOpenTelemetryProperties; import io.prometheus.metrics.config.PrometheusProperties; import io.prometheus.metrics.model.registry.PrometheusRegistry; -import io.prometheus.otelagent.ResourceAttributesFromOtelAgent; import java.lang.reflect.Method; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; diff --git a/prometheus-metrics-exporter-opentelemetry-otel-agent-resources/src/main/java/io/prometheus/otelagent/ResourceAttributesFromOtelAgent.java b/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.java similarity index 98% rename from prometheus-metrics-exporter-opentelemetry-otel-agent-resources/src/main/java/io/prometheus/otelagent/ResourceAttributesFromOtelAgent.java rename to prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.java index 215b79de5..4e9b55c5f 100644 --- a/prometheus-metrics-exporter-opentelemetry-otel-agent-resources/src/main/java/io/prometheus/otelagent/ResourceAttributesFromOtelAgent.java +++ b/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.java @@ -1,4 +1,4 @@ -package io.prometheus.otelagent; +package io.prometheus.metrics.exporter.opentelemetry; import static java.nio.file.Files.createTempDirectory; diff --git a/prometheus-metrics-exporter-opentelemetry-otel-agent-resources/src/main/resources/lib/.gitignore b/prometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignore similarity index 100% rename from prometheus-metrics-exporter-opentelemetry-otel-agent-resources/src/main/resources/lib/.gitignore rename to prometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignore