diff --git a/testing/armeria-shaded-for-testing/build.gradle.kts b/testing/armeria-shaded-for-testing/build.gradle.kts index f7277a8a7c58..458374d63227 100644 --- a/testing/armeria-shaded-for-testing/build.gradle.kts +++ b/testing/armeria-shaded-for-testing/build.gradle.kts @@ -16,6 +16,7 @@ tasks { shadowJar { // Ensures tests are not affected by Armeria instrumentation relocate("com.linecorp.armeria", "io.opentelemetry.testing.internal.armeria") + // Allows tests of Netty instrumentations which would otherwise conflict. // The relocation must end with io.netty to allow Netty to detect shaded native libraries. // https://github.com/netty/netty/blob/e69107ceaf247099ad9a198b8ef557bdff994a99/common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java#L120 @@ -23,6 +24,12 @@ tasks { exclude("META-INF/maven/**") relocate("META-INF/native/libnetty", "META-INF/native/libio_opentelemetry_testing_internal_netty") relocate("META-INF/native/netty", "META-INF/native/io_opentelemetry_testing_internal_netty") + + // relocate micrometer and its dependencies so that it doesn't conflict with instrumentation tests + relocate("io.micrometer", "io.opentelemetry.testing.internal.io.micrometer") + relocate("org.HdrHistogram", "io.opentelemetry.testing.internal.org.hdrhistogram") + relocate("org.LatencyUtils", "io.opentelemetry.testing.internal.org.latencyutils") + mergeServiceFiles() }