Remove micrometer from armeria-shaded-for-testing (#4571)

* Remove micrometer from armeria-shaded-for-testing

* relocate instead
This commit is contained in:
Mateusz Rzeszutek 2021-11-03 11:32:01 +01:00 committed by GitHub
parent 077dac8c5f
commit 1d1d9ac4eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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()
}