diff --git a/javaagent-tooling/build.gradle.kts b/javaagent-tooling/build.gradle.kts index 1f318ac0f203..e6ed39f27b30 100644 --- a/javaagent-tooling/build.gradle.kts +++ b/javaagent-tooling/build.gradle.kts @@ -34,7 +34,10 @@ dependencies { implementation("io.opentelemetry:opentelemetry-exporter-otlp") implementation("io.opentelemetry:opentelemetry-exporter-logging-otlp") - implementation("io.opentelemetry:opentelemetry-exporter-prometheus") + implementation("io.opentelemetry:opentelemetry-exporter-prometheus") { + exclude(group = "io.prometheus", module = "prometheus-metrics-shaded-protobuf") + } + compileOnly("io.prometheus:prometheus-metrics-exposition-formats:1.3.1") implementation("io.opentelemetry:opentelemetry-exporter-zipkin") implementation("io.opentelemetry:opentelemetry-sdk-extension-jaeger-remote-sampler") diff --git a/javaagent-tooling/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.java b/javaagent-tooling/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.java new file mode 100644 index 000000000000..3a2c99311c5b --- /dev/null +++ b/javaagent-tooling/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.java @@ -0,0 +1,35 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.prometheus.metrics.expositionformats; + +import io.prometheus.metrics.model.snapshots.MetricSnapshots; +import java.io.IOException; +import java.io.OutputStream; + +/** + * Replacement for prometheus protobuf writer that does not depend on any of the protobuf classes. + * This allows us to exclude io.prometheus:prometheus-metrics-shaded-protobuf dependency. + * + * @see PrometheusProtobufWriter + */ +public class PrometheusProtobufWriter implements ExpositionFormatWriter { + + @Override + public boolean accepts(String acceptHeader) { + return false; + } + + @Override + public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException { + throw new UnsupportedOperationException(); + } + + @Override + public String getContentType() { + throw new UnsupportedOperationException(); + } +} diff --git a/licenses/licenses.md b/licenses/licenses.md index 092ac23dcaa8..2d9548f65226 100644 --- a/licenses/licenses.md +++ b/licenses/licenses.md @@ -191,136 +191,133 @@ > - **Manifest License**: Apache License, Version 2.0 (Not Packaged) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) -**44** **Group:** `io.prometheus` **Name:** `prometheus-metrics-shaded-protobuf` **Version:** `1.3.1` -> - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) - -**45** **Group:** `io.zipkin.reporter2` **Name:** `zipkin-reporter` **Version:** `3.4.2` +**44** **Group:** `io.zipkin.reporter2` **Name:** `zipkin-reporter` **Version:** `3.4.2` > - **Manifest Project URL**: [https://zipkin.io/](https://zipkin.io/) > - **Manifest License**: Apache License, Version 2.0 (Not Packaged) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **Embedded license files**: [zipkin-reporter-3.4.2.jar/META-INF/LICENSE](zipkin-reporter-3.4.2.jar/META-INF/LICENSE) -**46** **Group:** `io.zipkin.reporter2` **Name:** `zipkin-sender-okhttp3` **Version:** `3.4.2` +**45** **Group:** `io.zipkin.reporter2` **Name:** `zipkin-sender-okhttp3` **Version:** `3.4.2` > - **Manifest Project URL**: [https://zipkin.io/](https://zipkin.io/) > - **Manifest License**: Apache License, Version 2.0 (Not Packaged) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **Embedded license files**: [zipkin-sender-okhttp3-3.4.2.jar/META-INF/LICENSE](zipkin-sender-okhttp3-3.4.2.jar/META-INF/LICENSE) -**47** **Group:** `io.zipkin.zipkin2` **Name:** `zipkin` **Version:** `2.27.1` +**46** **Group:** `io.zipkin.zipkin2` **Name:** `zipkin` **Version:** `2.27.1` > - **Manifest Project URL**: [http://zipkin.io/](http://zipkin.io/) > - **Manifest License**: Apache License, Version 2.0 (Not Packaged) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **Embedded license files**: [zipkin-2.27.1.jar/META-INF/LICENSE](zipkin-2.27.1.jar/META-INF/LICENSE) -**48** **Group:** `net.bytebuddy` **Name:** `byte-buddy-dep` **Version:** `1.15.10` +**47** **Group:** `net.bytebuddy` **Name:** `byte-buddy-dep` **Version:** `1.15.10` > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **Embedded license files**: [byte-buddy-dep-1.15.10.jar/META-INF/LICENSE](byte-buddy-dep-1.15.10.jar/META-INF/LICENSE) - [byte-buddy-dep-1.15.10.jar/META-INF/NOTICE](byte-buddy-dep-1.15.10.jar/META-INF/NOTICE) -**49** **Group:** `org.jetbrains` **Name:** `annotations` **Version:** `13.0` +**48** **Group:** `org.jetbrains` **Name:** `annotations` **Version:** `13.0` > - **POM Project URL**: [http://www.jetbrains.org](http://www.jetbrains.org) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) -**50** **Group:** `org.jetbrains.kotlin` **Name:** `kotlin-stdlib` **Version:** `2.0.21` +**49** **Group:** `org.jetbrains.kotlin` **Name:** `kotlin-stdlib` **Version:** `2.0.21` > - **POM Project URL**: [https://kotlinlang.org/](https://kotlinlang.org/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) -**51** **Group:** `org.jetbrains.kotlin` **Name:** `kotlin-stdlib-jdk7` **Version:** `2.0.21` +**50** **Group:** `org.jetbrains.kotlin` **Name:** `kotlin-stdlib-jdk7` **Version:** `2.0.21` > - **POM Project URL**: [https://kotlinlang.org/](https://kotlinlang.org/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) -**52** **Group:** `org.jetbrains.kotlin` **Name:** `kotlin-stdlib-jdk8` **Version:** `2.0.21` +**51** **Group:** `org.jetbrains.kotlin` **Name:** `kotlin-stdlib-jdk8` **Version:** `2.0.21` > - **POM Project URL**: [https://kotlinlang.org/](https://kotlinlang.org/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) -**53** **Group:** `org.ow2.asm` **Name:** `asm` **Version:** `9.7.1` +**52** **Group:** `org.ow2.asm` **Name:** `asm` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**54** **Group:** `org.ow2.asm` **Name:** `asm-analysis` **Version:** `9.7.1` +**53** **Group:** `org.ow2.asm` **Name:** `asm-analysis` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**55** **Group:** `org.ow2.asm` **Name:** `asm-commons` **Version:** `9.7.1` +**54** **Group:** `org.ow2.asm` **Name:** `asm-commons` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**56** **Group:** `org.ow2.asm` **Name:** `asm-tree` **Version:** `9.7.1` +**55** **Group:** `org.ow2.asm` **Name:** `asm-tree` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**57** **Group:** `org.ow2.asm` **Name:** `asm-util` **Version:** `9.7.1` +**56** **Group:** `org.ow2.asm` **Name:** `asm-util` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**58** **Group:** `org.snakeyaml` **Name:** `snakeyaml-engine` **Version:** `2.8` +**57** **Group:** `org.snakeyaml` **Name:** `snakeyaml-engine` **Version:** `2.8` > - **Manifest License**: Apache License, Version 2.0 (Not Packaged) > - **POM Project URL**: [https://bitbucket.org/snakeyaml/snakeyaml-engine](https://bitbucket.org/snakeyaml/snakeyaml-engine) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) -**59** **Group:** `org.yaml` **Name:** `snakeyaml` **Version:** `2.3` +**58** **Group:** `org.yaml` **Name:** `snakeyaml` **Version:** `2.3` > - **Manifest License**: Apache License, Version 2.0 (Not Packaged) > - **POM Project URL**: [https://bitbucket.org/snakeyaml/snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) ## MIT License -**60** **Group:** `org.slf4j` **Name:** `slf4j-api` **Version:** `2.0.16` +**59** **Group:** `org.slf4j` **Name:** `slf4j-api` **Version:** `2.0.16` > - **Project URL**: [http://www.slf4j.org](http://www.slf4j.org) > - **POM License**: MIT License - [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT) > - **Embedded license files**: [slf4j-api-2.0.16.jar/META-INF/LICENSE.txt](slf4j-api-2.0.16.jar/META-INF/LICENSE.txt) -**61** **Group:** `org.slf4j` **Name:** `slf4j-simple` **Version:** `2.0.16` +**60** **Group:** `org.slf4j` **Name:** `slf4j-simple` **Version:** `2.0.16` > - **Project URL**: [http://www.slf4j.org](http://www.slf4j.org) > - **POM License**: MIT License - [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT) > - **Embedded license files**: [slf4j-simple-2.0.16.jar/META-INF/LICENSE.txt](slf4j-simple-2.0.16.jar/META-INF/LICENSE.txt) ## The 3-Clause BSD License -**62** **Group:** `org.ow2.asm` **Name:** `asm` **Version:** `9.7.1` +**61** **Group:** `org.ow2.asm` **Name:** `asm` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**63** **Group:** `org.ow2.asm` **Name:** `asm-analysis` **Version:** `9.7.1` +**62** **Group:** `org.ow2.asm` **Name:** `asm-analysis` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**64** **Group:** `org.ow2.asm` **Name:** `asm-commons` **Version:** `9.7.1` +**63** **Group:** `org.ow2.asm` **Name:** `asm-commons` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**65** **Group:** `org.ow2.asm` **Name:** `asm-tree` **Version:** `9.7.1` +**64** **Group:** `org.ow2.asm` **Name:** `asm-tree` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/) > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -**66** **Group:** `org.ow2.asm` **Name:** `asm-util` **Version:** `9.7.1` +**65** **Group:** `org.ow2.asm` **Name:** `asm-util` **Version:** `9.7.1` > - **Manifest Project URL**: [http://asm.ow2.org](http://asm.ow2.org) > - **Manifest License**: The 3-Clause BSD License (Not Packaged) > - **POM Project URL**: [http://asm.ow2.io/](http://asm.ow2.io/)