From d631bf86486818b122eb76c0be46ce6874820c42 Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Tue, 17 Sep 2024 21:07:25 +0200 Subject: [PATCH] Shade opentelemetry-okhttp-instrumentation OkHttp is shaded which requires OkHttp instrumentation to be shaded too. --- client/trino-jdbc/pom.xml | 21 +++++++++++++------ .../test/java/io/trino/jdbc/JdbcDriverIT.java | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/client/trino-jdbc/pom.xml b/client/trino-jdbc/pom.xml index 1332bd45ffcc3..d0d06fdffebcd 100644 --- a/client/trino-jdbc/pom.xml +++ b/client/trino-jdbc/pom.xml @@ -63,6 +63,17 @@ 1.7 + + io.opentelemetry.instrumentation + opentelemetry-okhttp-3.0 + + + * + * + + + + io.trino trino-client @@ -92,12 +103,6 @@ provided - - io.opentelemetry.instrumentation - opentelemetry-okhttp-3.0 - provided - - com.fasterxml.jackson.core jackson-databind @@ -432,6 +437,10 @@ io.trino.client ${shadeBase}.client + + io.opentelemetry.instrumentation.okhttp.v3_0 + ${shadeBase}.opentelemetry.okhttp.v3_0 + com.fasterxml.jackson ${shadeBase}.jackson diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/JdbcDriverIT.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/JdbcDriverIT.java index 927cc9bc8753a..7f34418f6421a 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/JdbcDriverIT.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/JdbcDriverIT.java @@ -61,6 +61,7 @@ public void testOpenTelemetryIsNotShaded() .filter(value -> !value.isDirectory()) .map(ZipEntry::getName) .filter(name -> name.contains("io/opentelemetry")) + .filter(name -> !name.contains("io/opentelemetry/instrumentation/okhttp/v3_0")) .collect(toImmutableList()); assertThat(openTelemetryFiles)