Skip to content

Commit

Permalink
Fix OpenTelemetry substitution
Browse files Browse the repository at this point in the history
Fixes: #25143
  • Loading branch information
geoand committed Apr 26, 2022
1 parent 75f01bf commit 535aac2
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 535aac2

Please sign in to comment.