Skip to content

Commit

Permalink
Remove micrometer from armeria-shaded-for-testing (open-telemetry#4571)
Browse files Browse the repository at this point in the history
* Remove micrometer from armeria-shaded-for-testing

* relocate instead
  • Loading branch information
Mateusz Rzeszutek authored and RashmiRam committed May 23, 2022
1 parent d9b7f29 commit ea9b64d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions testing/armeria-shaded-for-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ 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
relocate("io.netty", "io.opentelemetry.testing.internal.io.netty")
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()
}

Expand Down

0 comments on commit ea9b64d

Please sign in to comment.