From 535aac2a99e34d3d5323d21784ad719f64fa1935 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 26 Apr 2022 09:34:32 +0300 Subject: [PATCH] Fix OpenTelemetry substitution Fixes: #25143 --- .../exporter/jaeger/runtime/JaegerSubstitutions.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/extensions/opentelemetry/opentelemetry-exporter-jaeger/runtime/src/main/java/io/quarkus/opentelemetry/exporter/jaeger/runtime/JaegerSubstitutions.java b/extensions/opentelemetry/opentelemetry-exporter-jaeger/runtime/src/main/java/io/quarkus/opentelemetry/exporter/jaeger/runtime/JaegerSubstitutions.java index cf2a5539cfa788..e4c329a24c3c31 100644 --- a/extensions/opentelemetry/opentelemetry-exporter-jaeger/runtime/src/main/java/io/quarkus/opentelemetry/exporter/jaeger/runtime/JaegerSubstitutions.java +++ b/extensions/opentelemetry/opentelemetry-exporter-jaeger/runtime/src/main/java/io/quarkus/opentelemetry/exporter/jaeger/runtime/JaegerSubstitutions.java @@ -14,18 +14,20 @@ import io.opentelemetry.exporter.internal.grpc.ManagedChannelUtil; /** - * Replace the {@link ManagedChannelUtil#setTrustedCertificatesPem(ManagedChannelBuilder, byte[])} method in native + * Replace the {@link ManagedChannelUtil#setClientKeysAndTrustedCertificatesPem(ManagedChannelBuilder, byte[], byte[], byte[])} + * method in native * because the method implementation tries to look for grpc-netty-shaded dependencies, which we don't support. * * Check: - * https://github.com/open-telemetry/opentelemetry-java/blob/v1.9.1/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/otlp/internal/grpc/ManagedChannelUtil.java#L56-L89 + * https://github.com/open-telemetry/opentelemetry-java/blob/v1.13.0/exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/grpc/ManagedChannelUtil.java#L47-L91 */ final class JaegerSubstitutions { @TargetClass(ManagedChannelUtil.class) static final class Target_ManagedChannelUtil { @Substitute - public static void setTrustedCertificatesPem( - ManagedChannelBuilder managedChannelBuilder, byte[] trustedCertificatesPem) + public static void setClientKeysAndTrustedCertificatesPem( + ManagedChannelBuilder managedChannelBuilder, byte[] privateKeyPem, byte[] certificatePem, + byte[] trustedCertificatesPem) throws SSLException { requireNonNull(managedChannelBuilder, "managedChannelBuilder"); requireNonNull(trustedCertificatesPem, "trustedCertificatesPem");