Skip to content

Commit

Permalink
Shade opentelemetry-okhttp-instrumentation
Browse files Browse the repository at this point in the history
OkHttp is shaded which requires OkHttp instrumentation to be shaded too.
  • Loading branch information
wendigo committed Sep 17, 2024
1 parent e4865d3 commit d631bf8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
21 changes: 15 additions & 6 deletions client/trino-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@
<version>1.7</version>
</dependency>

<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-okhttp-3.0</artifactId>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-client</artifactId>
Expand Down Expand Up @@ -92,12 +103,6 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-okhttp-3.0</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down Expand Up @@ -432,6 +437,10 @@
<pattern>io.trino.client</pattern>
<shadedPattern>${shadeBase}.client</shadedPattern>
</relocation>
<relocation>
<pattern>io.opentelemetry.instrumentation.okhttp.v3_0</pattern>
<shadedPattern>${shadeBase}.opentelemetry.okhttp.v3_0</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>${shadeBase}.jackson</shadedPattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d631bf8

Please sign in to comment.